aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/primitives
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2017-05-20 10:09:02 -0700
committerAlex Gaynor <alex.gaynor@gmail.com>2017-05-20 10:09:02 -0700
commit51032351297b9bf7d783b7138ac0c142d8e38918 (patch)
tree3a3ca718dbb0cf904d66b9046489185349ba508b /tests/hazmat/primitives
parentd08ddd5af21de62088c0236bfac1d647a6cb84a2 (diff)
downloadcryptography-51032351297b9bf7d783b7138ac0c142d8e38918.tar.gz
cryptography-51032351297b9bf7d783b7138ac0c142d8e38918.tar.bz2
cryptography-51032351297b9bf7d783b7138ac0c142d8e38918.zip
time to remove commoncrypto, fare thee well (#3551)
* time to remove commoncrypto, fare thee well * remove even more * update the changelog * remove more things * don't need this function * remove CAST5 CTR tests since that was only supported in commoncrypto * assert a thing
Diffstat (limited to 'tests/hazmat/primitives')
-rw-r--r--tests/hazmat/primitives/test_cast5.py17
-rw-r--r--tests/hazmat/primitives/utils.py5
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"]