mirror of
https://github.com/certbot/certbot.git
synced 2026-08-02 00:22:28 +02:00
Stop calling things that don't implement IAuthenticator authenticators.
This commit is contained in:
@@ -1152,15 +1152,15 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator):
|
|||||||
"""
|
"""
|
||||||
self._chall_out.update(achalls)
|
self._chall_out.update(achalls)
|
||||||
responses = [None] * len(achalls)
|
responses = [None] * len(achalls)
|
||||||
authenticator = tls_sni_01.ApacheTlsSni01(self)
|
chall_doer = tls_sni_01.ApacheTlsSni01(self)
|
||||||
|
|
||||||
for i, achall in enumerate(achalls):
|
for i, achall in enumerate(achalls):
|
||||||
# Currently also have authenticator hold associated index
|
# Currently also have chall_doer hold associated index of the
|
||||||
# of the challenge. This helps to put all of the responses back
|
# challenge. This helps to put all of the responses back together
|
||||||
# together when they are all complete.
|
# when they are all complete.
|
||||||
authenticator.add_chall(achall, i)
|
chall_doer.add_chall(achall, i)
|
||||||
|
|
||||||
sni_response = authenticator.perform()
|
sni_response = chall_doer.perform()
|
||||||
if sni_response:
|
if sni_response:
|
||||||
# Must restart in order to activate the challenges.
|
# Must restart in order to activate the challenges.
|
||||||
# Handled here because we may be able to load up other challenge
|
# 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
|
# place in the responses return value. All responses must be in the
|
||||||
# same order as the original challenges.
|
# same order as the original challenges.
|
||||||
for i, resp in enumerate(sni_response):
|
for i, resp in enumerate(sni_response):
|
||||||
responses[authenticator.indices[i]] = resp
|
responses[chall_doer.indices[i]] = resp
|
||||||
|
|
||||||
return responses
|
return responses
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
"""A TLS-SNI-01 authenticator for Apache"""
|
"""A class that performs TLS-SNI-01 challenges for Apache"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|||||||
@@ -574,15 +574,15 @@ class NginxConfigurator(common.Plugin):
|
|||||||
"""
|
"""
|
||||||
self._chall_out += len(achalls)
|
self._chall_out += len(achalls)
|
||||||
responses = [None] * 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):
|
for i, achall in enumerate(achalls):
|
||||||
# Currently also have authenticator hold associated index
|
# Currently also have chall_doer hold associated index of the
|
||||||
# of the challenge. This helps to put all of the responses back
|
# challenge. This helps to put all of the responses back together
|
||||||
# together when they are all complete.
|
# when they are all complete.
|
||||||
authenticator.add_chall(achall, i)
|
chall_doer.add_chall(achall, i)
|
||||||
|
|
||||||
sni_response = authenticator.perform()
|
sni_response = chall_doer.perform()
|
||||||
# Must restart in order to activate the challenges.
|
# Must restart in order to activate the challenges.
|
||||||
# Handled here because we may be able to load up other challenge types
|
# Handled here because we may be able to load up other challenge types
|
||||||
self.restart()
|
self.restart()
|
||||||
@@ -591,7 +591,7 @@ class NginxConfigurator(common.Plugin):
|
|||||||
# in the responses return value. All responses must be in the same order
|
# in the responses return value. All responses must be in the same order
|
||||||
# as the original challenges.
|
# as the original challenges.
|
||||||
for i, resp in enumerate(sni_response):
|
for i, resp in enumerate(sni_response):
|
||||||
responses[authenticator.indices[i]] = resp
|
responses[chall_doer.indices[i]] = resp
|
||||||
|
|
||||||
return responses
|
return responses
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
"""A TLS-SNI-01 authenticator for Nginx"""
|
"""A class that performs TLS-SNI-01 challenges for Nginx"""
|
||||||
|
|
||||||
import itertools
|
import itertools
|
||||||
import logging
|
import logging
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ class Addr(object):
|
|||||||
|
|
||||||
|
|
||||||
class TLSSNI01(object):
|
class TLSSNI01(object):
|
||||||
"""Abstract base for TLS-SNI-01 authenticators"""
|
"""Abstract base for TLS-SNI-01 challenge performers"""
|
||||||
|
|
||||||
def __init__(self, configurator):
|
def __init__(self, configurator):
|
||||||
self.configurator = configurator
|
self.configurator = configurator
|
||||||
|
|||||||
Reference in New Issue
Block a user