aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2016-11-22 09:25:17 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2016-11-22 22:25:17 +0800
commit29b2ebc480a7be6b2da69e2e74ea86d4e5e816da (patch)
treec8cbc6ebbadae9c2892a65c162155613fc7114e5 /src
parent085859172d13366e6ceae41a1eb0a21b50019eb7 (diff)
downloadcryptography-29b2ebc480a7be6b2da69e2e74ea86d4e5e816da.tar.gz
cryptography-29b2ebc480a7be6b2da69e2e74ea86d4e5e816da.tar.bz2
cryptography-29b2ebc480a7be6b2da69e2e74ea86d4e5e816da.zip
Error out on OpenSSL 1.0.0 by default (#3276)
* Error out on OpenSSL 1.0.0 by default * what the heck
Diffstat (limited to 'src')
-rw-r--r--src/cryptography/hazmat/bindings/openssl/binding.py19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/cryptography/hazmat/bindings/openssl/binding.py b/src/cryptography/hazmat/bindings/openssl/binding.py
index 25849bf3..19151b0e 100644
--- a/src/cryptography/hazmat/bindings/openssl/binding.py
+++ b/src/cryptography/hazmat/bindings/openssl/binding.py
@@ -191,12 +191,19 @@ class Binding(object):
def _verify_openssl_version(version):
if version < 0x10001000:
- warnings.warn(
- "OpenSSL version 1.0.0 is no longer supported by the OpenSSL "
- "project, please upgrade. The next version of cryptography will "
- "drop support for it.",
- DeprecationWarning
- )
+ if os.environ.get("CRYPTOGRAPHY_ALLOW_OPENSSL_100"):
+ warnings.warn(
+ "OpenSSL version 1.0.0 is no longer supported by the OpenSSL "
+ "project, please upgrade. The next version of cryptography "
+ "will completely remove support for it.",
+ DeprecationWarning
+ )
+ else:
+ raise RuntimeError(
+ "You are linking against OpenSSL 1.0.0, which is no longer "
+ "support by the OpenSSL project. You need to upgrade to a "
+ "newer version of OpenSSL."
+ )
# OpenSSL is not thread safe until the locks are initialized. We call this