mirror of
https://github.com/moepman/acertmgr.git
synced 2024-06-14 14:02:35 +02:00
authority.v2: Check challenge return code on validation as well
This commit is contained in:
parent
bc991f12d1
commit
7475d5e73f
|
@ -208,11 +208,11 @@ class ACMEAuthority(AbstractACMEAuthority):
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
code, challenge_status, _ = self._request_acme_url(authorization['_challenge']['url'])
|
code, challenge_status, _ = self._request_acme_url(authorization['_challenge']['url'])
|
||||||
|
|
||||||
if challenge_status.get('status') == "valid":
|
if code < 400 and challenge_status.get('status') == "valid":
|
||||||
log("{0} verified".format(authorization['_domain']))
|
log("{0} verified".format(authorization['_domain']))
|
||||||
else:
|
else:
|
||||||
raise ValueError("{0} challenge did not pass: {1}".format(
|
raise ValueError("{0} challenge did not pass ({1}): {2}".format(
|
||||||
authorization['_domain'], challenge_status))
|
authorization['_domain'], code, challenge_status))
|
||||||
finally:
|
finally:
|
||||||
challenge_handlers[authorization['_domain']].stop_challenge(authorization['identifier']['value'],
|
challenge_handlers[authorization['_domain']].stop_challenge(authorization['identifier']['value'],
|
||||||
account_thumbprint,
|
account_thumbprint,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user