mirror of
https://github.com/certbot/certbot.git
synced 2026-07-27 08:09:10 +02:00
Use a different port for test mode.
This commit is contained in:
@@ -378,7 +378,10 @@ class StandaloneAuthenticator(common.Plugin):
|
||||
results_if_failure.append(False)
|
||||
if not self.tasks:
|
||||
raise ValueError("nothing for .perform() to do")
|
||||
if self.already_listening(challenges.DVSNI.PORT):
|
||||
port = challenges.DVSNI.PORT
|
||||
if self.config.test_mode:
|
||||
port = 5001
|
||||
if self.already_listening(port):
|
||||
# If we know a process is already listening on this port,
|
||||
# tell the user, and don't even attempt to bind it. (This
|
||||
# test is Linux-specific and won't indicate that the port
|
||||
@@ -386,7 +389,7 @@ class StandaloneAuthenticator(common.Plugin):
|
||||
return results_if_failure
|
||||
# Try to do the authentication; note that this creates
|
||||
# the listener subprocess via os.fork()
|
||||
if self.start_listener(challenges.DVSNI.PORT, key):
|
||||
if self.start_listener(port, key):
|
||||
return results_if_success
|
||||
else:
|
||||
# TODO: This should probably raise a DVAuthError exception
|
||||
|
||||
Reference in New Issue
Block a user