Skip to content

Commit

Permalink
CryptoSigner: add docstring with usage options
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Puehringer <[email protected]>
  • Loading branch information
lukpueh committed Nov 22, 2023
1 parent 28b6457 commit 0f8d337
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion securesystemslib/signer/_crypto_signer.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,26 @@ def _get_rsa_padding(


class CryptoSigner(Signer):
"""PYCA/cryptography Signer implementations."""
"""PYCA/cryptography Signer implementations.
A CryptoSigner can be created from:
a. private key file -- ``Signer.from_priv_key_uri()``
URI has the format "file:<PATH>?encrypted=[true|false]", where
PATH is the path to a file with private key data in a standard
PEM/PKCS8 format.
A related public key must be passed.
If ``encrypted=true``, the optional secrets handler is expected to
return a decryption password.
b. newly generated key pair -- ``CryptoSigner.generate_*()``
c. existing pyca/cryptography private key object -- ``CryptoSigner()``
"""

FILE_URI_SCHEME = "file"

Expand Down

0 comments on commit 0f8d337

Please sign in to comment.