Blame SOURCES/0001-Fixed-4380-do-not-assume-TLSv1-is-available-in-OpenS.patch

5bc286
From 2716cd2fa55cc867656a3e797797f5a1386afd69 Mon Sep 17 00:00:00 2001
5bc286
From: Alex Gaynor <alex.gaynor@gmail.com>
5bc286
Date: Sun, 12 Aug 2018 15:48:24 -0400
5bc286
Subject: [PATCH] Fixed #4380 -- do not assume TLSv1 is available in OpenSSL
5bc286
 (#4389)
5bc286
5bc286
* Fixed #4380 -- do not assume TLSv1 is available in OpenSSL
5bc286
5bc286
Hallelujah! It's starting to become the case that some OpenSSLs are disabling it.
5bc286
5bc286
* cover this file as well
5bc286
---
5bc286
 tests/hazmat/backends/test_openssl.py | 2 +-
5bc286
 tests/hazmat/bindings/test_openssl.py | 9 ++++++---
5bc286
 2 files changed, 7 insertions(+), 4 deletions(-)
5bc286
5bc286
diff --git a/tests/hazmat/backends/test_openssl.py b/tests/hazmat/backends/test_openssl.py
5bc286
index 31b34cd0..e77f5dc3 100644
5bc286
--- a/tests/hazmat/backends/test_openssl.py
5bc286
+++ b/tests/hazmat/backends/test_openssl.py
5bc286
@@ -115,7 +115,7 @@ class TestOpenSSL(object):
5bc286
         assert len(errors) == 10
5bc286
 
5bc286
     def test_ssl_ciphers_registered(self):
5bc286
-        meth = backend._lib.TLSv1_method()
5bc286
+        meth = backend._lib.SSLv23_method()
5bc286
         ctx = backend._lib.SSL_CTX_new(meth)
5bc286
         assert ctx != backend._ffi.NULL
5bc286
         backend._lib.SSL_CTX_free(ctx)
5bc286
diff --git a/tests/hazmat/bindings/test_openssl.py b/tests/hazmat/bindings/test_openssl.py
5bc286
index 488f64e1..f317f07f 100644
5bc286
--- a/tests/hazmat/bindings/test_openssl.py
5bc286
+++ b/tests/hazmat/bindings/test_openssl.py
5bc286
@@ -37,7 +37,8 @@ class TestOpenSSL(object):
5bc286
         # Test that we're properly handling 32-bit unsigned on all platforms.
5bc286
         b = Binding()
5bc286
         assert b.lib.SSL_OP_ALL > 0
5bc286
-        ctx = b.lib.SSL_CTX_new(b.lib.TLSv1_method())
5bc286
+        ctx = b.lib.SSL_CTX_new(b.lib.SSLv23_method())
5bc286
+        assert ctx != b.ffi.NULL
5bc286
         ctx = b.ffi.gc(ctx, b.lib.SSL_CTX_free)
5bc286
         current_options = b.lib.SSL_CTX_get_options(ctx)
5bc286
         resp = b.lib.SSL_CTX_set_options(ctx, b.lib.SSL_OP_ALL)
5bc286
@@ -49,7 +50,8 @@ class TestOpenSSL(object):
5bc286
         # Test that we're properly handling 32-bit unsigned on all platforms.
5bc286
         b = Binding()
5bc286
         assert b.lib.SSL_OP_ALL > 0
5bc286
-        ctx = b.lib.SSL_CTX_new(b.lib.TLSv1_method())
5bc286
+        ctx = b.lib.SSL_CTX_new(b.lib.SSLv23_method())
5bc286
+        assert ctx != b.ffi.NULL
5bc286
         ctx = b.ffi.gc(ctx, b.lib.SSL_CTX_free)
5bc286
         ssl = b.lib.SSL_new(ctx)
5bc286
         ssl = b.ffi.gc(ssl, b.lib.SSL_free)
5bc286
@@ -63,7 +65,8 @@ class TestOpenSSL(object):
5bc286
         # Test that we're properly handling 32-bit unsigned on all platforms.
5bc286
         b = Binding()
5bc286
         assert b.lib.SSL_OP_ALL > 0
5bc286
-        ctx = b.lib.SSL_CTX_new(b.lib.TLSv1_method())
5bc286
+        ctx = b.lib.SSL_CTX_new(b.lib.SSLv23_method())
5bc286
+        assert ctx != b.ffi.NULL
5bc286
         ctx = b.ffi.gc(ctx, b.lib.SSL_CTX_free)
5bc286
         ssl = b.lib.SSL_new(ctx)
5bc286
         ssl = b.ffi.gc(ssl, b.lib.SSL_free)
5bc286
-- 
5bc286
2.17.1
5bc286