diff options
-rw-r--r-- | docs/x509.rst | 14 | ||||
-rw-r--r-- | src/cryptography/x509.py | 24 |
2 files changed, 19 insertions, 19 deletions
diff --git a/docs/x509.rst b/docs/x509.rst index a3426a2b..27f1d544 100644 --- a/docs/x509.rst +++ b/docs/x509.rst @@ -188,7 +188,7 @@ X.509 Certificate Object Returns the :class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm` which - was used in signing the certificate. + was used in signing this certificate. .. doctest:: @@ -365,32 +365,32 @@ Name OIDs Signature Algorithm OIDs ~~~~~~~~~~~~~~~~~~~~~~~~ -.. data:: OID_MD5_WITH_RSA_ENCRYPTION +.. data:: OID_RSA_WITH_MD5 Corresponds to the dotted string ``"1.2.840.113549.1.1.4"``. This is an MD5 digest signed by an RSA key. -.. data:: OID_SHA1_WITH_RSA_ENCRYPTION +.. data:: OID_RSA_WITH_SHA1 Corresponds to the dotted string ``"1.2.840.113549.1.1.5"``. This is a SHA1 digest signed by an RSA key. -.. data:: OID_SHA224_WITH_RSA_ENCRYPTION +.. data:: OID_RSA_WITH_SHA224 Corresponds to the dotted string ``"1.2.840.113549.1.1.14"``. This is a SHA224 digest signed by an RSA key. -.. data:: OID_SHA256_WITH_RSA_ENCRYPTION +.. data:: OID_RSA_WITH_SHA256 Corresponds to the dotted string ``"1.2.840.113549.1.1.11"``. This is a SHA256 digest signed by an RSA key. -.. data:: OID_SHA384_WITH_RSA_ENCRYPTION +.. data:: OID_RSA_WITH_SHA384 Corresponds to the dotted string ``"1.2.840.113549.1.1.12"``. This is a SHA384 digest signed by an RSA key. -.. data:: OID_SHA512_WITH_RSA_ENCRYPTION +.. data:: OID_RSA_WITH_SHA512 Corresponds to the dotted string ``"1.2.840.113549.1.1.13"``. This is a SHA512 digest signed by an RSA key. diff --git a/src/cryptography/x509.py b/src/cryptography/x509.py index 774830df..a46367ed 100644 --- a/src/cryptography/x509.py +++ b/src/cryptography/x509.py @@ -157,12 +157,12 @@ OID_PSEUDONYM = ObjectIdentifier("2.5.4.65") OID_DOMAIN_COMPONENT = ObjectIdentifier("0.9.2342.19200300.100.1.25") OID_EMAIL_ADDRESS = ObjectIdentifier("1.2.840.113549.1.9.1") -OID_MD5_WITH_RSA_ENCRYPTION = ObjectIdentifier("1.2.840.113549.1.1.4") -OID_SHA1_WITH_RSA_ENCRYPTION = ObjectIdentifier("1.2.840.113549.1.1.5") -OID_SHA224_WITH_RSA_ENCRYPTION = ObjectIdentifier("1.2.840.113549.1.1.14") -OID_SHA256_WITH_RSA_ENCRYPTION = ObjectIdentifier("1.2.840.113549.1.1.11") -OID_SHA384_WITH_RSA_ENCRYPTION = ObjectIdentifier("1.2.840.113549.1.1.12") -OID_SHA512_WITH_RSA_ENCRYPTION = ObjectIdentifier("1.2.840.113549.1.1.13") +OID_RSA_WITH_MD5 = ObjectIdentifier("1.2.840.113549.1.1.4") +OID_RSA_WITH_SHA1 = ObjectIdentifier("1.2.840.113549.1.1.5") +OID_RSA_WITH_SHA224 = ObjectIdentifier("1.2.840.113549.1.1.14") +OID_RSA_WITH_SHA256 = ObjectIdentifier("1.2.840.113549.1.1.11") +OID_RSA_WITH_SHA384 = ObjectIdentifier("1.2.840.113549.1.1.12") +OID_RSA_WITH_SHA512 = ObjectIdentifier("1.2.840.113549.1.1.13") OID_ECDSA_WITH_SHA224 = ObjectIdentifier("1.2.840.10045.4.3.1") OID_ECDSA_WITH_SHA256 = ObjectIdentifier("1.2.840.10045.4.3.2") OID_ECDSA_WITH_SHA384 = ObjectIdentifier("1.2.840.10045.4.3.3") @@ -172,12 +172,12 @@ OID_DSA_WITH_SHA224 = ObjectIdentifier("2.16.840.1.101.3.4.3.1") OID_DSA_WITH_SHA256 = ObjectIdentifier("2.16.840.1.101.3.4.3.2") _SIG_OIDS_TO_HASH = { - OID_MD5_WITH_RSA_ENCRYPTION.dotted_string: hashes.MD5(), - OID_SHA1_WITH_RSA_ENCRYPTION.dotted_string: hashes.SHA1(), - OID_SHA224_WITH_RSA_ENCRYPTION.dotted_string: hashes.SHA224(), - OID_SHA256_WITH_RSA_ENCRYPTION.dotted_string: hashes.SHA256(), - OID_SHA384_WITH_RSA_ENCRYPTION.dotted_string: hashes.SHA384(), - OID_SHA512_WITH_RSA_ENCRYPTION.dotted_string: hashes.SHA512(), + OID_RSA_WITH_MD5.dotted_string: hashes.MD5(), + OID_RSA_WITH_SHA1.dotted_string: hashes.SHA1(), + OID_RSA_WITH_SHA224.dotted_string: hashes.SHA224(), + OID_RSA_WITH_SHA256.dotted_string: hashes.SHA256(), + OID_RSA_WITH_SHA384.dotted_string: hashes.SHA384(), + OID_RSA_WITH_SHA512.dotted_string: hashes.SHA512(), OID_ECDSA_WITH_SHA224.dotted_string: hashes.SHA224(), OID_ECDSA_WITH_SHA256.dotted_string: hashes.SHA256(), OID_ECDSA_WITH_SHA384.dotted_string: hashes.SHA384(), |