diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-07-03 09:54:43 -0500 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-07-03 09:54:43 -0500 |
commit | adb41ed19991d7f24047ba240eab9c846b7e1ace (patch) | |
tree | 276944b125d305ddbd5ac53f607d018eda59183b /tests | |
parent | 122b5ed88ce7697a3ad7baed1172a09944a2ba25 (diff) | |
parent | 37b82df9e4c1397df1d878b0ee4ee7d1c3ad0ce7 (diff) | |
download | cryptography-adb41ed19991d7f24047ba240eab9c846b7e1ace.tar.gz cryptography-adb41ed19991d7f24047ba240eab9c846b7e1ace.tar.bz2 cryptography-adb41ed19991d7f24047ba240eab9c846b7e1ace.zip |
Merge pull request #2104 from alex/csr-san
Added support for SANs in CSRs
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_x509.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_x509.py b/tests/test_x509.py index ac910392..1e0c9cdc 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( |