From be6dd9b1ba8317ff07bae2e27563741a72b20e54 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Fri, 22 Jan 2016 17:12:14 -0500 Subject: Formally deprecated support for OpenSSL 0.9.8 --- src/cryptography/hazmat/bindings/openssl/binding.py | 10 +++++++++- src/cryptography/utils.py | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/cryptography/hazmat/bindings/openssl/binding.py b/src/cryptography/hazmat/bindings/openssl/binding.py index 1cfe8162..b2215de3 100644 --- a/src/cryptography/hazmat/bindings/openssl/binding.py +++ b/src/cryptography/hazmat/bindings/openssl/binding.py @@ -10,6 +10,7 @@ import threading import types import warnings +from cryptography import utils from cryptography.exceptions import InternalError from cryptography.hazmat.bindings._openssl import ffi, lib from cryptography.hazmat.bindings.openssl._conditional import CONDITIONAL_NAMES @@ -204,7 +205,14 @@ class Binding(object): # is per module so this approach will not work. Binding.init_static_locks() -if Binding.lib.SSLeay() < 0x10001000: +if Binding.lib.SSLeay() < 0x10000000: + warnings.warn( + "OpenSSL version 0.9.8 is no longer supported by the OpenSSL project, " + "please upgrade. The next version of cryptography will drop support " + "for it.", + utils.DeprecatedIn12 + ) +elif Binding.lib.SSLeay() < 0x10001000: warnings.warn( "OpenSSL versions less than 1.0.1 are no longer supported by the " "OpenSSL project, please upgrade. A future version of cryptography " diff --git a/src/cryptography/utils.py b/src/cryptography/utils.py index b85d50d3..22edd94f 100644 --- a/src/cryptography/utils.py +++ b/src/cryptography/utils.py @@ -15,7 +15,7 @@ import warnings # the functions deprecated in 1.0 are on an arbitrarily extended deprecation # cycle and should not be removed until we agree on when that cycle ends. DeprecatedIn10 = DeprecationWarning -DeprecatedIn12 = PendingDeprecationWarning +DeprecatedIn12 = DeprecationWarning def read_only_property(name): -- cgit v1.2.3