From 7e2fbe670ac66bc77470facfd8471ba2f0e1e153 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Fri, 26 Jun 2015 17:59:05 -0500 Subject: test notimplementederror for unsupported csr extensions in backends --- src/cryptography/x509.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/cryptography/x509.py b/src/cryptography/x509.py index 21e18ddd..24d501e5 100644 --- a/src/cryptography/x509.py +++ b/src/cryptography/x509.py @@ -1468,6 +1468,10 @@ class CertificateSigningRequestBuilder(object): """ if isinstance(extension, BasicConstraints): extension = Extension(OID_BASIC_CONSTRAINTS, critical, extension) + elif isinstance(extension, SubjectAlternativeName): + extension = Extension( + OID_SUBJECT_ALTERNATIVE_NAME, critical, extension + ) else: raise NotImplementedError('Unsupported X.509 extension.') # TODO: This is quadratic in the number of extensions -- cgit v1.2.3