diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2014-05-21 10:35:47 -0700 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2014-05-21 10:35:47 -0700 |
commit | ae14644d2dbc98fe787c1d30a40934a682d71f23 (patch) | |
tree | cef762f329f8a8a8b8127fee493643b16c0ae1fb /tests | |
parent | aec036526e5a13364cb02c38746f9f7d113aaa30 (diff) | |
parent | caa11cdbef16d9a3b910153e27155d456d534753 (diff) | |
download | cryptography-ae14644d2dbc98fe787c1d30a40934a682d71f23.tar.gz cryptography-ae14644d2dbc98fe787c1d30a40934a682d71f23.tar.bz2 cryptography-ae14644d2dbc98fe787c1d30a40934a682d71f23.zip |
Merge pull request #1068 from reaperhulk/ctr-mode-098
AES CTR Mode 0.9.8 Support
Diffstat (limited to 'tests')
-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) |