aboutsummaryrefslogtreecommitdiffstats
path: root/docs/x509/reference.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/x509/reference.rst')
-rw-r--r--docs/x509/reference.rst16
1 files changed, 15 insertions, 1 deletions
diff --git a/docs/x509/reference.rst b/docs/x509/reference.rst
index 9f9526e2..eda6378f 100644
--- a/docs/x509/reference.rst
+++ b/docs/x509/reference.rst
@@ -401,6 +401,19 @@ X.509 CRL (Certificate Revocation List) Object
.. versionadded:: 1.0
+ A CertificateRevocationList is an object representing a list of revoked
+ certificates. The object is iterable and will yield the RevokedCertificate
+ objects stored in this CRL.
+
+ .. doctest::
+ >>> len(crl)
+ 1
+ >>> type(crl[0])
+ <class 'cryptography.hazmat.backends.openssl.x509._RevokedCertificate'>
+ >>> for r in crl:
+ ... print(r.serial_number)
+ 0
+
.. method:: fingerprint(algorithm)
:param algorithm: The
@@ -706,7 +719,8 @@ X.509 Revoked Certificate Object
.. doctest::
- >>> crl.revoked_certificates[0].serial_number
+ >>> revoked_certificate = crl.revoked_certificates[0]
+ >>> revoked_certificate.serial_number
0
.. attribute:: revocation_date