From 29b2ebc480a7be6b2da69e2e74ea86d4e5e816da Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Tue, 22 Nov 2016 09:25:17 -0500 Subject: Error out on OpenSSL 1.0.0 by default (#3276) * Error out on OpenSSL 1.0.0 by default * what the heck --- tests/hazmat/bindings/test_openssl.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/hazmat/bindings/test_openssl.py b/tests/hazmat/bindings/test_openssl.py index bbdd87ca..3e01717c 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 + Binding, _OpenSSLErrorWithText, _openssl_assert, _verify_openssl_version ) @@ -107,3 +107,9 @@ class TestOpenSSL(object): b'ex:data not multiple of block length' ) )] + + def test_verify_openssl_version(self, monkeypatch): + monkeypatch.delenv("CRYPTOGRAPHY_ALLOW_OPENSSL_100", raising=False) + with pytest.raises(RuntimeError): + # OpenSSL 1.0.0 + _verify_openssl_version(0x100000F) -- cgit v1.2.3