mirror of
https://github.com/ansible-collections/community.crypto.git
synced 2026-05-08 06:13:03 +00:00
acme: improve error handling in backend's parse_key() (#208)
* Improve error handling in backend's parse_key(). * Adjust unit tests.
This commit is contained in:
@@ -159,7 +159,7 @@ class ACMELegacyAccount(object):
|
||||
try:
|
||||
return None, self.client.parse_key(key_file=key_file, key_content=key_content)
|
||||
except KeyParsingError as e:
|
||||
return e.msg, None
|
||||
return e.msg, {}
|
||||
|
||||
def sign_request(self, protected, payload, key_data, encode_payload=True):
|
||||
return self.client.sign_request(protected, payload, key_data, encode_payload=encode_payload)
|
||||
|
||||
Reference in New Issue
Block a user