python-awscrt/skip-testing-sha1.patch

41 lines
1.6 KiB
Diff
Raw Permalink Normal View History

diff --git a/test/test_crypto.py b/test/test_crypto.py
index 008b164..d0acfdd 100644
--- a/test/test_crypto.py
+++ b/test/test_crypto.py
@@ -192,15 +192,11 @@ class TestCredentials(NativeResourceTest):
def test_rsa_signing_roundtrip(self):
param_list = [RSASignatureAlgorithm.PKCS1_5_SHA256,
- RSASignatureAlgorithm.PSS_SHA256,
- RSASignatureAlgorithm.PKCS1_5_SHA1]
+ RSASignatureAlgorithm.PSS_SHA256]
for p in param_list:
with self.subTest(msg="RSA Signing Roundtrip using algo p", p=p):
- if (p == RSASignatureAlgorithm.PKCS1_5_SHA1):
- h = Hash.sha1_new()
- else:
- h = Hash.sha256_new()
+ h = Hash.sha256_new()
h.update(b'totally original test string')
digest = h.digest()
@@ -213,15 +209,11 @@ class TestCredentials(NativeResourceTest):
def test_rsa_signing_roundtrip_der(self):
param_list = [RSASignatureAlgorithm.PKCS1_5_SHA256,
- RSASignatureAlgorithm.PSS_SHA256,
- RSASignatureAlgorithm.PKCS1_5_SHA1]
+ RSASignatureAlgorithm.PSS_SHA256]
for p in param_list:
with self.subTest(msg="RSA Signing Roundtrip using algo p", p=p):
- if (p == RSASignatureAlgorithm.PKCS1_5_SHA1):
- h = Hash.sha1_new()
- else:
- h = Hash.sha256_new()
+ h = Hash.sha256_new()
h.update(b'totally original test string')
digest = h.digest()