aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/backends
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2017-03-15 16:56:39 -0400
committerPaul Kehrer <paul.l.kehrer@gmail.com>2017-03-15 16:56:39 -0400
commit5b8914a0524d4dc3539265f8ccf9909d053787b7 (patch)
treeaf9bea26da1dfa6ec78aa5bce3e49d3f0952e191 /tests/hazmat/backends
parent06049448d94cf8a73c43755e6b929b4f871e2cbd (diff)
downloadcryptography-5b8914a0524d4dc3539265f8ccf9909d053787b7.tar.gz
cryptography-5b8914a0524d4dc3539265f8ccf9909d053787b7.tar.bz2
cryptography-5b8914a0524d4dc3539265f8ccf9909d053787b7.zip
Ec is a thing (#3453)
* We always have EC * We always have ECDH * We always have ECDSA * We always have EC codes * This can go as well * And this * unused import
Diffstat (limited to 'tests/hazmat/backends')
-rw-r--r--tests/hazmat/backends/test_openssl.py24
1 files changed, 1 insertions, 23 deletions
diff --git a/tests/hazmat/backends/test_openssl.py b/tests/hazmat/backends/test_openssl.py
index 4feab1eb..f6b57964 100644
--- a/tests/hazmat/backends/test_openssl.py
+++ b/tests/hazmat/backends/test_openssl.py
@@ -22,7 +22,7 @@ from cryptography.hazmat.backends.openssl.backend import (
)
from cryptography.hazmat.backends.openssl.ec import _sn_to_elliptic_curve
from cryptography.hazmat.primitives import hashes, serialization
-from cryptography.hazmat.primitives.asymmetric import dh, dsa, ec, padding
+from cryptography.hazmat.primitives.asymmetric import dh, dsa, padding
from cryptography.hazmat.primitives.ciphers import Cipher
from cryptography.hazmat.primitives.ciphers.algorithms import AES
from cryptography.hazmat.primitives.ciphers.modes import CBC
@@ -550,33 +550,11 @@ class TestOpenSSLSerializationWithOpenSSL(object):
)
-class DummyLibrary(object):
- Cryptography_HAS_EC = 0
-
-
class TestOpenSSLEllipticCurve(object):
- def test_elliptic_curve_supported(self, monkeypatch):
- monkeypatch.setattr(backend, "_lib", DummyLibrary())
-
- assert backend.elliptic_curve_supported(None) is False
-
- def test_elliptic_curve_signature_algorithm_supported(self, monkeypatch):
- monkeypatch.setattr(backend, "_lib", DummyLibrary())
-
- assert backend.elliptic_curve_signature_algorithm_supported(
- None, None
- ) is False
-
def test_sn_to_elliptic_curve_not_supported(self):
with raises_unsupported_algorithm(_Reasons.UNSUPPORTED_ELLIPTIC_CURVE):
_sn_to_elliptic_curve(backend, b"fake")
- def test_elliptic_curve_exchange_algorithm_supported(self, monkeypatch):
- monkeypatch.setattr(backend, "_lib", DummyLibrary())
- assert not backend.elliptic_curve_exchange_algorithm_supported(
- ec.ECDH(), ec.SECP256R1()
- )
-
@pytest.mark.requires_backend_interface(interface=RSABackend)
class TestRSAPEMSerialization(object):