From 887a40805a29b93907b48c9d27c38b4460f2e244 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Fri, 3 Jul 2015 04:29:03 -0400 Subject: Added a test with two extensions, and added key usage support to the frontend --- src/cryptography/x509.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/cryptography/x509.py b/src/cryptography/x509.py index 668bc2ef..afd28f20 100644 --- a/src/cryptography/x509.py +++ b/src/cryptography/x509.py @@ -1472,6 +1472,8 @@ class CertificateSigningRequestBuilder(object): extension = Extension( OID_SUBJECT_ALTERNATIVE_NAME, critical, extension ) + elif isinstance(extension, KeyUsage): + extension = Extension(OID_KEY_USAGE, critical, extension) else: raise NotImplementedError('Unsupported X.509 extension.') # TODO: This is quadratic in the number of extensions -- cgit v1.2.3