From 347351f5b6cef7fbaa33ab8c7a72999deed9de26 Mon Sep 17 00:00:00 2001 From: redshiftzero Date: Sun, 19 May 2019 05:54:37 -0700 Subject: 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 --- tests/x509/test_x509_ext.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'tests') 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 -- cgit v1.2.3