diff options
author | Donald Stufft <donald@stufft.io> | 2013-10-21 15:39:18 -0700 |
---|---|---|
committer | Donald Stufft <donald@stufft.io> | 2013-10-21 15:39:18 -0700 |
commit | c160079df8dd021b6b1e8091025ba27ddc6cd6c0 (patch) | |
tree | dcbc2e2491bffc6ad19eea41bbeeba85d65a48b3 /tests/primitives/test_openssl_vectors.py | |
parent | 71ed449ffe7e26e9217b6c44bb27e19996315a64 (diff) | |
parent | 6f874ff9279376b6962c514ae0e59b90e7082e15 (diff) | |
download | cryptography-c160079df8dd021b6b1e8091025ba27ddc6cd6c0.tar.gz cryptography-c160079df8dd021b6b1e8091025ba27ddc6cd6c0.tar.bz2 cryptography-c160079df8dd021b6b1e8091025ba27ddc6cd6c0.zip |
Merge pull request #109 from alex/refactor-cipher-names
[WIP] Refactor how cipher names are computed
Diffstat (limited to 'tests/primitives/test_openssl_vectors.py')
-rw-r--r-- | tests/primitives/test_openssl_vectors.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/tests/primitives/test_openssl_vectors.py b/tests/primitives/test_openssl_vectors.py index 5b2be784..86ff7cad 100644 --- a/tests/primitives/test_openssl_vectors.py +++ b/tests/primitives/test_openssl_vectors.py @@ -32,7 +32,9 @@ class TestCamelliaCBC(object): ["camellia-cbc.txt"], lambda key, iv: ciphers.Camellia(binascii.unhexlify(key)), lambda key, iv: modes.CBC(binascii.unhexlify(iv)), - only_if=lambda api: api.supports_cipher("camellia-128-cbc"), + only_if=lambda api: api.supports_cipher( + ciphers.Camellia("\x00" * 16), modes.CBC("\x00" * 16) + ), skip_message="Does not support Camellia CBC", ) @@ -44,7 +46,9 @@ class TestCamelliaOFB(object): ["camellia-ofb.txt"], lambda key, iv: ciphers.Camellia(binascii.unhexlify(key)), lambda key, iv: modes.OFB(binascii.unhexlify(iv)), - only_if=lambda api: api.supports_cipher("camellia-128-ofb"), + only_if=lambda api: api.supports_cipher( + ciphers.Camellia("\x00" * 16), modes.OFB("\x00" * 16) + ), skip_message="Does not support Camellia OFB", ) @@ -56,7 +60,9 @@ class TestCamelliaCFB(object): ["camellia-cfb.txt"], lambda key, iv: ciphers.Camellia(binascii.unhexlify(key)), lambda key, iv: modes.CFB(binascii.unhexlify(iv)), - only_if=lambda api: api.supports_cipher("camellia-128-cfb"), + only_if=lambda api: api.supports_cipher( + ciphers.Camellia("\x00" * 16), modes.CFB("\x00" * 16) + ), skip_message="Does not support Camellia CFB", ) @@ -68,6 +74,8 @@ class TestAESCTR(object): ["aes-128-ctr.txt", "aes-192-ctr.txt", "aes-256-ctr.txt"], lambda key, iv: ciphers.AES(binascii.unhexlify(key)), lambda key, iv: modes.CTR(binascii.unhexlify(iv)), - only_if=lambda api: api.supports_cipher("aes-128-ctr"), + only_if=lambda api: api.supports_cipher( + ciphers.AES("\x00" * 16), modes.CTR("\x00" * 16) + ), skip_message="Does not support AES CTR", ) |