diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-03-19 19:14:15 -0400 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-03-19 19:14:15 -0400 |
commit | 4d8358fb50253bebdf637f517da8ba2406080d3f (patch) | |
tree | f8cf519f89e5e3f6f2acc4cd4586985d0da3fd5b /tests/hazmat/backends | |
parent | 503ddf4376beff5495f746410a268f72b5e84bb4 (diff) | |
download | cryptography-4d8358fb50253bebdf637f517da8ba2406080d3f.tar.gz cryptography-4d8358fb50253bebdf637f517da8ba2406080d3f.tar.bz2 cryptography-4d8358fb50253bebdf637f517da8ba2406080d3f.zip |
add mgf1_hash_supported unsupported hash check
Diffstat (limited to 'tests/hazmat/backends')
-rw-r--r-- | tests/hazmat/backends/test_openssl.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/hazmat/backends/test_openssl.py b/tests/hazmat/backends/test_openssl.py index 501ee0f6..5c6efbaf 100644 --- a/tests/hazmat/backends/test_openssl.py +++ b/tests/hazmat/backends/test_openssl.py @@ -40,6 +40,11 @@ class DummyCipher(object): name = "dummy-cipher" +@utils.register_interface(interfaces.HashAlgorithm) +class DummyHash(object): + name = "dummy-hash" + + class TestOpenSSL(object): def test_backend_exists(self): assert backend @@ -162,6 +167,9 @@ class TestOpenSSL(object): backend ) + def test_unsupported_mgf1_hash_algorithm(self): + assert backend.mgf1_hash_supported(DummyHash()) is False + # This test is not in the next class because to check if it's really # default we don't want to run the setup_method before it def test_osrandom_engine_is_default(self): |