aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-06-27 16:14:00 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-06-27 16:14:00 -0600
commit7c9fa3a7384d3b8e14dc8a56390cd4fce222dcba (patch)
tree957eabf38c774dacffdc226eea7cfd1e84c929a3 /tests
parent0e2ee9b15b78fb2e7e08643b1adcdabb63f441e3 (diff)
downloadcryptography-7c9fa3a7384d3b8e14dc8a56390cd4fce222dcba.tar.gz
cryptography-7c9fa3a7384d3b8e14dc8a56390cd4fce222dcba.tar.bz2
cryptography-7c9fa3a7384d3b8e14dc8a56390cd4fce222dcba.zip
add multibackend support for new DSABackend method
Diffstat (limited to 'tests')
-rw-r--r--tests/hazmat/backends/test_multibackend.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/hazmat/backends/test_multibackend.py b/tests/hazmat/backends/test_multibackend.py
index 64dc062c..a68fe560 100644
--- a/tests/hazmat/backends/test_multibackend.py
+++ b/tests/hazmat/backends/test_multibackend.py
@@ -128,6 +128,9 @@ class DummyDSABackend(object):
def generate_dsa_private_key(self, parameters):
pass
+ def generate_dsa_private_key_and_parameters(self, key_size):
+ pass
+
def create_dsa_signature_ctx(self, private_key, algorithm):
pass
@@ -343,6 +346,7 @@ class TestMultiBackend(object):
parameters = object()
backend.generate_dsa_private_key(parameters)
+ backend.generate_dsa_private_key_and_parameters(key_size=1024)
backend.create_dsa_verification_ctx("public_key", "sig", hashes.SHA1())
backend.create_dsa_signature_ctx("private_key", hashes.SHA1())
@@ -363,6 +367,11 @@ class TestMultiBackend(object):
with raises_unsupported_algorithm(
_Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM
):
+ backend.generate_dsa_private_key_and_parameters(key_size=1024)
+
+ with raises_unsupported_algorithm(
+ _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM
+ ):
backend.create_dsa_signature_ctx("private_key", hashes.SHA1())
with raises_unsupported_algorithm(