diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/hazmat/primitives/test_block.py | 6 | ||||
-rw-r--r-- | tests/hazmat/primitives/test_ciphers.py | 48 |
2 files changed, 0 insertions, 54 deletions
diff --git a/tests/hazmat/primitives/test_block.py b/tests/hazmat/primitives/test_block.py index 4c6ad18b..c053feaf 100644 --- a/tests/hazmat/primitives/test_block.py +++ b/tests/hazmat/primitives/test_block.py @@ -6,8 +6,6 @@ from __future__ import absolute_import, division, print_function import binascii -import cffi - import pytest from cryptography.exceptions import ( @@ -72,10 +70,6 @@ class TestCipherContext(object): with pytest.raises(AlreadyFinalized): decryptor.finalize() - @pytest.mark.skipif( - cffi.__version_info__ < (1, 7), - reason="cffi version too old" - ) def test_use_update_into_after_finalize(self, backend): cipher = Cipher( algorithms.AES(binascii.unhexlify(b"0" * 32)), diff --git a/tests/hazmat/primitives/test_ciphers.py b/tests/hazmat/primitives/test_ciphers.py index 60faa0c5..f1718c07 100644 --- a/tests/hazmat/primitives/test_ciphers.py +++ b/tests/hazmat/primitives/test_ciphers.py @@ -7,8 +7,6 @@ from __future__ import absolute_import, division, print_function import binascii import os -import cffi - import pytest from cryptography.exceptions import AlreadyFinalized, _Reasons @@ -141,10 +139,6 @@ def test_invalid_backend(): ciphers.Cipher(AES(b"AAAAAAAAAAAAAAAA"), modes.ECB, pretend_backend) -@pytest.mark.skipif( - cffi.__version_info__ < (1, 7), - reason="cffi version too old" -) @pytest.mark.supported( only_if=lambda backend: backend.cipher_supported( AES(b"\x00" * 16), modes.ECB() @@ -259,45 +253,3 @@ class TestCipherUpdateInto(object): buf = bytearray(5) with pytest.raises(ValueError): encryptor.update_into(b"testing", buf) - - -@pytest.mark.skipif( - cffi.__version_info__ >= (1, 7), - reason="cffi version too new" -) -@pytest.mark.requires_backend_interface(interface=CipherBackend) -class TestCipherUpdateIntoUnsupported(object): - def _too_old(self, mode, backend): - key = b"\x00" * 16 - c = ciphers.Cipher(AES(key), mode, backend) - encryptor = c.encryptor() - buf = bytearray(32) - with pytest.raises(NotImplementedError): - encryptor.update_into(b"\x00" * 16, buf) - - @pytest.mark.supported( - only_if=lambda backend: backend.cipher_supported( - AES(b"\x00" * 16), modes.ECB() - ), - skip_message="Does not support AES ECB", - ) - def test_cffi_too_old_ecb(self, backend): - self._too_old(modes.ECB(), backend) - - @pytest.mark.supported( - only_if=lambda backend: backend.cipher_supported( - AES(b"\x00" * 16), modes.CTR(b"0" * 16) - ), - skip_message="Does not support AES CTR", - ) - def test_cffi_too_old_ctr(self, backend): - self._too_old(modes.CTR(b"0" * 16), backend) - - @pytest.mark.supported( - only_if=lambda backend: backend.cipher_supported( - AES(b"\x00" * 16), modes.GCM(b"0" * 16) - ), - skip_message="Does not support AES GCM", - ) - def test_cffi_too_old_gcm(self, backend): - self._too_old(modes.GCM(b"0" * 16), backend) |