aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2015-12-26 12:05:51 -0500
committerAlex Gaynor <alex.gaynor@gmail.com>2015-12-26 12:05:51 -0500
commitd67d77f666417bff7ea52e2754f7a680c7a83b0c (patch)
tree796e8feff62e053b9a73626402424e322dfe48bd /docs
parent0860ef60adc7974dc26cfdd3c7adeb5e4e6e6448 (diff)
parent7058eced3a27115f721887e836d16ee4fe4c7e9d (diff)
downloadcryptography-d67d77f666417bff7ea52e2754f7a680c7a83b0c.tar.gz
cryptography-d67d77f666417bff7ea52e2754f7a680c7a83b0c.tar.bz2
cryptography-d67d77f666417bff7ea52e2754f7a680c7a83b0c.zip
Merge pull request #2579 from reaperhulk/crlentry-crlreason
switch CRLReason to use a class
Diffstat (limited to 'docs')
-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
~~~~~~~~~~~~~~~~~~