diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-07-18 15:12:43 -0500 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-07-18 15:12:43 -0500 |
commit | 8e39e69a47c00ed24fb86c1e79726daa2e890edb (patch) | |
tree | 4a33e1c2216bc32339694728467b2f54549c6d2a /tests/hazmat | |
parent | 06de17fe795015ce9b96a7e2d918c0b8907389fb (diff) | |
download | cryptography-8e39e69a47c00ed24fb86c1e79726daa2e890edb.tar.gz cryptography-8e39e69a47c00ed24fb86c1e79726daa2e890edb.tar.bz2 cryptography-8e39e69a47c00ed24fb86c1e79726daa2e890edb.zip |
add missing DSABackend numbers loading methods to Multibackend
Diffstat (limited to 'tests/hazmat')
-rw-r--r-- | tests/hazmat/backends/test_multibackend.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/hazmat/backends/test_multibackend.py b/tests/hazmat/backends/test_multibackend.py index de5f1fde..168ed688 100644 --- a/tests/hazmat/backends/test_multibackend.py +++ b/tests/hazmat/backends/test_multibackend.py @@ -144,6 +144,12 @@ class DummyDSABackend(object): def dsa_parameters_supported(self, p, q, g): pass + def load_dsa_private_numbers(self, numbers): + pass + + def load_dsa_public_numbers(self, numbers): + pass + @utils.register_interface(CMACBackend) class DummyCMACBackend(object): @@ -365,6 +371,8 @@ class TestMultiBackend(object): backend.create_dsa_signature_ctx("private_key", hashes.SHA1()) backend.dsa_hash_supported(hashes.SHA1()) backend.dsa_parameters_supported(1, 2, 3) + backend.load_dsa_private_numbers("numbers") + backend.load_dsa_public_numbers("numbers") backend = MultiBackend([]) with raises_unsupported_algorithm( @@ -404,6 +412,16 @@ class TestMultiBackend(object): ): backend.dsa_parameters_supported('p', 'q', 'g') + with raises_unsupported_algorithm( + _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM + ): + backend.load_dsa_private_numbers("numbers") + + with raises_unsupported_algorithm( + _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM + ): + backend.load_dsa_public_numbers("numbers") + def test_cmac(self): backend = MultiBackend([ DummyCMACBackend([algorithms.AES]) |