mirror of
https://github.com/ansible-collections/community.crypto.git
synced 2026-05-07 22:03:01 +00:00
ACME exception fixes (#217)
* Fix wrong usages of ACMEProtocolException. * Add changelog fragment. * Fix error handling when content could not be decoded. * Make sure that content_json is a dict or None. * Improve acme_inspect's ACMEProtocolException handling. * Improve error handling. * Add tests. * Fix challenge error. * Add challenges tests. * Provide content if available. * Add some order tests. * Linting.
This commit is contained in:
@@ -99,7 +99,9 @@ class Order(object):
|
||||
|
||||
if self.status != 'valid':
|
||||
raise ACMEProtocolException(
|
||||
'Failed to wait for order to complete; got status "{status}"'.format(status=self.status), content_json=self.data)
|
||||
client.module,
|
||||
'Failed to wait for order to complete; got status "{status}"'.format(status=self.status),
|
||||
content_json=self.data)
|
||||
|
||||
def finalize(self, client, csr_der, wait=True):
|
||||
'''
|
||||
@@ -121,5 +123,7 @@ class Order(object):
|
||||
self.refresh(client)
|
||||
if self.status not in ['procesing', 'valid', 'invalid']:
|
||||
raise ACMEProtocolException(
|
||||
'Failed to finalize order; got status "{status}"'.format(
|
||||
status=self.status), info=info, content_json=result)
|
||||
client.module,
|
||||
'Failed to finalize order; got status "{status}"'.format(status=self.status),
|
||||
info=info,
|
||||
content_json=result)
|
||||
|
||||
Reference in New Issue
Block a user