'Make a server SSL.
Make a server SSL based on server_name and filename by adding a
``listen IConfig.tls_sni_01_port ssl`` directive to the server block.
.. todo:: Maybe this should create a new block instead of modifying
the existing one?
:param vhost: The vhost to add SSL to.
:type vhost: :class:`~certbot_nginx.obj.VirtualHost`'

def _make_server_ssl(self, vhost):

    if (len(vhost.addrs) == 0):
        listen_block = [['\n                ', 'listen', '    ', self.DEFAULT_LISTEN_PORT]]
        self.parser.add_server_directives(vhost, listen_block, replace=False)
    (snakeoil_cert, snakeoil_key) = self._get_snakeoil_paths()
    ssl_block = [['\n                ', 'listen', '    ', '{0}    ssl'.format(self.config.tls_sni_01_port)], ['\n                ', 'ssl_certificate', '    ', snakeoil_cert], ['\n                ', 'ssl_certificate_key', '    ', snakeoil_key], ['\n                ', 'include', '    ', self.mod_ssl_conf]]
    self.parser.add_server_directives(vhost, ssl_block, replace=False)
