aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/backends/test_multibackend.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2014-06-27 19:09:55 -0700
committerAlex Gaynor <alex.gaynor@gmail.com>2014-06-27 19:09:55 -0700
commitecbc00b3d2d3e3daf0d047da4113d7dceb211366 (patch)
tree957eabf38c774dacffdc226eea7cfd1e84c929a3 /tests/hazmat/backends/test_multibackend.py
parent0e2ee9b15b78fb2e7e08643b1adcdabb63f441e3 (diff)
parent7c9fa3a7384d3b8e14dc8a56390cd4fce222dcba (diff)
downloadcryptography-ecbc00b3d2d3e3daf0d047da4113d7dceb211366.tar.gz
cryptography-ecbc00b3d2d3e3daf0d047da4113d7dceb211366.tar.bz2
cryptography-ecbc00b3d2d3e3daf0d047da4113d7dceb211366.zip
Merge pull request #1189 from reaperhulk/dsa-new-method-multibackend
add multibackend support for new DSABackend method
Diffstat (limited to 'tests/hazmat/backends/test_multibackend.py')
-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(