Upgrade cryptography from 2.5 to 3.3
Source code is from https://github.com/pyca/cryptography/tree/3.3.x
Run setup.py locally and rename _openssl.so/_padding.so
Bug: 205265538
Test: None
Change-Id: If031739ef5830ba2fb177add74515e4660e2906e
diff --git a/tests/wycheproof/test_dsa.py b/tests/wycheproof/test_dsa.py
index 3dc3056..9185b3e 100644
--- a/tests/wycheproof/test_dsa.py
+++ b/tests/wycheproof/test_dsa.py
@@ -23,6 +23,10 @@
@pytest.mark.requires_backend_interface(interface=DSABackend)
@pytest.mark.wycheproof_tests(
"dsa_test.json",
+ "dsa_2048_224_sha224_test.json",
+ "dsa_2048_224_sha256_test.json",
+ "dsa_2048_256_sha256_test.json",
+ "dsa_3072_256_sha256_test.json",
)
def test_dsa_signature(backend, wycheproof):
key = serialization.load_der_public_key(
@@ -30,10 +34,8 @@
)
digest = _DIGESTS[wycheproof.testgroup["sha"]]
- if (
- wycheproof.valid or (
- wycheproof.acceptable and not wycheproof.has_flag("NoLeadingZero")
- )
+ if wycheproof.valid or (
+ wycheproof.acceptable and not wycheproof.has_flag("NoLeadingZero")
):
key.verify(
binascii.unhexlify(wycheproof.testcase["sig"]),