aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_x509.py
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2015-12-22 17:20:42 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2015-12-22 19:49:01 -0600
commit2587d309fa162195b2bb55677d53c2db52bef9dd (patch)
tree802223e090f7e67da0a4e1e72649a2600e80034d /tests/test_x509.py
parent326833d9fdbeaec8a810efdbd51d857b339c4bba (diff)
downloadcryptography-2587d309fa162195b2bb55677d53c2db52bef9dd.tar.gz
cryptography-2587d309fa162195b2bb55677d53c2db52bef9dd.tar.bz2
cryptography-2587d309fa162195b2bb55677d53c2db52bef9dd.zip
add support for parsing AuthorityInfoAccess and IssuerAltName CRL exts
Expand the CRL extensions test to check the value
Diffstat (limited to 'tests/test_x509.py')
-rw-r--r--tests/test_x509.py21
1 files changed, 18 insertions, 3 deletions
diff --git a/tests/test_x509.py b/tests/test_x509.py
index 8d943225..b39e1891 100644
--- a/tests/test_x509.py
+++ b/tests/test_x509.py
@@ -175,8 +175,8 @@ class TestCertificateRevocationList(object):
def test_extensions(self, backend):
crl = _load_cert(
- os.path.join("x509", "PKITS_data", "crls", "GoodCACRL.crl"),
- x509.load_der_x509_crl,
+ os.path.join("x509", "custom", "crl_ian_aia_aki.pem"),
+ x509.load_pem_x509_crl,
backend
)
@@ -186,15 +186,30 @@ class TestCertificateRevocationList(object):
aki = crl.extensions.get_extension_for_class(
x509.AuthorityKeyIdentifier
)
+ aia = crl.extensions.get_extension_for_class(
+ x509.AuthorityInformationAccess
+ )
+ ian = crl.extensions.get_extension_for_class(
+ x509.IssuerAlternativeName
+ )
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'
+ b'yu\xbb\x84:\xcb,\xdez\t\xbe1\x1bC\xbc\x1c*MSX'
),
authority_cert_issuer=None,
authority_cert_serial_number=None
)
+ assert aia.value == x509.AuthorityInformationAccess([
+ x509.AccessDescription(
+ AuthorityInformationAccessOID.CA_ISSUERS,
+ x509.DNSName(u"cryptography.io")
+ )
+ ])
+ assert ian.value == x509.IssuerAlternativeName([
+ x509.UniformResourceIdentifier(u"https://cryptography.io"),
+ ])
def test_signature(self, backend):
crl = _load_cert(