aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/primitives/test_asym_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/hazmat/primitives/test_asym_utils.py')
-rw-r--r--tests/hazmat/primitives/test_asym_utils.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/hazmat/primitives/test_asym_utils.py b/tests/hazmat/primitives/test_asym_utils.py
index b9971137..bd1fa35e 100644
--- a/tests/hazmat/primitives/test_asym_utils.py
+++ b/tests/hazmat/primitives/test_asym_utils.py
@@ -7,8 +7,8 @@ from __future__ import absolute_import, division, print_function
import pytest
from cryptography.hazmat.primitives.asymmetric.utils import (
- decode_dss_signature, decode_rfc6979_signature,
- encode_dss_signature, encode_rfc6979_signature
+ Prehashed, decode_dss_signature, decode_rfc6979_signature,
+ encode_dss_signature, encode_rfc6979_signature,
)
@@ -76,3 +76,8 @@ def test_decode_dss_invalid_asn1():
# This is the BER "end-of-contents octets," which older versions of
# pyasn1 are wrongly willing to return from top-level DER decoding.
decode_dss_signature(b"\x00\x00")
+
+
+def test_pass_invalid_prehashed_arg():
+ with pytest.raises(TypeError):
+ Prehashed(object())