aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/backends/test_openssl.py
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-09-25 13:02:00 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-09-27 10:18:25 -0500
commit25228af9ce544108927cc769e5cfcf6f215cbc89 (patch)
treea5bce91dadc74eab25dcb7f53e7e9e62470f9086 /tests/hazmat/backends/test_openssl.py
parent77e95a016376dfdd08ef44549bd4ecc252fb3bf5 (diff)
downloadcryptography-25228af9ce544108927cc769e5cfcf6f215cbc89.tar.gz
cryptography-25228af9ce544108927cc769e5cfcf6f215cbc89.tar.bz2
cryptography-25228af9ce544108927cc769e5cfcf6f215cbc89.zip
skip deprecated tests on platforms that don't support ec (old rhel)
Diffstat (limited to 'tests/hazmat/backends/test_openssl.py')
-rw-r--r--tests/hazmat/backends/test_openssl.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/hazmat/backends/test_openssl.py b/tests/hazmat/backends/test_openssl.py
index 5933b107..eecc7942 100644
--- a/tests/hazmat/backends/test_openssl.py
+++ b/tests/hazmat/backends/test_openssl.py
@@ -37,6 +37,15 @@ from cryptography.hazmat.primitives.interfaces import BlockCipherAlgorithm
from ...utils import load_vectors_from_file, raises_unsupported_algorithm
+def _skip_curve_unsupported(backend, curve):
+ if not backend.elliptic_curve_supported(curve):
+ pytest.skip(
+ "Curve {0} is not supported by this backend {1}".format(
+ curve.name, backend
+ )
+ )
+
+
@utils.register_interface(interfaces.Mode)
class DummyMode(object):
name = "dummy-mode"
@@ -578,6 +587,7 @@ class TestDeprecatedECBackendMethods(object):
y = 4131560123026307384858369684985976479488628761329758810693
x = 3402090428547195623222463880060959356423657484435591627791
curve = ec.SECP192R1()
+ _skip_curve_unsupported(backend, curve)
pub_numbers = ec.EllipticCurvePublicNumbers(
x=x,
y=y,
@@ -596,6 +606,7 @@ class TestDeprecatedECBackendMethods(object):
y = 4131560123026307384858369684985976479488628761329758810693
x = 3402090428547195623222463880060959356423657484435591627791
curve = ec.SECP192R1()
+ _skip_curve_unsupported(backend, curve)
pub_numbers = ec.EllipticCurvePublicNumbers(
x=x,
y=y,