From c7b29b86cd20fe62fa199eb8fb2c87f88133a5ab Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Thu, 1 Sep 2016 09:17:21 +0800 Subject: add support for signature_algorithm_oid to cert, CSR, and CRL (#3124) * add support for signature_algorithm_oid to cert, CSR, and CRL * refactor _SIG_OIDS_TO_HASH to use ObjectIdentifiers and use that --- docs/x509/reference.rst | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to 'docs/x509/reference.rst') diff --git a/docs/x509/reference.rst b/docs/x509/reference.rst index ea32c3b7..bd88b023 100644 --- a/docs/x509/reference.rst +++ b/docs/x509/reference.rst @@ -354,6 +354,22 @@ X.509 Certificate Object >>> isinstance(cert.signature_hash_algorithm, hashes.SHA256) True + .. attribute:: signature_algorithm_oid + + .. versionadded:: 1.6 + + :type: :class:`ObjectIdentifier` + + Returns the :class:`ObjectIdentifier` of the signature algorithm used + to sign the certificate. This will be one of the OIDs from + :class:`~cryptography.x509.oid.SignatureAlgorithmOID`. + + + .. doctest:: + + >>> cert.signature_algorithm_oid + + .. attribute:: extensions :type: :class:`Extensions` @@ -464,6 +480,21 @@ X.509 CRL (Certificate Revocation List) Object >>> isinstance(crl.signature_hash_algorithm, hashes.SHA256) True + .. attribute:: signature_algorithm_oid + + .. versionadded:: 1.6 + + :type: :class:`ObjectIdentifier` + + Returns the :class:`ObjectIdentifier` of the signature algorithm used + to sign the CRL. This will be one of the OIDs from + :class:`~cryptography.x509.oid.SignatureAlgorithmOID`. + + .. doctest:: + + >>> crl.signature_algorithm_oid + + .. attribute:: issuer :type: :class:`Name` @@ -711,6 +742,21 @@ X.509 CSR (Certificate Signing Request) Object >>> isinstance(csr.signature_hash_algorithm, hashes.SHA1) True + .. attribute:: signature_algorithm_oid + + .. versionadded:: 1.6 + + :type: :class:`ObjectIdentifier` + + Returns the :class:`ObjectIdentifier` of the signature algorithm used + to sign the request. This will be one of the OIDs from + :class:`~cryptography.x509.oid.SignatureAlgorithmOID`. + + .. doctest:: + + >>> csr.signature_algorithm_oid + + .. attribute:: extensions :type: :class:`Extensions` -- cgit v1.2.3