aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_x509.py
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-11-26 11:10:28 -1000
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-12-15 15:49:48 -0600
commit30c5ccdfb505e33dcdaa7f248c3479e3050a70da (patch)
treec14bdd786c52ffec359f328559f8216bfa780b5f /tests/test_x509.py
parenta9d78c13ea2996c896d3dfda8b7e887c444ec4cb (diff)
downloadcryptography-30c5ccdfb505e33dcdaa7f248c3479e3050a70da.tar.gz
cryptography-30c5ccdfb505e33dcdaa7f248c3479e3050a70da.tar.bz2
cryptography-30c5ccdfb505e33dcdaa7f248c3479e3050a70da.zip
add x509v1 test
Diffstat (limited to 'tests/test_x509.py')
-rw-r--r--tests/test_x509.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_x509.py b/tests/test_x509.py
index eac8a307..0a120eba 100644
--- a/tests/test_x509.py
+++ b/tests/test_x509.py
@@ -94,3 +94,12 @@ class TestX509Certificate(object):
)
with pytest.raises(InvalidX509Version):
cert.version
+
+ def test_version_1_cert(self, backend):
+ cert = load_vectors_from_file(
+ os.path.join("x509", "v1_cert.pem"),
+ lambda pemfile: x509.load_pem_x509_certificate(
+ pemfile.read(), backend
+ )
+ )
+ assert cert.version == x509.X509Version.v1