Skip to content

Commit

Permalink
Remove deprecated SSlibSigner
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Puehringer <[email protected]>
  • Loading branch information
lukpueh committed Apr 10, 2024
1 parent 57f36ae commit 9e6c2cc
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 131 deletions.
1 change: 0 additions & 1 deletion securesystemslib/signer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
SpxSigner,
generate_spx_key_pair,
)
from securesystemslib.signer._sslib_signer import SSlibSigner

# Register supported private key uri schemes and the Signers implementing them
SIGNER_FOR_URI_SCHEME.update(
Expand Down
14 changes: 2 additions & 12 deletions securesystemslib/signer/_signer.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Signer(metaclass=ABCMeta):
Usage example::
signer = Signer.from_priv_key_uri("envvar:MYPRIVKEY", pub_key)
signer = Signer.from_priv_key_uri(uri, pub_key)
sig = signer.sign(b"data")
Note that signer implementations may raise errors (during both
Expand All @@ -39,11 +39,7 @@ class Signer(metaclass=ABCMeta):
Applications should use generic try-except here if unexpected raises are
not an option.
See ``SIGNER_FOR_URI_SCHEME`` for supported private key URI schemes. The
currently supported default schemes are:
* envvar: see ``SSlibSigner`` for details
* file: see ``SSlibSigner`` for details
See ``SIGNER_FOR_URI_SCHEME`` for supported private key URI schemes.
Interactive applications may also define a secrets handler that allows
asking for user secrets if they are needed::
Expand All @@ -53,14 +49,8 @@ class Signer(metaclass=ABCMeta):
def sec_handler(secret_name:str) -> str:
return getpass(f"Enter {secret_name}: ")
# user will not be asked for a passphrase for unencrypted key
uri = "file:keys/mykey?encrypted=false"
signer = Signer.from_priv_key_uri(uri, pub_key, sec_handler)
# user will be asked for a passphrase for encrypted key
uri2 = "file:keys/myenckey?encrypted=true"
signer2 = Signer.from_priv_key_uri(uri2, pub_key2, sec_handler)
Applications can provide their own Signer and Key implementations::
from securesystemslib.signer import Signer, SIGNER_FOR_URI_SCHEME
Expand Down
118 changes: 0 additions & 118 deletions securesystemslib/signer/_sslib_signer.py

This file was deleted.

0 comments on commit 9e6c2cc

Please sign in to comment.