diff options
Diffstat (limited to 'tests/hazmat/backends')
-rw-r--r-- | tests/hazmat/backends/test_openssl.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/hazmat/backends/test_openssl.py b/tests/hazmat/backends/test_openssl.py index bd99c8f2..696a0f73 100644 --- a/tests/hazmat/backends/test_openssl.py +++ b/tests/hazmat/backends/test_openssl.py @@ -524,3 +524,25 @@ class TestDeprecatedRSABackendMethods(object): ct, padding.PKCS1v15() ) + + +class TestDeprecatedDSABackendMethods(object): + def test_create_dsa_signature_ctx(self): + params = dsa.DSAParameters.generate(1024, backend) + key = dsa.DSAPrivateKey.generate(params, backend) + pytest.deprecated_call( + backend.create_dsa_signature_ctx, + key, + hashes.SHA1() + ) + + def test_create_dsa_verification_ctx(self): + params = dsa.DSAParameters.generate(1024, backend) + key = dsa.DSAPrivateKey.generate(params, backend) + public_key = key.public_key() + pytest.deprecated_call( + backend.create_dsa_verification_ctx, + public_key, + b"\x00" * 128, + hashes.SHA1() + ) |