aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2016-05-29 13:13:46 -0400
committerPaul Kehrer <paul.l.kehrer@gmail.com>2016-05-29 12:13:46 -0500
commit5ce140441d971bf9ecc5f8f437c2d84ef10b61f1 (patch)
tree72f95206b67c78e2be1c426dc5254009f06aa78d
parentc6c3b6d9d50f50f7876d94899a934ecdd68bf417 (diff)
downloadcryptography-5ce140441d971bf9ecc5f8f437c2d84ef10b61f1.tar.gz
cryptography-5ce140441d971bf9ecc5f8f437c2d84ef10b61f1.tar.bz2
cryptography-5ce140441d971bf9ecc5f8f437c2d84ef10b61f1.zip
Fixed #2871 -- position docs next to the fucntion they are for (#2924)
-rw-r--r--docs/x509/reference.rst52
1 files changed, 26 insertions, 26 deletions
diff --git a/docs/x509/reference.rst b/docs/x509/reference.rst
index 399d693a..e8ce1d84 100644
--- a/docs/x509/reference.rst
+++ b/docs/x509/reference.rst
@@ -120,6 +120,14 @@ Loading Certificates
:returns: An instance of :class:`~cryptography.x509.Certificate`.
+ .. doctest::
+
+ >>> from cryptography import x509
+ >>> from cryptography.hazmat.backends import default_backend
+ >>> cert = x509.load_pem_x509_certificate(pem_data, default_backend())
+ >>> cert.serial
+ 2
+
.. function:: load_der_x509_certificate(data, backend)
.. versionadded:: 0.7
@@ -136,14 +144,6 @@ Loading Certificates
:returns: An instance of :class:`~cryptography.x509.Certificate`.
-.. doctest::
-
- >>> from cryptography import x509
- >>> from cryptography.hazmat.backends import default_backend
- >>> cert = x509.load_pem_x509_certificate(pem_data, default_backend())
- >>> cert.serial
- 2
-
Loading Certificate Revocation Lists
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -164,6 +164,15 @@ Loading Certificate Revocation Lists
:returns: An instance of
:class:`~cryptography.x509.CertificateRevocationList`.
+ .. doctest::
+
+ >>> from cryptography import x509
+ >>> from cryptography.hazmat.backends import default_backend
+ >>> from cryptography.hazmat.primitives import hashes
+ >>> crl = x509.load_pem_x509_crl(pem_crl_data, default_backend())
+ >>> isinstance(crl.signature_hash_algorithm, hashes.SHA256)
+ True
+
.. function:: load_der_x509_crl(data, backend)
.. versionadded:: 1.1
@@ -180,15 +189,6 @@ Loading Certificate Revocation Lists
:returns: An instance of
:class:`~cryptography.x509.CertificateRevocationList`.
-.. doctest::
-
- >>> from cryptography import x509
- >>> from cryptography.hazmat.backends import default_backend
- >>> from cryptography.hazmat.primitives import hashes
- >>> crl = x509.load_pem_x509_crl(pem_crl_data, default_backend())
- >>> isinstance(crl.signature_hash_algorithm, hashes.SHA256)
- True
-
Loading Certificate Signing Requests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -210,6 +210,15 @@ Loading Certificate Signing Requests
:returns: An instance of
:class:`~cryptography.x509.CertificateSigningRequest`.
+ .. doctest::
+
+ >>> from cryptography import x509
+ >>> from cryptography.hazmat.backends import default_backend
+ >>> from cryptography.hazmat.primitives import hashes
+ >>> csr = x509.load_pem_x509_csr(pem_req_data, default_backend())
+ >>> isinstance(csr.signature_hash_algorithm, hashes.SHA1)
+ True
+
.. function:: load_der_x509_csr(data, backend)
.. versionadded:: 0.9
@@ -226,15 +235,6 @@ Loading Certificate Signing Requests
:returns: An instance of
:class:`~cryptography.x509.CertificateSigningRequest`.
-.. doctest::
-
- >>> from cryptography import x509
- >>> from cryptography.hazmat.backends import default_backend
- >>> from cryptography.hazmat.primitives import hashes
- >>> csr = x509.load_pem_x509_csr(pem_req_data, default_backend())
- >>> isinstance(csr.signature_hash_algorithm, hashes.SHA1)
- True
-
X.509 Certificate Object
~~~~~~~~~~~~~~~~~~~~~~~~