Skip to content

Commit

Permalink
Provide example for key generation
Browse files Browse the repository at this point in the history
Co-authored-by: Matthias Valvekens <matthias@mvalvekens.be>
  • Loading branch information
peteris-zealid and MatthiasValvekens committed Jul 4, 2022
1 parent 638e30b commit 43acf47
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 43acf47

Please sign in to comment.