disable blowfish in commoncrypto backend for key lengths under 64-bit (#3040)
This is due to a bug in CommonCrypto present in 10.11.x. Filed as
radar://26636600
diff --git a/tests/hazmat/primitives/utils.py b/tests/hazmat/primitives/utils.py
index 8705cdc..d0e87a7 100644
--- a/tests/hazmat/primitives/utils.py
+++ b/tests/hazmat/primitives/utils.py
@@ -47,6 +47,11 @@
def encrypt_test(backend, cipher_factory, mode_factory, params):
+ if not 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"]
cipher = Cipher(