diff options
author | redshiftzero <jen@freedom.press> | 2019-05-19 05:54:37 -0700 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2019-05-19 08:54:37 -0400 |
commit | 347351f5b6cef7fbaa33ab8c7a72999deed9de26 (patch) | |
tree | dc6da04fd4ee410bbb3a289a33362eb5ca27c1f8 /tests/x509/test_x509_ext.py | |
parent | 9a22851fab924fd58482fdad3f8dd23dc3987f91 (diff) | |
download | cryptography-347351f5b6cef7fbaa33ab8c7a72999deed9de26.tar.gz cryptography-347351f5b6cef7fbaa33ab8c7a72999deed9de26.tar.bz2 cryptography-347351f5b6cef7fbaa33ab8c7a72999deed9de26.zip |
add name for ExtensionOID.PRECERT_POISON (#4853)
* test: ensure all public members of ExtensionOID have names defined
* add name for ExtensionOID.PRECERT_POISON
ref: https://github.com/google/certificate-transparency/blob/5fce65cb60cfe7808afc98de23c7dd5ddbfa1509/python/ct/crypto/asn1/oid.py#L338
Diffstat (limited to 'tests/x509/test_x509_ext.py')
-rw-r--r-- | tests/x509/test_x509_ext.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/x509/test_x509_ext.py b/tests/x509/test_x509_ext.py index 654bd13b..6a64e4aa 100644 --- a/tests/x509/test_x509_ext.py +++ b/tests/x509/test_x509_ext.py @@ -23,7 +23,7 @@ from cryptography.x509 import DNSName, NameConstraints, SubjectAlternativeName from cryptography.x509.general_name import _lazy_import_idna from cryptography.x509.oid import ( AuthorityInformationAccessOID, ExtendedKeyUsageOID, ExtensionOID, - NameOID, ObjectIdentifier + NameOID, ObjectIdentifier, _OID_NAMES ) from .test_x509 import _load_cert @@ -5215,3 +5215,10 @@ class TestOCSPNonce(object): nonce3 = x509.OCSPNonce(b"1" * 5) assert hash(nonce1) == hash(nonce2) assert hash(nonce1) != hash(nonce3) + + +def test_all_extension_oid_members_have_names_defined(): + for oid in dir(ExtensionOID): + if oid[:2] == '__': + continue + assert getattr(ExtensionOID, oid) in _OID_NAMES |