diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-05-21 10:34:49 -0500 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-05-21 10:34:49 -0500 |
commit | 3211d16da6e9a90567248208164b0e7e9e4e3bcb (patch) | |
tree | 8abc6f2c2522ada35da7a43ef777ca8dfadfdfbc /tests/hazmat/backends/test_openssl.py | |
parent | 9e233139790599a3d779330bb351ba1da984ae60 (diff) | |
download | cryptography-3211d16da6e9a90567248208164b0e7e9e4e3bcb.tar.gz cryptography-3211d16da6e9a90567248208164b0e7e9e4e3bcb.tar.bz2 cryptography-3211d16da6e9a90567248208164b0e7e9e4e3bcb.zip |
add test to verify AES CTR is always available in 0.9.8+, comment updates
Diffstat (limited to 'tests/hazmat/backends/test_openssl.py')
-rw-r--r-- | tests/hazmat/backends/test_openssl.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/hazmat/backends/test_openssl.py b/tests/hazmat/backends/test_openssl.py index 154af00f..fb2ca19f 100644 --- a/tests/hazmat/backends/test_openssl.py +++ b/tests/hazmat/backends/test_openssl.py @@ -22,7 +22,7 @@ from cryptography.hazmat.primitives import hashes, interfaces from cryptography.hazmat.primitives.asymmetric import dsa, padding, rsa from cryptography.hazmat.primitives.ciphers import Cipher from cryptography.hazmat.primitives.ciphers.algorithms import AES -from cryptography.hazmat.primitives.ciphers.modes import CBC +from cryptography.hazmat.primitives.ciphers.modes import CBC, CTR from cryptography.hazmat.primitives.interfaces import BlockCipherAlgorithm from ...utils import raises_unsupported_algorithm @@ -64,6 +64,11 @@ class TestOpenSSL(object): def test_supports_cipher(self): assert backend.cipher_supported(None, None) is False + def test_aes_ctr_always_available(self): + # AES CTR should always be available in both 0.9.8 and 1.0.0+ + assert backend.cipher_supported(AES(b"\x00" * 16), + CTR(b"\x00" * 16)) is True + def test_register_duplicate_cipher_adapter(self): with pytest.raises(ValueError): backend.register_cipher_adapter(AES, CBC, None) |