Skip to content

Commit

Permalink
Merge pull request #1 from peteris-zealid/patch-1
Browse files Browse the repository at this point in the history
Provide example for key generation
  • Loading branch information
MatthiasValvekens authored Jul 4, 2022
2 parents 638e30b + 43acf47 commit c742352
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion certomancer/registry/keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ def _load(self):
else:
private, public = load_private_key(key_bytes, self.password)
except Exception as e:
raise IOError(f"Failed to load key in {self.path}") from e
raise IOError(
f"Failed to load key in {self.path}.\nGenerate one with "
f"`openssl genrsa -out {repr(self.path)}` (RSA example) "
f"or another appropriate tool."
) from e
self._key = AsymKey(public=public, private=private)

@property
Expand Down

0 comments on commit c742352

Please sign in to comment.