diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2016-09-01 09:17:21 +0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2016-08-31 21:17:21 -0400 |
commit | c7b29b86cd20fe62fa199eb8fb2c87f88133a5ab (patch) | |
tree | 4545c68e07a604e6298ca21616a0b0410b68a65d /docs | |
parent | 82548e744c6c80d90b4b51fd6096b69b6b730841 (diff) | |
download | cryptography-c7b29b86cd20fe62fa199eb8fb2c87f88133a5ab.tar.gz cryptography-c7b29b86cd20fe62fa199eb8fb2c87f88133a5ab.tar.bz2 cryptography-c7b29b86cd20fe62fa199eb8fb2c87f88133a5ab.zip |
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
Diffstat (limited to 'docs')
-rw-r--r-- | docs/x509/reference.rst | 46 |
1 files changed, 46 insertions, 0 deletions
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 + <ObjectIdentifier(oid=1.2.840.113549.1.1.11, name=sha256WithRSAEncryption)> + .. 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 + <ObjectIdentifier(oid=1.2.840.113549.1.1.11, name=sha256WithRSAEncryption)> + .. 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 + <ObjectIdentifier(oid=1.2.840.113549.1.1.5, name=sha1WithRSAEncryption)> + .. attribute:: extensions :type: :class:`Extensions` |