diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2016-06-18 11:11:57 -0400 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2016-06-18 10:11:57 -0500 |
commit | 1252dec0c85cd3cb9ea70dcb0ac2a4afc976f2ce (patch) | |
tree | 0eb7f90d3e9dca344f5a6c69cfd6c48f5f69ce42 /tests/hazmat | |
parent | a778fbc56cb6354fb6ecdced0196eab1d3d6c9ec (diff) | |
download | cryptography-1252dec0c85cd3cb9ea70dcb0ac2a4afc976f2ce.tar.gz cryptography-1252dec0c85cd3cb9ea70dcb0ac2a4afc976f2ce.tar.bz2 cryptography-1252dec0c85cd3cb9ea70dcb0ac2a4afc976f2ce.zip |
Drop OpenSSL 0.9.8 (#2978)
* Drop OpenSSL 0.9.8
* Drop this test, it's not relevant any longer
* unused import
* Remove CRYPTOGRAPHY_ALLOW_OPENSSL_098=1 from our tox
* removed unused code for Cryptography_HAS_PKEY_CTX
* return unused code for _AESCTRCipherContext
* syntax :-(
* remove some unused tests and skips
* remove unused code for Cryptography_HAS_PBKDF2_HMAC
* Revert "return unused code for _AESCTRCipherContext"
This reverts commit 7d149729205aa4c9735eb322414b167a75b302df.
* Remove unused RSA code
* Remove unused test code for conditional bindings
* Remove unused dsa code
* unused import
* Remove unused x509 extension code
* Remove unused EC code
* Attempt to remove unused DER key loading code
* document this
* grammar
* Added back this paragraph
* Update docs
Diffstat (limited to 'tests/hazmat')
-rw-r--r-- | tests/hazmat/backends/test_openssl.py | 25 | ||||
-rw-r--r-- | tests/hazmat/bindings/test_openssl.py | 17 |
2 files changed, 1 insertions, 41 deletions
diff --git a/tests/hazmat/backends/test_openssl.py b/tests/hazmat/backends/test_openssl.py index 2a49dcbb..a85262dc 100644 --- a/tests/hazmat/backends/test_openssl.py +++ b/tests/hazmat/backends/test_openssl.py @@ -142,27 +142,6 @@ class TestOpenSSL(object): with pytest.raises(InternalError): enc.finalize() - def test_derive_pbkdf2_raises_unsupported_on_old_openssl(self): - if backend.pbkdf2_hmac_supported(hashes.SHA256()): - pytest.skip("Requires an older OpenSSL") - with raises_unsupported_algorithm(_Reasons.UNSUPPORTED_HASH): - backend.derive_pbkdf2_hmac(hashes.SHA256(), 10, b"", 1000, b"") - - @pytest.mark.skipif( - backend._lib.OPENSSL_VERSION_NUMBER >= 0x1000000f, - reason="Requires an older OpenSSL. Must be < 1.0.0" - ) - def test_large_key_size_on_old_openssl(self): - with pytest.raises(ValueError): - dsa.generate_parameters(2048, backend=backend) - - with pytest.raises(ValueError): - dsa.generate_parameters(3072, backend=backend) - - @pytest.mark.skipif( - backend._lib.OPENSSL_VERSION_NUMBER < 0x1000000f, - reason="Requires a newer OpenSSL. Must be >= 1.0.0" - ) def test_large_key_size_on_new_openssl(self): parameters = dsa.generate_parameters(2048, backend) param_num = parameters.parameter_numbers() @@ -743,10 +722,6 @@ class TestRSAPEMSerialization(object): class TestGOSTCertificate(object): - @pytest.mark.skipif( - backend._lib.OPENSSL_VERSION_NUMBER < 0x1000000f, - reason="Requires a newer OpenSSL. Must be >= 1.0.0" - ) def test_numeric_string_x509_name_entry(self): cert = _load_cert( os.path.join("x509", "e-trust.ru.der"), diff --git a/tests/hazmat/bindings/test_openssl.py b/tests/hazmat/bindings/test_openssl.py index 34c23ab2..41c653b9 100644 --- a/tests/hazmat/bindings/test_openssl.py +++ b/tests/hazmat/bindings/test_openssl.py @@ -8,7 +8,7 @@ import pytest from cryptography.exceptions import InternalError from cryptography.hazmat.bindings.openssl.binding import ( - Binding, _OpenSSLErrorWithText, _openssl_assert, _verify_openssl_version + Binding, _OpenSSLErrorWithText, _openssl_assert ) @@ -137,15 +137,6 @@ class TestOpenSSL(object): def test_conditional_removal(self): b = Binding() - if b.lib.OPENSSL_VERSION_NUMBER >= 0x10000000: - assert b.lib.X509_V_ERR_DIFFERENT_CRL_SCOPE - assert b.lib.X509_V_ERR_CRL_PATH_VALIDATION_ERROR - else: - with pytest.raises(AttributeError): - b.lib.X509_V_ERR_DIFFERENT_CRL_SCOPE - - with pytest.raises(AttributeError): - b.lib.X509_V_ERR_CRL_PATH_VALIDATION_ERROR if b.lib.OPENSSL_VERSION_NUMBER >= 0x10001000: assert b.lib.CMAC_Init @@ -175,9 +166,3 @@ class TestOpenSSL(object): b'ex:data not multiple of block length' ) )] - - def test_verify_openssl_version(self, monkeypatch): - monkeypatch.delenv("CRYPTOGRAPHY_ALLOW_OPENSSL_098", raising=False) - with pytest.raises(RuntimeError): - # OpenSSL 0.9.8zg - _verify_openssl_version(0x9081DF) |