diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-04-20 22:17:39 -0500 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-04-22 14:56:41 -0500 |
commit | 4db9662ff1d25a0e5f974035c5a2b12b67cb2910 (patch) | |
tree | 7bcb803741a8fa433beda4d0357f0d12af4da380 /tests/test_x509_ext.py | |
parent | dbac0e9a074c7244ad2d25e11b4001eb49a791b4 (diff) | |
download | cryptography-4db9662ff1d25a0e5f974035c5a2b12b67cb2910.tar.gz cryptography-4db9662ff1d25a0e5f974035c5a2b12b67cb2910.tar.bz2 cryptography-4db9662ff1d25a0e5f974035c5a2b12b67cb2910.zip |
support registeredID general name in OpenSSL backend
Diffstat (limited to 'tests/test_x509_ext.py')
-rw-r--r-- | tests/test_x509_ext.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/test_x509_ext.py b/tests/test_x509_ext.py index 1283fca7..bce6781f 100644 --- a/tests/test_x509_ext.py +++ b/tests/test_x509_ext.py @@ -770,3 +770,21 @@ class TestRSASubjectAlternativeNameExtension(object): cert.extensions assert exc.value.type == 0 + + def test_registered_id(self, backend): + cert = _load_cert( + os.path.join( + "x509", "custom", "san_registered_id.pem" + ), + x509.load_pem_x509_certificate, + backend + ) + ext = cert.extensions.get_extension_for_oid( + x509.OID_SUBJECT_ALTERNATIVE_NAME + ) + assert ext is not None + assert ext.critical is False + + san = ext.value + rid = san.get_values_for_type(x509.RegisteredID) + assert rid == [x509.ObjectIdentifier("1.2.3.4")] |