From 83457cf270fef19446d7bead3b0eb86f6d04c4f5 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Sat, 12 Mar 2016 12:44:24 -0400 Subject: move NUMERICSTRING certificate test to test_openssl & make it more specific --- src/cryptography/hazmat/backends/openssl/decode_asn1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/cryptography/hazmat/backends/openssl/decode_asn1.py b/src/cryptography/hazmat/backends/openssl/decode_asn1.py index 67586c22..26f56d12 100644 --- a/src/cryptography/hazmat/backends/openssl/decode_asn1.py +++ b/src/cryptography/hazmat/backends/openssl/decode_asn1.py @@ -710,7 +710,7 @@ def _asn1_string_to_utf8(backend, asn1_string): buf = backend._ffi.new("unsigned char **") res = backend._lib.ASN1_STRING_to_UTF8(buf, asn1_string) if res == -1: - raise TypeError( + raise ValueError( "Unsupported ASN1 string type. Type: {0}".format(asn1_string.type) ) -- cgit v1.2.3