1
0
mirror of https://github.com/certbot/certbot.git synced 2026-01-19 13:24:57 +03:00

Stop calling things that don't implement IAuthenticator authenticators.

This commit is contained in:
Erik Rose
2015-11-25 12:44:17 -05:00
parent 8147216f1a
commit e75dc96559
5 changed files with 17 additions and 17 deletions

View File

@@ -1152,15 +1152,15 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator):
"""
self._chall_out.update(achalls)
responses = [None] * len(achalls)
authenticator = tls_sni_01.ApacheTlsSni01(self)
chall_doer = tls_sni_01.ApacheTlsSni01(self)
for i, achall in enumerate(achalls):
# Currently also have authenticator hold associated index
# of the challenge. This helps to put all of the responses back
# together when they are all complete.
authenticator.add_chall(achall, i)
# Currently also have chall_doer hold associated index of the
# challenge. This helps to put all of the responses back together
# when they are all complete.
chall_doer.add_chall(achall, i)
sni_response = authenticator.perform()
sni_response = chall_doer.perform()
if sni_response:
# Must restart in order to activate the challenges.
# Handled here because we may be able to load up other challenge
@@ -1171,7 +1171,7 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator):
# place in the responses return value. All responses must be in the
# same order as the original challenges.
for i, resp in enumerate(sni_response):
responses[authenticator.indices[i]] = resp
responses[chall_doer.indices[i]] = resp
return responses

View File

@@ -1,4 +1,4 @@
"""A TLS-SNI-01 authenticator for Apache"""
"""A class that performs TLS-SNI-01 challenges for Apache"""
import os

View File

@@ -574,15 +574,15 @@ class NginxConfigurator(common.Plugin):
"""
self._chall_out += len(achalls)
responses = [None] * len(achalls)
authenticator = tls_sni_01.NginxTlsSni01(self)
chall_doer = tls_sni_01.NginxTlsSni01(self)
for i, achall in enumerate(achalls):
# Currently also have authenticator hold associated index
# of the challenge. This helps to put all of the responses back
# together when they are all complete.
authenticator.add_chall(achall, i)
# Currently also have chall_doer hold associated index of the
# challenge. This helps to put all of the responses back together
# when they are all complete.
chall_doer.add_chall(achall, i)
sni_response = authenticator.perform()
sni_response = chall_doer.perform()
# Must restart in order to activate the challenges.
# Handled here because we may be able to load up other challenge types
self.restart()
@@ -591,7 +591,7 @@ class NginxConfigurator(common.Plugin):
# in the responses return value. All responses must be in the same order
# as the original challenges.
for i, resp in enumerate(sni_response):
responses[authenticator.indices[i]] = resp
responses[chall_doer.indices[i]] = resp
return responses

View File

@@ -1,4 +1,4 @@
"""A TLS-SNI-01 authenticator for Nginx"""
"""A class that performs TLS-SNI-01 challenges for Nginx"""
import itertools
import logging

View File

@@ -136,7 +136,7 @@ class Addr(object):
class TLSSNI01(object):
"""Abstract base for TLS-SNI-01 authenticators"""
"""Abstract base for TLS-SNI-01 challenge performers"""
def __init__(self, configurator):
self.configurator = configurator