aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/primitives
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2017-05-23 20:31:03 -0700
committerPaul Kehrer <paul.l.kehrer@gmail.com>2017-05-23 20:31:03 -0700
commit6091e11cae1e2ca43709266d0e3ba84ded12ddfc (patch)
tree070abc134d8afff90dcb4a09ed0c659b999a8a1d /tests/hazmat/primitives
parent70e8f90b250ba65167943f67cb851495bc7b8add (diff)
downloadcryptography-6091e11cae1e2ca43709266d0e3ba84ded12ddfc.tar.gz
cryptography-6091e11cae1e2ca43709266d0e3ba84ded12ddfc.tar.bz2
cryptography-6091e11cae1e2ca43709266d0e3ba84ded12ddfc.zip
Bump the minimum PyPy/cffi version and simplify as a result (#3585)
* Bump the minimum PyPy/cffi version and simplify as a result * unused imports * grumble, fix
Diffstat (limited to 'tests/hazmat/primitives')
-rw-r--r--tests/hazmat/primitives/test_block.py6
-rw-r--r--tests/hazmat/primitives/test_ciphers.py48
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)