From 7f4f2506a0c2f740c859d1cb7b7b8fad76d6d3bc Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 26 Aug 2019 18:19:55 +0200 Subject: [PATCH] acme_certificate: make compatible to Buypass' ACME v2 testing endpoint (#60727) * Don't unnecessarily use location from header. * Add changelog. --- .../fragments/60727-acme_certificate-acme-compatibility.yml | 2 ++ lib/ansible/modules/crypto/acme/acme_certificate.py | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/60727-acme_certificate-acme-compatibility.yml diff --git a/changelogs/fragments/60727-acme_certificate-acme-compatibility.yml b/changelogs/fragments/60727-acme_certificate-acme-compatibility.yml new file mode 100644 index 00000000000..6b5afbadbdc --- /dev/null +++ b/changelogs/fragments/60727-acme_certificate-acme-compatibility.yml @@ -0,0 +1,2 @@ +bugfixes: +- "acme_certificate - improve compatibility when finalizing ACME v2 orders. Fixes problem with Buypass' ACME v2 testing endpoint." diff --git a/lib/ansible/modules/crypto/acme/acme_certificate.py b/lib/ansible/modules/crypto/acme/acme_certificate.py index fef92f403a4..6b3a7e10484 100644 --- a/lib/ansible/modules/crypto/acme/acme_certificate.py +++ b/lib/ansible/modules/crypto/acme/acme_certificate.py @@ -677,12 +677,10 @@ class ACMEClient(object): if info['status'] not in [200]: raise ModuleFailException("Error new cert: CODE: {0} RESULT: {1}".format(info['status'], result)) - order = info['location'] - status = result['status'] while status not in ['valid', 'invalid']: time.sleep(2) - result, dummy = self.account.get_request(order) + result, dummy = self.account.get_request(self.order_uri) status = result['status'] if status != 'valid':