From a8af5ee4fcac4332d8f53919e55f489b2b8435fb Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Thu, 31 Dec 2015 13:13:23 -0600 Subject: deprecationwarning for OpenSSL < 1.0.1 as upstream has dropped support --- src/cryptography/hazmat/bindings/openssl/binding.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/cryptography/hazmat/bindings/openssl/binding.py b/src/cryptography/hazmat/bindings/openssl/binding.py index 07b6b9ac..8e419439 100644 --- a/src/cryptography/hazmat/bindings/openssl/binding.py +++ b/src/cryptography/hazmat/bindings/openssl/binding.py @@ -8,6 +8,7 @@ import collections import os import threading import types +import warnings from cryptography.exceptions import InternalError from cryptography.hazmat.bindings._openssl import ffi, lib @@ -180,3 +181,11 @@ class Binding(object): # condition registering the OpenSSL locks. On Python 3.4+ the import lock # is per module so this approach will not work. Binding.init_static_locks() + +if 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 " + "will drop support for these versions.", + DeprecationWarning + ) -- cgit v1.2.3