aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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