aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_x509.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2015-12-22 10:54:25 -0500
committerAlex Gaynor <alex.gaynor@gmail.com>2015-12-22 10:54:25 -0500
commitd05b0bd046be891957db6c8b1f78de492230d211 (patch)
treecc378c7a4971b3c7e2b9e68ca97e0f664d4f36f4 /tests/test_x509.py
parent1f32f2d28fd67e0671d2710c550c1044b7588acc (diff)
parent109237fd0a165966abcb2e6a8c687e7280483647 (diff)
downloadcryptography-d05b0bd046be891957db6c8b1f78de492230d211.tar.gz
cryptography-d05b0bd046be891957db6c8b1f78de492230d211.tar.bz2
cryptography-d05b0bd046be891957db6c8b1f78de492230d211.zip
Merge pull request #2543 from reaperhulk/crl-extensions
support parsing CRL extensions in the OpenSSL backend
Diffstat (limited to 'tests/test_x509.py')
-rw-r--r--tests/test_x509.py22
1 files changed, 17 insertions, 5 deletions
diff --git a/tests/test_x509.py b/tests/test_x509.py
index 27ce21e2..8d943225 100644
--- a/tests/test_x509.py
+++ b/tests/test_x509.py
@@ -175,14 +175,26 @@ class TestCertificateRevocationList(object):
def test_extensions(self, backend):
crl = _load_cert(
- os.path.join("x509", "custom", "crl_all_reasons.pem"),
- x509.load_pem_x509_crl,
+ os.path.join("x509", "PKITS_data", "crls", "GoodCACRL.crl"),
+ x509.load_der_x509_crl,
backend
)
- # CRL extensions are currently not supported in the OpenSSL backend.
- with pytest.raises(NotImplementedError):
- crl.extensions
+ crl_number = crl.extensions.get_extension_for_oid(
+ ExtensionOID.CRL_NUMBER
+ )
+ aki = crl.extensions.get_extension_for_class(
+ x509.AuthorityKeyIdentifier
+ )
+ assert crl_number.value == 1
+ assert crl_number.critical is False
+ assert aki.value == x509.AuthorityKeyIdentifier(
+ key_identifier=(
+ b'X\x01\x84$\x1b\xbc+R\x94J=\xa5\x10r\x14Q\xf5\xaf:\xc9'
+ ),
+ authority_cert_issuer=None,
+ authority_cert_serial_number=None
+ )
def test_signature(self, backend):
crl = _load_cert(