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:
Felix Fontein
2021-03-22 07:30:06 +01:00
committed by GitHub
parent e85554827f
commit f5fd5fdf5b
7 changed files with 29 additions and 31 deletions

View File

@@ -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)