aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2015-07-03 10:55:33 -0400
committerAlex Gaynor <alex.gaynor@gmail.com>2015-07-03 10:55:33 -0400
commit41ca5dc240fd04928980cb85144138f579805f32 (patch)
tree7648042ec6b927fd0dfc9bcfbf3df32e18991752 /tests
parente49351193d5027f212fd6a7677e7859cc71fe6d8 (diff)
parentadb41ed19991d7f24047ba240eab9c846b7e1ace (diff)
downloadcryptography-41ca5dc240fd04928980cb85144138f579805f32.tar.gz
cryptography-41ca5dc240fd04928980cb85144138f579805f32.tar.bz2
cryptography-41ca5dc240fd04928980cb85144138f579805f32.zip
Merge branch 'master' into encode-san
Diffstat (limited to 'tests')
-rw-r--r--tests/test_x509.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_x509.py b/tests/test_x509.py
index fb74e3b1..32f29ff5 100644
--- a/tests/test_x509.py
+++ b/tests/test_x509.py
@@ -592,6 +592,20 @@ class TestRSACertificateRequest(object):
),
]
+ def test_subject_alt_name(self, backend):
+ request = _load_cert(
+ os.path.join("x509", "requests", "san_rsa_sha1.pem"),
+ x509.load_pem_x509_csr,
+ backend,
+ )
+ ext = request.extensions.get_extension_for_oid(
+ x509.OID_SUBJECT_ALTERNATIVE_NAME
+ )
+ assert list(ext.value) == [
+ x509.DNSName(u"cryptography.io"),
+ x509.DNSName(u"sub.cryptography.io"),
+ ]
+
def test_public_bytes_pem(self, backend):
# Load an existing CSR.
request = _load_cert(