diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2017-03-09 09:21:25 -0400 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2017-03-09 08:21:25 -0500 |
commit | 4bd9a076a858ea28579fe80252a9e48654d78b90 (patch) | |
tree | 39527a4494a2274e383ef9412cb94670b1d3decc /tests/hazmat/backends/test_openssl.py | |
parent | d5e05f27f03046c671d23f09f84cddb8237df0f8 (diff) | |
download | cryptography-4bd9a076a858ea28579fe80252a9e48654d78b90.tar.gz cryptography-4bd9a076a858ea28579fe80252a9e48654d78b90.tar.bz2 cryptography-4bd9a076a858ea28579fe80252a9e48654d78b90.zip |
reverts a change to our exceptions (#3429)
Trying to be too specific about why key loading fails is very difficult
when you're using the same logic across DH, EC, RSA, and DSA. This makes
it less fancy.
Diffstat (limited to 'tests/hazmat/backends/test_openssl.py')
-rw-r--r-- | tests/hazmat/backends/test_openssl.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/hazmat/backends/test_openssl.py b/tests/hazmat/backends/test_openssl.py index f561c793..4feab1eb 100644 --- a/tests/hazmat/backends/test_openssl.py +++ b/tests/hazmat/backends/test_openssl.py @@ -617,7 +617,7 @@ class TestGOSTCertificate(object): @pytest.mark.skipif( backend._lib.Cryptography_HAS_EVP_PKEY_DHX == 1, - reason="Requires OpenSSL without EVP_PKEY_DHX (1.0.2-)") + reason="Requires OpenSSL without EVP_PKEY_DHX (< 1.0.2)") @pytest.mark.requires_backend_interface(interface=DHBackend) class TestOpenSSLDHSerialization(object): @@ -662,8 +662,7 @@ class TestOpenSSLDHSerialization(object): key_path, lambda pemfile: pemfile.read(), mode="rb" ) - with raises_unsupported_algorithm( - _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM): + with pytest.raises(ValueError): loader_func(key_bytes, None, backend) @pytest.mark.parametrize( @@ -685,6 +684,5 @@ class TestOpenSSLDHSerialization(object): key_path, lambda pemfile: pemfile.read(), mode="rb" ) - with raises_unsupported_algorithm( - _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM): + with pytest.raises(ValueError): loader_func(key_bytes, backend) |