Skip to content

Commit

Permalink
Merge pull request #796 from lukpueh/fix-crypto-signer-doc
Browse files Browse the repository at this point in the history
Fix code snippet in CRYPTO_SIGNER.md
  • Loading branch information
lukpueh authored Apr 25, 2024
2 parents 9e9e94d + ae428dc commit 614aade
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/CRYPTO_SIGNER.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,16 @@ Compatible keys can be generated with standard tools like `openssl genpkey` (CLI
```python
from cryptography.hazmat.primitives import asymmetric, serialization

from securesystemslib.signer import SSlibKey

# Generate key pair
private_key = asymmetric.ed25519.Ed25519PrivateKey.generate()

# Deploy private key
private_pem = private_key.private_bytes(
encoding=serialization.Encoding.PEM,
format=serialization.PrivateFormat.PKCS8,
encryption_algorithm=serialization.NoEncryption()
)
with open("private.pem", "wb") as f:
f.write(private_pem)
Expand Down

0 comments on commit 614aade

Please sign in to comment.