diff options
author | Alexander Gaynor <alex.gaynor@gmail.com> | 2014-07-19 10:55:22 -0700 |
---|---|---|
committer | Alexander Gaynor <alex.gaynor@gmail.com> | 2014-07-19 10:55:22 -0700 |
commit | 51a05d665ebc7d11fadb739923dbbfee9bc587cc (patch) | |
tree | 0f8095127630c1767ff7325dcdc75936f35610cb /tests | |
parent | 2bf11cdc18d244fdf1620120cfb56f1b529e0c7d (diff) | |
parent | ad116e26d102651ab6dc2752ae21afb92b72ad6f (diff) | |
download | cryptography-51a05d665ebc7d11fadb739923dbbfee9bc587cc.tar.gz cryptography-51a05d665ebc7d11fadb739923dbbfee9bc587cc.tar.bz2 cryptography-51a05d665ebc7d11fadb739923dbbfee9bc587cc.zip |
Merge branch 'master' into pem-loading-backend
Diffstat (limited to 'tests')
-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]) |