mirror of
https://github.com/certbot/certbot.git
synced 2026-05-28 04:34:11 -04:00
Work around horrible spaciness API usage bug
This commit is contained in:
parent
7deb1f0ad6
commit
da7e429125
1 changed files with 6 additions and 1 deletions
|
|
@ -338,11 +338,16 @@ class NginxConfigurator(common.Plugin):
|
|||
"""
|
||||
snakeoil_cert, snakeoil_key = self._get_snakeoil_paths()
|
||||
|
||||
options_subblock = self.parser.loc["ssl_options"]
|
||||
# the options file doesn't have a newline at the beginning, but there
|
||||
# needs to be one when it's dropped into the file
|
||||
if "\n" not in options_subblock[0]:
|
||||
options_subblock[0].insert(0, "\n")
|
||||
ssl_block = (
|
||||
[['\n ', 'listen', ' ', '{0} ssl'.format(self.config.tls_sni_01_port)],
|
||||
['\n ', 'ssl_certificate', ' ', snakeoil_cert],
|
||||
['\n ', 'ssl_certificate_key', ' ', snakeoil_key]] +
|
||||
self.parser.loc["ssl_options"])
|
||||
options_subblock)
|
||||
|
||||
self.parser.add_server_directives(
|
||||
vhost.filep, vhost.names, ssl_block, replace=False)
|
||||
|
|
|
|||
Loading…
Reference in a new issue