mirror of
https://github.com/certbot/certbot.git
synced 2026-06-08 16:22:18 -04:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
6c90997aa8
14 changed files with 26 additions and 29 deletions
|
|
@ -62,5 +62,5 @@ RUN virtualenv --no-site-packages -p python2 /opt/letsencrypt/venv && \
|
|||
# bash" and investigate, apply patches, etc.
|
||||
|
||||
ENV PATH /opt/letsencrypt/venv/bin:$PATH
|
||||
# TODO: is --text really necessary?
|
||||
ENTRYPOINT [ "letsencrypt", "--text" ]
|
||||
|
||||
ENTRYPOINT [ "letsencrypt" ]
|
||||
|
|
|
|||
|
|
@ -542,7 +542,7 @@ class DNS(DVChallenge):
|
|||
def check_validation(self, validation, account_public_key):
|
||||
"""Check validation.
|
||||
|
||||
:param validation
|
||||
:param JWS validation:
|
||||
:type account_public_key:
|
||||
`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPublicKey`
|
||||
or
|
||||
|
|
|
|||
|
|
@ -21,9 +21,3 @@
|
|||
|
||||
.. automodule:: letsencrypt.display.enhancements
|
||||
:members:
|
||||
|
||||
:mod:`letsencrypt.display.revocation`
|
||||
=====================================
|
||||
|
||||
.. automodule:: letsencrypt.display.revocation
|
||||
:members:
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
:mod:`letsencrypt.recovery_token`
|
||||
--------------------------------------------------
|
||||
|
||||
.. automodule:: letsencrypt.recovery_token
|
||||
:members:
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
:mod:`letsencrypt.revoker`
|
||||
--------------------------
|
||||
|
||||
.. automodule:: letsencrypt.revoker
|
||||
:members:
|
||||
|
|
@ -1162,7 +1162,7 @@ def _get_mod_deps(mod_name):
|
|||
changes.
|
||||
.. warning:: If all deps are not included, it may cause incorrect parsing
|
||||
behavior, due to enable_mod's shortcut for updating the parser's
|
||||
currently defined modules (:method:`.ApacheConfigurator._add_parser_mod`)
|
||||
currently defined modules (`.ApacheConfigurator._add_parser_mod`)
|
||||
This would only present a major problem in extremely atypical
|
||||
configs that use ifmod for the missing deps.
|
||||
|
||||
|
|
|
|||
|
|
@ -420,7 +420,7 @@ def plugins_cmd(args, config, plugins): # TODO: Use IDisplay rather than print
|
|||
logger.debug("Expected interfaces: %s", args.ifaces)
|
||||
|
||||
ifaces = [] if args.ifaces is None else args.ifaces
|
||||
filtered = plugins.ifaces(ifaces)
|
||||
filtered = plugins.visible().ifaces(ifaces)
|
||||
logger.debug("Filtered plugins: %r", filtered)
|
||||
|
||||
if not args.init and not args.prepare:
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ def pick_plugin(config, default, plugins, question, ifaces):
|
|||
# throw more UX-friendly error if default not in plugins
|
||||
filtered = plugins.filter(lambda p_ep: p_ep.name == default)
|
||||
else:
|
||||
filtered = plugins.ifaces(ifaces)
|
||||
filtered = plugins.visible().ifaces(ifaces)
|
||||
|
||||
filtered.init(config)
|
||||
verified = filtered.verify(ifaces)
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ logger = logging.getLogger(__name__)
|
|||
# immediately.
|
||||
_SIGNALS = ([signal.SIGTERM] if os.name == "nt" else
|
||||
[signal.SIGTERM, signal.SIGHUP, signal.SIGQUIT,
|
||||
signal.SIGXCPU, signal.SIGXFSZ, signal.SIGPWR])
|
||||
signal.SIGXCPU, signal.SIGXFSZ])
|
||||
|
||||
|
||||
class ErrorHandler(object):
|
||||
|
|
|
|||
|
|
@ -50,6 +50,11 @@ class PluginEntryPoint(object):
|
|||
"""Description with name. Handy for UI."""
|
||||
return "{0} ({1})".format(self.description, self.name)
|
||||
|
||||
@property
|
||||
def hidden(self):
|
||||
"""Should this plugin be hidden from UI?"""
|
||||
return getattr(self.plugin_cls, "hidden", False)
|
||||
|
||||
def ifaces(self, *ifaces_groups):
|
||||
"""Does plugin implements specified interface groups?"""
|
||||
return not ifaces_groups or any(
|
||||
|
|
@ -183,6 +188,10 @@ class PluginsRegistry(collections.Mapping):
|
|||
return type(self)(dict((name, plugin_ep) for name, plugin_ep
|
||||
in self._plugins.iteritems() if pred(plugin_ep)))
|
||||
|
||||
def visible(self):
|
||||
"""Filter plugins based on visibility."""
|
||||
return self.filter(lambda plugin_ep: not plugin_ep.hidden)
|
||||
|
||||
def ifaces(self, *ifaces_groups):
|
||||
"""Filter plugins based on interfaces."""
|
||||
# pylint: disable=star-args
|
||||
|
|
|
|||
|
|
@ -182,6 +182,8 @@ binary for temporary key/certificate generation.""".replace("\n", "")
|
|||
achall.account_key.public_key(), self.config.simple_http_port):
|
||||
return response
|
||||
else:
|
||||
logger.error(
|
||||
"Self-verify of challenge failed, authorization abandoned.")
|
||||
if self.conf("test-mode") and self._httpd.poll() is not None:
|
||||
# simply verify cause command failure...
|
||||
return False
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ class Installer(common.Plugin):
|
|||
zope.interface.classProvides(interfaces.IPluginFactory)
|
||||
|
||||
description = "Null Installer"
|
||||
hidden = True
|
||||
|
||||
# pylint: disable=missing-docstring,no-self-use
|
||||
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ class PickPluginTest(unittest.TestCase):
|
|||
|
||||
def test_no_default(self):
|
||||
self._call()
|
||||
self.assertEqual(1, self.reg.ifaces.call_count)
|
||||
self.assertEqual(1, self.reg.visible().ifaces.call_count)
|
||||
|
||||
def test_no_candidate(self):
|
||||
self.assertTrue(self._call() is None)
|
||||
|
|
@ -94,7 +94,8 @@ class PickPluginTest(unittest.TestCase):
|
|||
plugin_ep.init.return_value = "foo"
|
||||
plugin_ep.misconfigured = False
|
||||
|
||||
self.reg.ifaces().verify().available.return_value = {"bar": plugin_ep}
|
||||
self.reg.visible().ifaces().verify().available.return_value = {
|
||||
"bar": plugin_ep}
|
||||
self.assertEqual("foo", self._call())
|
||||
|
||||
def test_single_misconfigured(self):
|
||||
|
|
@ -102,13 +103,14 @@ class PickPluginTest(unittest.TestCase):
|
|||
plugin_ep.init.return_value = "foo"
|
||||
plugin_ep.misconfigured = True
|
||||
|
||||
self.reg.ifaces().verify().available.return_value = {"bar": plugin_ep}
|
||||
self.reg.visible().ifaces().verify().available.return_value = {
|
||||
"bar": plugin_ep}
|
||||
self.assertTrue(self._call() is None)
|
||||
|
||||
def test_multiple(self):
|
||||
plugin_ep = mock.MagicMock()
|
||||
plugin_ep.init.return_value = "foo"
|
||||
self.reg.ifaces().verify().available.return_value = {
|
||||
self.reg.visible().ifaces().verify().available.return_value = {
|
||||
"bar": plugin_ep,
|
||||
"baz": plugin_ep,
|
||||
}
|
||||
|
|
@ -119,7 +121,7 @@ class PickPluginTest(unittest.TestCase):
|
|||
[plugin_ep, plugin_ep], self.question)
|
||||
|
||||
def test_choose_plugin_none(self):
|
||||
self.reg.ifaces().verify().available.return_value = {
|
||||
self.reg.visible().ifaces().verify().available.return_value = {
|
||||
"bar": None,
|
||||
"baz": None,
|
||||
}
|
||||
|
|
|
|||
1
setup.py
1
setup.py
|
|
@ -118,7 +118,6 @@ setup(
|
|||
],
|
||||
'letsencrypt.plugins': [
|
||||
'manual = letsencrypt.plugins.manual:Authenticator',
|
||||
# TODO: null should probably not be presented to the user
|
||||
'null = letsencrypt.plugins.null:Installer',
|
||||
'standalone = letsencrypt.plugins.standalone.authenticator'
|
||||
':StandaloneAuthenticator',
|
||||
|
|
|
|||
Loading…
Reference in a new issue