diff options
Diffstat (limited to 'tests/hazmat/primitives')
-rw-r--r-- | tests/hazmat/primitives/test_cast5.py | 17 | ||||
-rw-r--r-- | tests/hazmat/primitives/utils.py | 5 |
2 files changed, 2 insertions, 20 deletions
diff --git a/tests/hazmat/primitives/test_cast5.py b/tests/hazmat/primitives/test_cast5.py index 59af84f5..ec51659d 100644 --- a/tests/hazmat/primitives/test_cast5.py +++ b/tests/hazmat/primitives/test_cast5.py @@ -82,20 +82,3 @@ class TestCAST5ModeCFB(object): lambda key, **kwargs: algorithms.CAST5(binascii.unhexlify((key))), lambda iv, **kwargs: modes.CFB(binascii.unhexlify(iv)) ) - - -@pytest.mark.supported( - only_if=lambda backend: backend.cipher_supported( - algorithms.CAST5(b"\x00" * 16), modes.CTR(b"\x00" * 8) - ), - skip_message="Does not support CAST5 CTR", -) -@pytest.mark.requires_backend_interface(interface=CipherBackend) -class TestCAST5ModeCTR(object): - test_CTR = generate_encrypt_test( - load_nist_vectors, - os.path.join("ciphers", "CAST5"), - ["cast5-ctr.txt"], - lambda key, **kwargs: algorithms.CAST5(binascii.unhexlify((key))), - lambda iv, **kwargs: modes.CTR(binascii.unhexlify(iv)) - ) diff --git a/tests/hazmat/primitives/utils.py b/tests/hazmat/primitives/utils.py index 59326367..b8200123 100644 --- a/tests/hazmat/primitives/utils.py +++ b/tests/hazmat/primitives/utils.py @@ -47,10 +47,9 @@ def generate_encrypt_test(param_loader, path, file_names, cipher_factory, def encrypt_test(backend, cipher_factory, mode_factory, params): - if not backend.cipher_supported( + assert backend.cipher_supported( cipher_factory(**params), mode_factory(**params) - ): - pytest.skip("cipher/mode combo is unsupported by this backend") + ) plaintext = params["plaintext"] ciphertext = params["ciphertext"] |