diff options
-rw-r--r-- | docs/x509/reference.rst | 6 | ||||
-rw-r--r-- | src/cryptography/x509/extensions.py | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/docs/x509/reference.rst b/docs/x509/reference.rst index 14fc37c8..30513082 100644 --- a/docs/x509/reference.rst +++ b/docs/x509/reference.rst @@ -1871,6 +1871,12 @@ X.509 Extensions identifier. For more information about the use of this extension see :rfc:`5280`. + .. attribute:: oid + + :type: :class:`ObjectIdentifier` + + Returns :attr:`~cryptography.x509.oid.ExtensionOID.POLICY_CONSTRAINTS`. + .. attribute:: require_explicit_policy :type: int or None diff --git a/src/cryptography/x509/extensions.py b/src/cryptography/x509/extensions.py index ba9cb373..0aa67212 100644 --- a/src/cryptography/x509/extensions.py +++ b/src/cryptography/x509/extensions.py @@ -491,6 +491,8 @@ class ReasonFlags(Enum): @utils.register_interface(ExtensionType) class PolicyConstraints(object): + oid = ExtensionOID.POLICY_CONSTRAINTS + def __init__(self, require_explicit_policy, inhibit_policy_mapping): if require_explicit_policy is not None and not isinstance( require_explicit_policy, six.integer_types |