mirror of
https://github.com/certbot/certbot.git
synced 2026-07-28 00:35:50 +02:00
Rename --simple-http-port to --http-01-port
This commit is contained in:
@@ -132,8 +132,8 @@ s.serve_forever()" """
|
||||
# same server: default command doesn't support virtual hosts
|
||||
response, validation = achall.response_and_validation()
|
||||
|
||||
port = (response.port if self.config.simple_http_port is None
|
||||
else int(self.config.simple_http_port))
|
||||
port = (response.port if self.config.http01_port is None
|
||||
else int(self.config.http01_port))
|
||||
command = self.CMD_TEMPLATE.format(
|
||||
root=self._root, achall=achall, response=response,
|
||||
# TODO(kuba): pipes still necessary?
|
||||
@@ -174,7 +174,7 @@ s.serve_forever()" """
|
||||
|
||||
if response.simple_verify(
|
||||
achall.chall, achall.domain,
|
||||
achall.account_key.public_key(), self.config.simple_http_port):
|
||||
achall.account_key.public_key(), self.config.http01_port):
|
||||
return response
|
||||
else:
|
||||
logger.error(
|
||||
|
||||
@@ -23,13 +23,13 @@ class AuthenticatorTest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
from letsencrypt.plugins.manual import Authenticator
|
||||
self.config = mock.MagicMock(
|
||||
simple_http_port=8080, manual_test_mode=False)
|
||||
http01_port=8080, manual_test_mode=False)
|
||||
self.auth = Authenticator(config=self.config, name="manual")
|
||||
self.achalls = [achallenges.KeyAuthorizationAnnotatedChallenge(
|
||||
challb=acme_util.HTTP01_P, domain="foo.com", account_key=KEY)]
|
||||
|
||||
config_test_mode = mock.MagicMock(
|
||||
simple_http_port=8080, manual_test_mode=True)
|
||||
http01_port=8080, manual_test_mode=True)
|
||||
self.auth_test_mode = Authenticator(
|
||||
config=config_test_mode, name="manual")
|
||||
|
||||
|
||||
@@ -185,7 +185,7 @@ class Authenticator(common.Plugin):
|
||||
def _necessary_ports(self):
|
||||
necessary_ports = set()
|
||||
if challenges.HTTP01 in self.supported_challenges:
|
||||
necessary_ports.add(self.config.simple_http_port)
|
||||
necessary_ports.add(self.config.http01_port)
|
||||
if challenges.DVSNI in self.supported_challenges:
|
||||
necessary_ports.add(self.config.dvsni_port)
|
||||
return necessary_ports
|
||||
@@ -238,7 +238,7 @@ class Authenticator(common.Plugin):
|
||||
for achall in achalls:
|
||||
if isinstance(achall.chall, challenges.HTTP01):
|
||||
server = self.servers.run(
|
||||
self.config.simple_http_port, challenges.HTTP01)
|
||||
self.config.http01_port, challenges.HTTP01)
|
||||
response, validation = achall.response_and_validation()
|
||||
self.simple_http_resources.add(
|
||||
acme_standalone.HTTP01RequestHandler.HTTP01Resource(
|
||||
|
||||
@@ -92,7 +92,7 @@ class AuthenticatorTest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
from letsencrypt.plugins.standalone import Authenticator
|
||||
self.config = mock.MagicMock(
|
||||
dvsni_port=1234, simple_http_port=4321,
|
||||
dvsni_port=1234, http01_port=4321,
|
||||
standalone_supported_challenges="dvsni,http-01")
|
||||
self.auth = Authenticator(self.config, name="standalone")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user