From f6f238e4c037e5ef71c1d836e44448744b691192 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Fri, 11 Nov 2016 10:41:31 -0800 Subject: 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 --- tests/test_x509.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests') 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"), -- cgit v1.2.3