aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/primitives/test_dsa.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/hazmat/primitives/test_dsa.py')
-rw-r--r--tests/hazmat/primitives/test_dsa.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/hazmat/primitives/test_dsa.py b/tests/hazmat/primitives/test_dsa.py
index c263ef2b..d1f8f341 100644
--- a/tests/hazmat/primitives/test_dsa.py
+++ b/tests/hazmat/primitives/test_dsa.py
@@ -583,6 +583,11 @@ class TestDSAVerification(object):
with pytest.raises(InvalidSignature):
verifier.verify()
+ def test_signature_not_bytes(self, backend):
+ public_key = DSA_KEY_1024.public_numbers.public_key(backend)
+ with pytest.raises(TypeError):
+ public_key.verifier(1234, hashes.SHA1())
+
def test_use_after_finalize(self, backend):
public_key = DSA_KEY_1024.public_numbers.public_key(backend)
verifier = public_key.verifier(b'fakesig', hashes.SHA1())