Skip to content

Commit

Permalink
catch overflow errors when signing with different key test
Browse files Browse the repository at this point in the history
  • Loading branch information
myheroyuki committed Jan 23, 2025
1 parent 63772a6 commit 60bc0af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_pkcs1.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def test_sign_different_key(self):

message = b"je moeder"
signature = pkcs1.sign(message, self.priv, "SHA-256")
self.assertRaises(pkcs1.VerificationError, pkcs1.verify, message, signature, otherpub)
self.assertRaises((pkcs1.VerificationError, OverflowError), pkcs1.verify, message, signature, otherpub)

def test_multiple_signings(self):
"""Signing the same message twice should return the same signatures."""
Expand Down

0 comments on commit 60bc0af

Please sign in to comment.