aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/development/test-vectors.rst18
-rw-r--r--docs/x509.rst105
2 files changed, 120 insertions, 3 deletions
diff --git a/docs/development/test-vectors.rst b/docs/development/test-vectors.rst
index b4f23eda..0bd1f69e 100644
--- a/docs/development/test-vectors.rst
+++ b/docs/development/test-vectors.rst
@@ -22,7 +22,7 @@ Asymmetric ciphers
* RSA FIPS 186-2 and PKCS1 v1.5 vulnerability test vectors from `NIST CAVP`_.
* FIPS 186-2 and FIPS 186-3 DSA test vectors from `NIST CAVP`_.
* FIPS 186-2 and FIPS 186-3 ECDSA test vectors from `NIST CAVP`_.
-* DH and ECDH test vectors from `NIST CAVP`_.
+* DH and ECDH and ECDH+KDF(17.4) test vectors from `NIST CAVP`_.
* Ed25519 test vectors from the `Ed25519 website_`.
* OpenSSL PEM RSA serialization vectors from the `OpenSSL example key`_ and
`GnuTLS key parsing tests`_.
@@ -234,6 +234,22 @@ Custom X.509 Request Vectors
2048 bit key containing a basic constraints extension marked as
critical.
+Custom X.509 Certificate Revocation List Vectors
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+* ``crl_all_reasons.pem`` - Contains a CRL with 12 revoked certificates, whose
+ serials match their list position. It includes one revocation without
+ any entry extensions, 10 revocations with every supported reason code and one
+ revocation with an unsupported, non-critical entry extension with the OID
+ value set to "1.2.3.4".
+* ``crl_dup_entry_ext.pem`` - Contains a CRL with one revocation which has a
+ duplicate entry extension.
+* ``crl_md2_unknown_crit_entry_ext.pem`` - Contains a CRL with one revocation
+ which contains an unsupported critical entry extension with the OID value set
+ to "1.2.3.4". The CRL uses an unsupported MD2 signature algorithm.
+* ``crl_unsupported_reason.pem`` - Contains a CRL with one revocation which has
+ an unsupported reason code.
+
Hashes
~~~~~~
diff --git a/docs/x509.rst b/docs/x509.rst
index 5e4d9bfa..bdcd60b1 100644
--- a/docs/x509.rst
+++ b/docs/x509.rst
@@ -208,7 +208,7 @@ X.509 Certificate Object
:class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm`
that will be used to generate the fingerprint.
- :return bytes: The fingerprint using the supplied hash algorithm as
+ :return bytes: The fingerprint using the supplied hash algorithm, as
bytes.
.. doctest::
@@ -335,6 +335,61 @@ X.509 Certificate Object
:return bytes: The data that can be written to a file or sent
over the network to be verified by clients.
+X.509 CRL (Certificate Revocation List) Object
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. class:: CertificateRevocationList
+
+ .. versionadded:: 1.0
+
+ .. method:: fingerprint(algorithm)
+
+ :param algorithm: The
+ :class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm`
+ that will be used to generate the fingerprint.
+
+ :return bytes: The fingerprint using the supplied hash algorithm, as
+ bytes.
+
+ .. attribute:: signature_hash_algorithm
+
+ :type: :class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm`
+
+ Returns the
+ :class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm` which
+ was used in signing this CRL.
+
+ .. attribute:: issuer
+
+ :type: :class:`Name`
+
+ The :class:`Name` of the issuer.
+
+ .. attribute:: next_update
+
+ :type: :class:`datetime.datetime`
+
+ A naïve datetime representing when the next update to this CRL is
+ expected.
+
+ .. attribute:: last_update
+
+ :type: :class:`datetime.datetime`
+
+ A naïve datetime representing when the this CRL was last updated.
+
+ .. attribute:: revoked_certificates
+
+ :type: list of :class:`RevokedCertificate`
+
+ The revoked certificates listed in this CRL.
+
+ .. attribute:: extensions
+
+ :type: :class:`Extensions`
+
+ The extensions encoded in the CRL.
+
X.509 CSR (Certificate Signing Request) Object
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -388,6 +443,30 @@ X.509 CSR (Certificate Signing Request) Object
over the network to be signed by the certificate
authority.
+X.509 Revoked Certificate Object
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. class:: RevokedCertificate
+
+ .. versionadded:: 1.0
+
+ .. attribute:: serial_number
+
+ :type: :class:`int`
+
+ An integer representing the serial number of the revoked certificate.
+
+ .. attribute:: revocation_date
+
+ :type: :class:`datetime.datetime`
+
+ A naïve datetime representing the date this certificates was revoked.
+
+ .. attribute:: extensions
+
+ :type: :class:`Extensions`
+
+ The extensions encoded in the revoked certificate.
.. class:: Name
@@ -724,7 +803,7 @@ X.509 Extensions
.. class:: OCSPNoCheck
- .. versionadded:: 0.10
+ .. versionadded:: 1.0
This presence of this extension indicates that an OCSP client can trust a
responder for the lifetime of the responder's certificate. CAs issuing
@@ -930,6 +1009,24 @@ X.509 Extensions
removed from the CRL. This reason cannot be used as a reason flag
in a :class:`DistributionPoint`.
+.. class:: InhibitAnyPolicy
+
+ .. versionadded:: 1.0
+
+ The inhibit ``anyPolicy`` extension indicates that the special OID
+ :data:`OID_ANY_POLICY`, is not considered an explicit match for other
+ :class:`CertificatePolicies` except when it appears in an intermediate
+ self-issued CA certificate. The value indicates the number of additional
+ non-self-issued certificates that may appear in the path before
+ :data:`OID_ANY_POLICY` is no longer permitted. For example, a value
+ of one indicates that :data:`OID_ANY_POLICY` may be processed in
+ certificates issued by the subject of this certificate, but not in
+ additional certificates in the path.
+
+ .. attribute:: skip_certs
+
+ :type: int
+
.. class:: CertificatePolicies
.. versionadded:: 0.9
@@ -1221,6 +1318,10 @@ Policy Qualifier OIDs
Corresponds to the dotted string ``"1.3.6.1.5.5.7.2.2"``.
+.. data:: OID_ANY_POLICY
+
+ Corresponds to the dotted string ``"2.5.29.32.0"``.
+
.. _extension_oids:
Extension OIDs