Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

signer: Add abstract Key class, implement private key uri scheme for Signer #456

Merged
merged 21 commits into from
Nov 30, 2022
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
warn_unused_configs = True
files =
securesystemslib/util.py,
securesystemslib/signer/*.py,
securesystemslib/storage.py,
securesystemslib/gpg/constants.py

Expand Down
9 changes: 9 additions & 0 deletions securesystemslib/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,12 @@ class StorageError(Error):
backend."""

pass # pylint: disable=unnecessary-pass


class UnverifiedSignatureError(Error):
"""Signature could not be verified: either signature was incorrect or
something failed during process (see VerificationError)"""


class VerificationError(UnverifiedSignatureError):
"""Signature could not be verified because something failed in the process"""
268 changes: 0 additions & 268 deletions securesystemslib/signer.py

This file was deleted.

15 changes: 15 additions & 0 deletions securesystemslib/signer/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"""
The Signer API

This module provides extensible interfaces for public keys and signers:
Some implementations are provided by default but more can be added by users.
"""
from securesystemslib.signer._key import KEY_FOR_TYPE_AND_SCHEME, Key, SSlibKey
from securesystemslib.signer._signature import GPGSignature, Signature
from securesystemslib.signer._signer import (
SIGNER_FOR_URI_SCHEME,
GPGSigner,
SecretsHandler,
Signer,
SSlibSigner,
)
Loading