aboutsummaryrefslogtreecommitdiffstats
path: root/docs/x509
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2015-12-25 22:28:29 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2015-12-26 10:10:27 -0600
commit7058eced3a27115f721887e836d16ee4fe4c7e9d (patch)
tree796e8feff62e053b9a73626402424e322dfe48bd /docs/x509
parent0860ef60adc7974dc26cfdd3c7adeb5e4e6e6448 (diff)
downloadcryptography-7058eced3a27115f721887e836d16ee4fe4c7e9d.tar.gz
cryptography-7058eced3a27115f721887e836d16ee4fe4c7e9d.tar.bz2
cryptography-7058eced3a27115f721887e836d16ee4fe4c7e9d.zip
switch CRLReason to use a class
Diffstat (limited to 'docs/x509')
-rw-r--r--docs/x509/reference.rst24
1 files changed, 23 insertions, 1 deletions
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)
<Extension(oid=<ObjectIdentifier(oid=2.5.29.24, name=invalidityDate)>, critical=False, value=2015-01-01 00:00:00)>
- <Extension(oid=<ObjectIdentifier(oid=2.5.29.21, name=cRLReason)>, critical=False, value=ReasonFlags.key_compromise)>
+ <Extension(oid=<ObjectIdentifier(oid=2.5.29.21, name=cRLReason)>, critical=False, value=<CRLReason(reason=ReasonFlags.key_compromise)>)>
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
~~~~~~~~~~~~~~~~~~