Skip to content

Commit 14ee264

Browse files
authored
Merge pull request #456 from jku/privkeyuri
signer: Add abstract Key class, implement private key uri scheme for Signer
2 parents 1ffd043 + 10edc1a commit 14ee264

File tree

8 files changed

+923
-289
lines changed

8 files changed

+923
-289
lines changed

mypy.ini

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
warn_unused_configs = True
33
files =
44
securesystemslib/util.py,
5+
securesystemslib/signer/*.py,
56
securesystemslib/storage.py,
67
securesystemslib/gpg/constants.py
78

securesystemslib/exceptions.py

+9
Original file line numberDiff line numberDiff line change
@@ -138,3 +138,12 @@ class StorageError(Error):
138138
backend."""
139139

140140
pass # pylint: disable=unnecessary-pass
141+
142+
143+
class UnverifiedSignatureError(Error):
144+
"""Signature could not be verified: either signature was incorrect or
145+
something failed during process (see VerificationError)"""
146+
147+
148+
class VerificationError(UnverifiedSignatureError):
149+
"""Signature could not be verified because something failed in the process"""

securesystemslib/signer.py

-268
This file was deleted.

securesystemslib/signer/__init__.py

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"""
2+
The Signer API
3+
4+
This module provides extensible interfaces for public keys and signers:
5+
Some implementations are provided by default but more can be added by users.
6+
"""
7+
from securesystemslib.signer._key import KEY_FOR_TYPE_AND_SCHEME, Key, SSlibKey
8+
from securesystemslib.signer._signature import GPGSignature, Signature
9+
from securesystemslib.signer._signer import (
10+
SIGNER_FOR_URI_SCHEME,
11+
GPGSigner,
12+
SecretsHandler,
13+
Signer,
14+
SSlibSigner,
15+
)

0 commit comments

Comments
 (0)