summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_pkcs1.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/test_pkcs1.py b/tests/test_pkcs1.py
index 2116284..a8afea7 100644
--- a/tests/test_pkcs1.py
+++ b/tests/test_pkcs1.py
@@ -76,7 +76,15 @@ class SignatureTest(unittest.TestCase):
message = b'je moeder'
signature = pkcs1.sign(message, self.priv, 'SHA-256')
- self.assertTrue(pkcs1.verify(message, signature, self.pub))
+ self.assertEqual('SHA-256', pkcs1.verify(message, signature, self.pub))
+
+ def test_find_signature_hash(self):
+ """Test happy flow of sign and find_signature_hash"""
+
+ message = b'je moeder'
+ signature = pkcs1.sign(message, self.priv, 'SHA-256')
+
+ self.assertEqual('SHA-256', pkcs1.find_signature_hash(signature, self.pub))
def test_alter_message(self):
"""Altering the message should let the verification fail."""