mirror of
https://github.com/moepman/acertmgr.git
synced 2025-01-01 04:21:51 +01:00
standalone: do not attempt webdir challenge verification
webdir challenge verfication will always fail with standalone due to the server not being started immediately at the point of challenge creation.
This commit is contained in:
parent
1e5b1defa7
commit
710c42c805
@ -63,6 +63,7 @@ HTTPServer.allow_reuse_address = True
|
||||
class ChallengeHandler(WebChallengeHandler):
|
||||
def __init__(self, config):
|
||||
WebChallengeHandler.__init__(self, config)
|
||||
self._verify_challenge = False
|
||||
self.current_directory = os.getcwd()
|
||||
if "port" in config:
|
||||
port = int(config["port"])
|
||||
|
@ -14,6 +14,7 @@ from acertmgr.modes.abstract import AbstractChallengeHandler
|
||||
class ChallengeHandler(AbstractChallengeHandler):
|
||||
def __init__(self, config):
|
||||
AbstractChallengeHandler.__init__(self, config)
|
||||
self._verify_challenge = True
|
||||
self.challenge_directory = config.get("webdir", "/var/www/acme-challenge/")
|
||||
if not os.path.isdir(self.challenge_directory):
|
||||
raise FileNotFoundError("Challenge directory (%s) does not exist!" % self.challenge_directory)
|
||||
@ -30,6 +31,7 @@ class ChallengeHandler(AbstractChallengeHandler):
|
||||
|
||||
# check that the file is in place
|
||||
wellknown_url = "http://{0}/.well-known/acme-challenge/{1}".format(domain, token)
|
||||
if self._verify_challenge:
|
||||
try:
|
||||
resp = tools.get_url(wellknown_url)
|
||||
resp_data = resp.read().decode('utf8').strip()
|
||||
|
Loading…
Reference in New Issue
Block a user