acme_certificate: make compatible to Buypass' ACME v2 testing endpoint (#60727)

* Don't unnecessarily use location from header.

* Add changelog.
pull/61099/merge
Felix Fontein 5 years ago committed by GitHub
parent 039123ec6b
commit 7f4f2506a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
bugfixes:
- "acme_certificate - improve compatibility when finalizing ACME v2 orders. Fixes problem with Buypass' ACME v2 testing endpoint."

@ -677,12 +677,10 @@ class ACMEClient(object):
if info['status'] not in [200]: if info['status'] not in [200]:
raise ModuleFailException("Error new cert: CODE: {0} RESULT: {1}".format(info['status'], result)) raise ModuleFailException("Error new cert: CODE: {0} RESULT: {1}".format(info['status'], result))
order = info['location']
status = result['status'] status = result['status']
while status not in ['valid', 'invalid']: while status not in ['valid', 'invalid']:
time.sleep(2) time.sleep(2)
result, dummy = self.account.get_request(order) result, dummy = self.account.get_request(self.order_uri)
status = result['status'] status = result['status']
if status != 'valid': if status != 'valid':

Loading…
Cancel
Save