From 60bc0afd7132026f196e5dc2c77375c2b57040ad Mon Sep 17 00:00:00 2001 From: myheroyuki Date: Thu, 23 Jan 2025 22:35:28 +0900 Subject: [PATCH] catch overflow errors when signing with different key test --- tests/test_pkcs1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_pkcs1.py b/tests/test_pkcs1.py index b79eab9..7f9572c 100644 --- a/tests/test_pkcs1.py +++ b/tests/test_pkcs1.py @@ -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."""