Merge branch 'master' into pyopenssl

This commit is contained in:
Brad Warren
2016-01-08 14:26:13 -05:00
4 changed files with 9 additions and 1 deletions
+2
View File
@@ -25,6 +25,8 @@ class Error(jose.JSONObjectWithFields, errors.Error):
('connection', 'The server could not connect to the client to ' ('connection', 'The server could not connect to the client to '
'verify the domain'), 'verify the domain'),
('dnssec', 'The server could not validate a DNSSEC signed domain'), ('dnssec', 'The server could not validate a DNSSEC signed domain'),
('invalidEmail',
'The provided email for a registration was invalid'),
('malformed', 'The request message was malformed'), ('malformed', 'The request message was malformed'),
('rateLimited', 'There were too many requests of a given type'), ('rateLimited', 'There were too many requests of a given type'),
('serverInternal', 'The server experienced an internal error'), ('serverInternal', 'The server experienced an internal error'),
@@ -1302,6 +1302,7 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator):
""" """
self.config_test() self.config_test()
logger.debug(self.reverter.view_config_changes(for_logging=True))
self._reload() self._reload()
def _reload(self): def _reload(self):
@@ -1,12 +1,14 @@
"""A class that performs TLS-SNI-01 challenges for Apache""" """A class that performs TLS-SNI-01 challenges for Apache"""
import os import os
import logging
from letsencrypt.plugins import common from letsencrypt.plugins import common
from letsencrypt_apache import obj from letsencrypt_apache import obj
from letsencrypt_apache import parser from letsencrypt_apache import parser
logger = logging.getLogger(__name__)
class ApacheTlsSni01(common.TLSSNI01): class ApacheTlsSni01(common.TLSSNI01):
"""Class that performs TLS-SNI-01 challenges within the Apache configurator """Class that performs TLS-SNI-01 challenges within the Apache configurator
@@ -104,6 +106,7 @@ class ApacheTlsSni01(common.TLSSNI01):
self.configurator.reverter.register_file_creation( self.configurator.reverter.register_file_creation(
True, self.challenge_conf) True, self.challenge_conf)
logger.debug("writing a config file with text: %s", config_text)
with open(self.challenge_conf, "w") as new_conf: with open(self.challenge_conf, "w") as new_conf:
new_conf.write(config_text) new_conf.write(config_text)
+3 -1
View File
@@ -94,7 +94,7 @@ class Reverter(object):
"Unable to load checkpoint during rollback") "Unable to load checkpoint during rollback")
rollback -= 1 rollback -= 1
def view_config_changes(self): def view_config_changes(self, for_logging=False):
"""Displays all saved checkpoints. """Displays all saved checkpoints.
All checkpoints are printed by All checkpoints are printed by
@@ -144,6 +144,8 @@ class Reverter(object):
output.append(os.linesep) output.append(os.linesep)
if for_logging:
return os.linesep.join(output)
zope.component.getUtility(interfaces.IDisplay).notification( zope.component.getUtility(interfaces.IDisplay).notification(
os.linesep.join(output), display_util.HEIGHT) os.linesep.join(output), display_util.HEIGHT)