Skip to content

Commit e6529cd

Browse files
committed
signer: fix SSlibKey error handling in verify
Key.verify_signature implementations should only raise UnverifiedSignatureError or VerificationError, even if an optional dependency is missing. This commit changes SSlibKey.verify_signature to re-raise UnsupportedLibrarError as VerificationError. Signed-off-by: Lukas Puehringer <[email protected]>
1 parent b42c815 commit e6529cd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

securesystemslib/signer/_key.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ def verify_signature(self, signature: Signature, data: bytes) -> None:
175175
exceptions.CryptoError,
176176
exceptions.FormatError,
177177
exceptions.UnsupportedAlgorithmError,
178+
exceptions.UnsupportedLibraryError,
178179
) as e:
179180
logger.info("Key %s failed to verify sig: %s", self.keyid, str(e))
180181
raise exceptions.VerificationError(

0 commit comments

Comments
 (0)