mirror of
https://github.com/moepman/acertmgr.git
synced 2024-12-29 09:21:51 +01:00
authority.v1/2: call stop_challenge even if start_challenge fails
start_challenge may raise an exception at any point. to not just destroy the challenge but also try to stop it in order to clean up anything done by start_challenge already properly
This commit is contained in:
parent
989d3b585a
commit
e12abbc3cb
@ -125,10 +125,10 @@ class ACMEAuthority(AbstractACMEAuthority):
|
||||
|
||||
# after all challenges are created, start processing authorizations
|
||||
for domain in authdomains:
|
||||
challenge_handlers[domain].start_challenge(domain, account_thumbprint, tokens[domain])
|
||||
try:
|
||||
log("Starting key authorization")
|
||||
challenge_handlers[domain].start_challenge(domain, account_thumbprint, tokens[domain])
|
||||
# notify challenge are met
|
||||
log("Starting key authorization")
|
||||
keyauthorization = "{0}.{1}".format(tokens[domain], account_thumbprint)
|
||||
code, result = self._send_signed(challenges[domain]['uri'], header, {
|
||||
"resource": "challenge",
|
||||
|
@ -196,11 +196,11 @@ class ACMEAuthority(AbstractACMEAuthority):
|
||||
|
||||
# after all challenges are created, start processing authorizations
|
||||
for authorization in authorizations:
|
||||
try:
|
||||
log("Starting verification of {}".format(authorization['_domain']))
|
||||
challenge_handlers[authorization['_domain']].start_challenge(authorization['identifier']['value'],
|
||||
account_thumbprint,
|
||||
authorization['_token'])
|
||||
try:
|
||||
# notify challenge is met
|
||||
code, challenge_status, _ = self._request_acme_url(authorization['_challenge']['url'], {
|
||||
"keyAuthorization": "{0}.{1}".format(authorization['_token'], account_thumbprint),
|
||||
|
Loading…
Reference in New Issue
Block a user