aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2016-11-11 10:41:31 -0800
committerAlex Gaynor <alex.gaynor@gmail.com>2016-11-11 13:41:31 -0500
commitf6f238e4c037e5ef71c1d836e44448744b691192 (patch)
treea4bac5c3839f8f6214a63890e56dbf29842aa065 /tests
parentc816735f0e9250328e4a697c8dfb23f0aa1e584b (diff)
downloadcryptography-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 'tests')
-rw-r--r--tests/test_x509.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_x509.py b/tests/test_x509.py
index 6a999f41..f375ac55 100644
--- a/tests/test_x509.py
+++ b/tests/test_x509.py
@@ -502,6 +502,18 @@ class TestRSACertificate(object):
cert.signature_algorithm_oid == SignatureAlgorithmOID.RSA_WITH_SHA1
)
+ def test_alternate_rsa_with_sha1_oid(self, backend):
+ cert = _load_cert(
+ os.path.join("x509", "alternate-rsa-sha1-oid.pem"),
+ x509.load_pem_x509_certificate,
+ backend
+ )
+ assert isinstance(cert.signature_hash_algorithm, hashes.SHA1)
+ assert (
+ cert.signature_algorithm_oid ==
+ SignatureAlgorithmOID._RSA_WITH_SHA1
+ )
+
def test_cert_serial_number(self, backend):
cert = _load_cert(
os.path.join("x509", "PKITS_data", "certs", "GoodCACert.crt"),