mirror of
https://github.com/certbot/certbot.git
synced 2026-08-03 03:52:02 +02:00
took into account bmw's suggestions
This commit is contained in:
@@ -50,7 +50,9 @@ class PluginEntryPointTest(unittest.TestCase):
|
|||||||
name, PluginEntryPoint.entry_point_to_plugin_name(entry_point))
|
name, PluginEntryPoint.entry_point_to_plugin_name(entry_point))
|
||||||
|
|
||||||
def test_description(self):
|
def test_description(self):
|
||||||
self.assertEqual("LE Will Automatically Test Your Domain", self.plugin_ep.description)
|
self.assertEqual(
|
||||||
|
"Run A Standalone Webserver To Prove That You Control Domains",
|
||||||
|
self.plugin_ep.description)
|
||||||
|
|
||||||
def test_description_with_name(self):
|
def test_description_with_name(self):
|
||||||
self.plugin_ep.plugin_cls = mock.MagicMock(description="Desc")
|
self.plugin_ep.plugin_cls = mock.MagicMock(description="Desc")
|
||||||
|
|||||||
@@ -26,17 +26,13 @@ logger = logging.getLogger(__name__)
|
|||||||
class Authenticator(common.Plugin):
|
class Authenticator(common.Plugin):
|
||||||
"""Manual Authenticator.
|
"""Manual Authenticator.
|
||||||
|
|
||||||
This plugin requires user's manual intervention in setting up a HTTP
|
.. todo:: Support for `~.challenges.DVSNI`.
|
||||||
server for solving SimpleHTTP challenges and thus does not need to be
|
|
||||||
run as a privilidged process. Alternatively shows instructions on how
|
|
||||||
to use Python's built-in HTTP server and, in case of HTTPS, openssl
|
|
||||||
binary for temporary key/certificate generation.
|
|
||||||
"""
|
"""
|
||||||
zope.interface.implements(interfaces.IAuthenticator)
|
zope.interface.implements(interfaces.IAuthenticator)
|
||||||
zope.interface.classProvides(interfaces.IPluginFactory)
|
zope.interface.classProvides(interfaces.IPluginFactory)
|
||||||
# hidden = True
|
hidden = True
|
||||||
|
|
||||||
description = "Manually Edit Your Configuration"
|
description = "Manually Configure And Run A Simple Python Webserver"
|
||||||
|
|
||||||
MESSAGE_TEMPLATE = """\
|
MESSAGE_TEMPLATE = """\
|
||||||
Make sure your web server displays the following content at
|
Make sure your web server displays the following content at
|
||||||
@@ -84,7 +80,11 @@ s.serve_forever()" """
|
|||||||
pass # pragma: no cover
|
pass # pragma: no cover
|
||||||
|
|
||||||
def more_info(self): # pylint: disable=missing-docstring,no-self-use
|
def more_info(self): # pylint: disable=missing-docstring,no-self-use
|
||||||
return self.__doc__.replace("\n ", " ")
|
return ("This plugin requires user's manual intervention in setting "
|
||||||
|
"up a HTTP server for solving SimpleHTTP challenges and thus "
|
||||||
|
"does not need to be run as a privilidged process. "
|
||||||
|
"Alternatively shows instructions on how to use Python's "
|
||||||
|
"built-in HTTP server.")
|
||||||
|
|
||||||
def get_chall_pref(self, domain):
|
def get_chall_pref(self, domain):
|
||||||
# pylint: disable=missing-docstring,no-self-use,unused-argument
|
# pylint: disable=missing-docstring,no-self-use,unused-argument
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ class Authenticator(common.Plugin):
|
|||||||
zope.interface.implements(interfaces.IAuthenticator)
|
zope.interface.implements(interfaces.IAuthenticator)
|
||||||
zope.interface.classProvides(interfaces.IPluginFactory)
|
zope.interface.classProvides(interfaces.IPluginFactory)
|
||||||
|
|
||||||
description = "LE Will Automatically Test Your Domain"
|
description = "Run A Standalone Webserver To Prove That You Control Domains"
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super(Authenticator, self).__init__(*args, **kwargs)
|
super(Authenticator, self).__init__(*args, **kwargs)
|
||||||
@@ -181,7 +181,10 @@ class Authenticator(common.Plugin):
|
|||||||
self.conf("supported-challenges").split(","))
|
self.conf("supported-challenges").split(","))
|
||||||
|
|
||||||
def more_info(self): # pylint: disable=missing-docstring
|
def more_info(self): # pylint: disable=missing-docstring
|
||||||
return self.__doc__.replace("\n ", " ")
|
return("This authenticator creates its own ephemeral TCP listener "
|
||||||
|
"on the necessary port in order to respond to incoming DVSNI "
|
||||||
|
"and SimpleHTTP challenges from the certificate authority. "
|
||||||
|
"Therefore, it does not rely on any existing server program.")
|
||||||
|
|
||||||
def prepare(self): # pylint: disable=missing-docstring
|
def prepare(self): # pylint: disable=missing-docstring
|
||||||
pass
|
pass
|
||||||
|
|||||||
Reference in New Issue
Block a user