From d93e586d9b51f11fb86f2af849bd975315c0f9a9 Mon Sep 17 00:00:00 2001 From: James Kasten Date: Wed, 11 Feb 2015 21:51:25 -0800 Subject: [PATCH] cleanup from kuba cleanup --- letsencrypt/client/interfaces.py | 2 +- .../client/standalone_authenticator.py | 23 ++++++++++++++++--- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/letsencrypt/client/interfaces.py b/letsencrypt/client/interfaces.py index 8ae995d4f..9fcd95c6a 100644 --- a/letsencrypt/client/interfaces.py +++ b/letsencrypt/client/interfaces.py @@ -31,7 +31,7 @@ class IAuthenticator(zope.interface.Interface): :param list chall_list: List of namedtuple types defined in :mod:`letsencrypt.client.challenge_util` (``DvsniChall``, etc.). - :returns: Challenge responses or if it cannot be completed then: + :returns: ACME Challenge responses or if it cannot be completed then: ``None`` Authenticator can perform challenge, but can't at this time diff --git a/letsencrypt/client/standalone_authenticator.py b/letsencrypt/client/standalone_authenticator.py index 284992b1e..81c3e381f 100644 --- a/letsencrypt/client/standalone_authenticator.py +++ b/letsencrypt/client/standalone_authenticator.py @@ -11,8 +11,8 @@ import OpenSSL.SSL import zope.component import zope.interface -from letsencrypt.client import constants from letsencrypt.client import challenge_util +from letsencrypt.client import constants from letsencrypt.client import interfaces @@ -261,11 +261,21 @@ class StandaloneAuthenticator(object): # IAuthenticator method implementations follow def get_chall_pref(self, unused_domain): # pylint: disable=no-self-use - """Get challenge preferences.""" + """Get challenge preferences. + + IAuthenticator interface method get_chall_pref. + Return a list of challenge types that this authenticator + can perform for this domain. In the case of the + StandaloneAuthenticator, the only challenge type that can ever + be performed is dvsni. + + :returns: A list containing only 'dvsni'. + + """ return ["dvsni"] def perform(self, chall_list): - """Perform the challege. + """Perform the challenge. .. warning:: For the StandaloneAuthenticator, because there is no convenient @@ -274,6 +284,13 @@ class StandaloneAuthenticator(object): validations for multiple independent sets of domains, a separate StandaloneAuthenticator should be instantiated. + :param list chall_list: List of namedtuple types defined in + :mod:`letsencrypt.client.challenge_util` (``DvsniChall``, etc.) + + :returns: ACME Challenge DVSNI responses following IAuthenticator + interface. + :rtype: :class:`list` of :class`dict` + """ if self.child_pid or self.tasks: # We should not be willing to continue with perform