aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_x509.py
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2016-03-11 23:40:12 -0400
committerPaul Kehrer <paul.l.kehrer@gmail.com>2016-03-12 09:12:02 -0400
commitab973321f6012626e63420603c34e2975f42f237 (patch)
treedc42bb4e6f69a5a0b6cdcfe5da20b001566764bf /tests/test_x509.py
parent5c66c183913b1f94930100bd0543b8533584a761 (diff)
downloadcryptography-ab973321f6012626e63420603c34e2975f42f237.tar.gz
cryptography-ab973321f6012626e63420603c34e2975f42f237.tar.bz2
cryptography-ab973321f6012626e63420603c34e2975f42f237.zip
raise type error rather than internalerror w/ unsupported asn1 in subject
Diffstat (limited to 'tests/test_x509.py')
-rw-r--r--tests/test_x509.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_x509.py b/tests/test_x509.py
index c042169c..8a801f2d 100644
--- a/tests/test_x509.py
+++ b/tests/test_x509.py
@@ -3157,6 +3157,18 @@ class TestDSACertificateRequest(object):
verifier.verify()
+@pytest.mark.requires_backend_interface(interface=X509Backend)
+class TestGOSTCertificate(object):
+ def test_numeric_string_x509_name_entry(self, backend):
+ cert = _load_cert(
+ os.path.join("x509", "e-trust.ru.der"),
+ x509.load_der_x509_certificate,
+ backend
+ )
+ with pytest.raises(TypeError):
+ cert.subject
+
+
@pytest.mark.requires_backend_interface(interface=EllipticCurveBackend)
@pytest.mark.requires_backend_interface(interface=X509Backend)
class TestECDSACertificate(object):