From 37b82df9e4c1397df1d878b0ee4ee7d1c3ad0ce7 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Fri, 3 Jul 2015 10:26:37 -0400 Subject: Added support for SANs in CSRs --- tests/test_x509.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests') 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( -- cgit v1.2.3