diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2016-11-11 10:41:31 -0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2016-11-11 13:41:31 -0500 |
commit | f6f238e4c037e5ef71c1d836e44448744b691192 (patch) | |
tree | a4bac5c3839f8f6214a63890e56dbf29842aa065 /src | |
parent | c816735f0e9250328e4a697c8dfb23f0aa1e584b (diff) | |
download | cryptography-f6f238e4c037e5ef71c1d836e44448744b691192.tar.gz cryptography-f6f238e4c037e5ef71c1d836e44448744b691192.tar.bz2 cryptography-f6f238e4c037e5ef71c1d836e44448744b691192.zip |
add alternate signature OID for RSA with SHA1 + test and vector (#3227)
* add alternate signature OID for RSA with SHA1 + test and vector
* mozilla is a proper noun leave me alone spellchecker
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptography/x509/oid.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cryptography/x509/oid.py b/src/cryptography/x509/oid.py index 17fa42e3..3848b89e 100644 --- a/src/cryptography/x509/oid.py +++ b/src/cryptography/x509/oid.py @@ -121,6 +121,8 @@ class NameOID(object): class SignatureAlgorithmOID(object): RSA_WITH_MD5 = ObjectIdentifier("1.2.840.113549.1.1.4") RSA_WITH_SHA1 = ObjectIdentifier("1.2.840.113549.1.1.5") + # This is an alternate OID for RSA with SHA1 that is occasionally seen + _RSA_WITH_SHA1 = ObjectIdentifier("1.3.14.3.2.29") RSA_WITH_SHA224 = ObjectIdentifier("1.2.840.113549.1.1.14") RSA_WITH_SHA256 = ObjectIdentifier("1.2.840.113549.1.1.11") RSA_WITH_SHA384 = ObjectIdentifier("1.2.840.113549.1.1.12") @@ -137,6 +139,7 @@ class SignatureAlgorithmOID(object): _SIG_OIDS_TO_HASH = { SignatureAlgorithmOID.RSA_WITH_MD5: hashes.MD5(), SignatureAlgorithmOID.RSA_WITH_SHA1: hashes.SHA1(), + SignatureAlgorithmOID._RSA_WITH_SHA1: hashes.SHA1(), SignatureAlgorithmOID.RSA_WITH_SHA224: hashes.SHA224(), SignatureAlgorithmOID.RSA_WITH_SHA256: hashes.SHA256(), SignatureAlgorithmOID.RSA_WITH_SHA384: hashes.SHA384(), |