diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2015-07-03 04:29:03 -0400 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2015-07-03 04:29:03 -0400 |
commit | 887a40805a29b93907b48c9d27c38b4460f2e244 (patch) | |
tree | 5bdab7833682e2ac6fb0b6392a22fc986a6ffda7 /tests | |
parent | 23cafe861f4da2d7261a41bc57801b226e6b8c1b (diff) | |
download | cryptography-887a40805a29b93907b48c9d27c38b4460f2e244.tar.gz cryptography-887a40805a29b93907b48c9d27c38b4460f2e244.tar.bz2 cryptography-887a40805a29b93907b48c9d27c38b4460f2e244.zip |
Added a test with two extensions, and added key usage support to the frontend
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_x509.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_x509.py b/tests/test_x509.py index df315cc3..ac910392 100644 --- a/tests/test_x509.py +++ b/tests/test_x509.py @@ -866,6 +866,19 @@ class TestCertificateSigningRequestBuilder(object): ).add_extension( x509.SubjectAlternativeName([x509.DNSName(u"cryptography.io")]), critical=False, + ).add_extension( + x509.KeyUsage( + digital_signature=True, + content_commitment=True, + key_encipherment=False, + data_encipherment=False, + key_agreement=False, + key_cert_sign=True, + crl_sign=False, + encipher_only=False, + decipher_only=False + ), + critical=False ) with pytest.raises(NotImplementedError): builder.sign(private_key, hashes.SHA256(), backend) |