aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/primitives/test_asym_utils.py
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-12-06 23:17:23 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-12-06 23:17:23 -0600
commit73251faf2cb043dc9795b46c98c7084482d2aed2 (patch)
tree3ba6a0affac68bdb282742d8cc22e3ef40cb90c8 /tests/hazmat/primitives/test_asym_utils.py
parentd5fe4ba989f1c8ff5494fee3f6404a14456eac8d (diff)
downloadcryptography-73251faf2cb043dc9795b46c98c7084482d2aed2.tar.gz
cryptography-73251faf2cb043dc9795b46c98c7084482d2aed2.tar.bz2
cryptography-73251faf2cb043dc9795b46c98c7084482d2aed2.zip
catch PyAsn1Error when decoding rfc6979 signature
Diffstat (limited to 'tests/hazmat/primitives/test_asym_utils.py')
-rw-r--r--tests/hazmat/primitives/test_asym_utils.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/hazmat/primitives/test_asym_utils.py b/tests/hazmat/primitives/test_asym_utils.py
index f8a67b68..640b5b3d 100644
--- a/tests/hazmat/primitives/test_asym_utils.py
+++ b/tests/hazmat/primitives/test_asym_utils.py
@@ -39,3 +39,8 @@ def test_rfc6979_signature():
def test_decode_rfc6979_trailing_bytes():
with pytest.raises(ValueError):
decode_rfc6979_signature(b"0\x06\x02\x01\x01\x02\x01\x01\x00\x00\x00")
+
+
+def test_decode_rfc6979_invalid_asn1():
+ with pytest.raises(ValueError):
+ decode_rfc6979_signature(b"0\x07\x02\x01\x01\x02\x02\x01")