diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/hazmat/primitives/interfaces.rst | 52 | ||||
-rw-r--r-- | docs/index.rst | 2 | ||||
-rw-r--r-- | docs/x509.rst | 63 |
3 files changed, 58 insertions, 59 deletions
diff --git a/docs/hazmat/primitives/interfaces.rst b/docs/hazmat/primitives/interfaces.rst index 8e86546d..2dea46d2 100644 --- a/docs/hazmat/primitives/interfaces.rst +++ b/docs/hazmat/primitives/interfaces.rst @@ -696,58 +696,6 @@ Key derivation functions the provided signature does not match the expected signature. -X509 ----- - -.. class:: X509Certificate - - .. versionadded:: 0.7 - - .. attribute:: version - - :type: :class:`~cryptography.x509.X509Version` - - The certificate version as an enumeration. - - .. method:: fingerprint(algorithm) - - :param algorithm: The - :class:`~cryptography.hazmat.primitives.interfaces.HashAlgorithm` - that will be used to generate the fingerprint. - - :return bytes: The fingerprint using the supplied hash algorithm as - bytes. - - .. attribute:: serial - - :type: int - - The serial as a Python integer. - - .. method:: public_key() - - :type: - :class:`~cryptography.hazmat.primitives.interfaces.RSAPublicKey` or - :class:`~cryptography.hazmat.primitives.interfaces.DSAPublicKey` or - :class:`~cryptography.hazmat.primitives.interfaces.EllipticCurvePublicKey` - - The public key associated with the certificate. - - .. attribute:: not_valid_before - - :type: :class:`datetime.datetime` - - A naïve datetime representing the beginning of the validity period for the - certificate in UTC. This value is inclusive. - - .. attribute:: not_valid_after - - :type: :class:`datetime.datetime` - - A naïve datetime representing the end of the validity period for the - certificate in UTC. This value is inclusive. - - .. _`RSA`: https://en.wikipedia.org/wiki/RSA_(cryptosystem) .. _`Chinese remainder theorem`: https://en.wikipedia.org/wiki/Chinese_remainder_theorem .. _`DSA`: https://en.wikipedia.org/wiki/Digital_Signature_Algorithm diff --git a/docs/index.rst b/docs/index.rst index e64f567c..35f80a2d 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -62,8 +62,8 @@ The recipes layer .. toctree:: :maxdepth: 2 - x509 fernet + x509 random-numbers exceptions faq diff --git a/docs/x509.rst b/docs/x509.rst index ba52d91a..ba84f6e7 100644 --- a/docs/x509.rst +++ b/docs/x509.rst @@ -9,8 +9,9 @@ X.509 is an ITU-T standard for a `public key infrastructure`_. X.509v3 is defined in :rfc:`5280` (which obsoletes :rfc:`2459` and :rfc:`3280`). X.509 certificates are commonly used in protocols like `TLS`_. -Loading -~~~~~~~ + +Loading Certificates +~~~~~~~~~~~~~~~~~~~~ .. function:: load_pem_x509_certificate(data, backend) @@ -24,8 +25,7 @@ Loading :class:`~cryptography.hazmat.backends.interfaces.X509Backend` interface. - :returns: An instance of - :class:`~cryptography.hazmat.primitives.interfaces.X509Certificate`. + :returns: An instance of :class:`~cryptography.x509.X509Certificate`. .. function:: load_der_x509_certificate(data, backend) @@ -39,8 +39,7 @@ Loading :class:`~cryptography.hazmat.backends.interfaces.X509Backend` interface. - :returns: An instance of - :class:`~cryptography.hazmat.primitives.interfaces.X509Certificate`. + :returns: An instance of :class:`~cryptography.x509.X509Certificate`. .. testsetup:: @@ -76,6 +75,58 @@ Loading >>> cert.serial 2 +Interface +~~~~~~~~~ + +.. class:: X509Certificate + + .. versionadded:: 0.7 + + .. attribute:: version + + :type: :class:`~cryptography.x509.X509Version` + + The certificate version as an enumeration. + + .. method:: fingerprint(algorithm) + + :param algorithm: The + :class:`~cryptography.hazmat.primitives.interfaces.HashAlgorithm` + that will be used to generate the fingerprint. + + :return bytes: The fingerprint using the supplied hash algorithm as + bytes. + + .. attribute:: serial + + :type: int + + The serial as a Python integer. + + .. method:: public_key() + + :type: + :class:`~cryptography.hazmat.primitives.interfaces.RSAPublicKey` or + :class:`~cryptography.hazmat.primitives.interfaces.DSAPublicKey` or + :class:`~cryptography.hazmat.primitives.interfaces.EllipticCurvePublicKey` + + The public key associated with the certificate. + + .. attribute:: not_valid_before + + :type: :class:`datetime.datetime` + + A naïve datetime representing the beginning of the validity period for the + certificate in UTC. This value is inclusive. + + .. attribute:: not_valid_after + + :type: :class:`datetime.datetime` + + A naïve datetime representing the end of the validity period for the + certificate in UTC. This value is inclusive. + + Support Classes ~~~~~~~~~~~~~~~ |