From 7058eced3a27115f721887e836d16ee4fe4c7e9d Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Fri, 25 Dec 2015 22:28:29 -0600 Subject: switch CRLReason to use a class --- docs/x509/reference.rst | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/x509/reference.rst b/docs/x509/reference.rst index 1f25ac14..51de0747 100644 --- a/docs/x509/reference.rst +++ b/docs/x509/reference.rst @@ -908,7 +908,7 @@ X.509 Revoked Certificate Object >>> for ext in revoked_certificate.extensions: ... print(ext) , critical=False, value=2015-01-01 00:00:00)> - , critical=False, value=ReasonFlags.key_compromise)> + , critical=False, value=)> X.509 Revoked Certificate Builder ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -1989,6 +1989,28 @@ These extensions are only valid within a :class:`RevokedCertificate` object. :returns: A list of values extracted from the matched general names. The type of the returned values depends on the :class:`GeneralName`. +.. class:: CRLReason(reason) + + .. versionadded:: 1.2 + + CRL reason (also known as ``reasonCode``) is an extension that is only + valid inside :class:`~cryptography.x509.RevokedCertificate` objects. It + identifies a reason for the certificate revocation. + + :param reason: A value from the + :class:`~cryptography.x509.oid.CRLEntryExtensionOID` enum. + + .. attribute:: oid + + :type: :class:`ObjectIdentifier` + + Returns + :attr:`~cryptography.x509.oid.CRLEntryExtensionOID.CRL_REASON`. + + .. attribute:: reason + + :type: An element from :class:`~cryptography.x509.ReasonFlags` + Object Identifiers ~~~~~~~~~~~~~~~~~~ -- cgit v1.2.3