diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2014-12-18 18:54:46 -0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2014-12-18 18:54:46 -0800 |
commit | 4ea9981729b0e3ac99c7b5690110505f613c6283 (patch) | |
tree | e97b5d79aecbf187ee27fc477dfaef60f8faf94f /tests/hazmat/backends/test_openssl.py | |
parent | 187f31eb7997a6000ab8649317df862ba2fe7836 (diff) | |
parent | 4323ac20781ff43ca37c19fe7bdf48a041610ab4 (diff) | |
download | cryptography-4ea9981729b0e3ac99c7b5690110505f613c6283.tar.gz cryptography-4ea9981729b0e3ac99c7b5690110505f613c6283.tar.bz2 cryptography-4ea9981729b0e3ac99c7b5690110505f613c6283.zip |
Merge pull request #1552 from reaperhulk/deprecation-dance
remove fully deprecated items from 0.6 deprecation cycle
Diffstat (limited to 'tests/hazmat/backends/test_openssl.py')
-rw-r--r-- | tests/hazmat/backends/test_openssl.py | 44 |
1 files changed, 2 insertions, 42 deletions
diff --git a/tests/hazmat/backends/test_openssl.py b/tests/hazmat/backends/test_openssl.py index dfd0abe1..b6bb5491 100644 --- a/tests/hazmat/backends/test_openssl.py +++ b/tests/hazmat/backends/test_openssl.py @@ -15,20 +15,18 @@ import pytest from cryptography import utils from cryptography.exceptions import InternalError, _Reasons -from cryptography.hazmat.backends.interfaces import EllipticCurveBackend from cryptography.hazmat.backends.openssl.backend import ( Backend, backend ) from cryptography.hazmat.backends.openssl.ec import _sn_to_elliptic_curve from cryptography.hazmat.primitives import hashes, interfaces -from cryptography.hazmat.primitives.asymmetric import dsa, ec, padding +from cryptography.hazmat.primitives.asymmetric import 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, CTR from cryptography.hazmat.primitives.interfaces import BlockCipherAlgorithm from ..primitives.fixtures_rsa import RSA_KEY_512 -from ..primitives.test_ec import _skip_curve_unsupported from ...utils import load_vectors_from_file, raises_unsupported_algorithm @@ -458,7 +456,7 @@ class TestOpenSSLSerialisationWithOpenSSL(object): "key1.pem" ), lambda pemfile: ( - backend.load_traditional_openssl_pem_private_key( + backend.load_pem_private_key( pemfile.read().encode(), password ) ) @@ -481,41 +479,3 @@ class TestOpenSSLEllipticCurve(object): def test_sn_to_elliptic_curve_not_supported(self): with raises_unsupported_algorithm(_Reasons.UNSUPPORTED_ELLIPTIC_CURVE): _sn_to_elliptic_curve(backend, b"fake") - - -@pytest.mark.requires_backend_interface(interface=EllipticCurveBackend) -class TestDeprecatedECBackendMethods(object): - def test_elliptic_curve_private_key_from_numbers(self): - d = 5634846038258869671139984276180670841223409490498798721258 - y = 4131560123026307384858369684985976479488628761329758810693 - x = 3402090428547195623222463880060959356423657484435591627791 - curve = ec.SECP192R1() - _skip_curve_unsupported(backend, curve) - pub_numbers = ec.EllipticCurvePublicNumbers( - x=x, - y=y, - curve=curve - ) - numbers = ec.EllipticCurvePrivateNumbers( - private_value=d, - public_numbers=pub_numbers - ) - pytest.deprecated_call( - backend.elliptic_curve_private_key_from_numbers, - numbers - ) - - def test_elliptic_curve_public_key_from_numbers(self): - y = 4131560123026307384858369684985976479488628761329758810693 - x = 3402090428547195623222463880060959356423657484435591627791 - curve = ec.SECP192R1() - _skip_curve_unsupported(backend, curve) - pub_numbers = ec.EllipticCurvePublicNumbers( - x=x, - y=y, - curve=curve - ) - pytest.deprecated_call( - backend.elliptic_curve_public_key_from_numbers, - pub_numbers - ) |