Blame SOURCES/0002-python-pycurl-7.43.0-tls-backend.patch

987b48
From 36dcccb94bef72a7c4cf6acf7479f18568e545bb Mon Sep 17 00:00:00 2001
987b48
From: Kamil Dudka <kdudka@redhat.com>
987b48
Date: Tue, 2 May 2017 17:19:20 +0200
987b48
Subject: [PATCH] module: drop link-time vs. run-time TLS backend check
987b48
987b48
This effectively reverts the following commit:
987b48
8891398a31119ce7c872509ed60328926c51cdfb
987b48
987b48
Bug: https://bugzilla.redhat.com/1446850
987b48
---
987b48
 src/module.c | 20 +-------------------
987b48
 1 file changed, 1 insertion(+), 19 deletions(-)
987b48
987b48
diff --git a/src/module.c b/src/module.c
987b48
index a7108a0..af79875 100644
987b48
--- a/src/module.c
987b48
+++ b/src/module.c
987b48
@@ -322,7 +322,7 @@ initpycurl(void)
987b48
 {
987b48
     PyObject *m, *d;
987b48
     const curl_version_info_data *vi;
987b48
-    const char *libcurl_version, *runtime_ssl_lib;
987b48
+    const char *libcurl_version;
987b48
     size_t libcurl_version_len, pycurl_version_len;
987b48
     PyObject *xio_module = NULL;
987b48
     PyObject *collections_module = NULL;
987b48
@@ -345,24 +345,6 @@ initpycurl(void)
987b48
         goto error;
987b48
     }
987b48
 
987b48
-    /* Our compiled crypto locks should correspond to runtime ssl library. */
987b48
-    if (vi->ssl_version == NULL) {
987b48
-        runtime_ssl_lib = "none/other";
987b48
-    } else if (!strncmp(vi->ssl_version, "OpenSSL/", 8) || !strncmp(vi->ssl_version, "LibreSSL/", 9) ||
987b48
-               !strncmp(vi->ssl_version, "BoringSSL", 9)) {
987b48
-        runtime_ssl_lib = "openssl";
987b48
-    } else if (!strncmp(vi->ssl_version, "GnuTLS/", 7)) {
987b48
-        runtime_ssl_lib = "gnutls";
987b48
-    } else if (!strncmp(vi->ssl_version, "NSS/", 4)) {
987b48
-        runtime_ssl_lib = "nss";
987b48
-    } else {
987b48
-        runtime_ssl_lib = "none/other";
987b48
-    }
987b48
-    if (strcmp(runtime_ssl_lib, COMPILE_SSL_LIB)) {
987b48
-        PyErr_Format(PyExc_ImportError, "pycurl: libcurl link-time ssl backend (%s) is different from compile-time ssl backend (%s)", runtime_ssl_lib, COMPILE_SSL_LIB);
987b48
-        goto error;
987b48
-    }
987b48
-
987b48
     /* Initialize the type of the new type objects here; doing it here
987b48
      * is required for portability to Windows without requiring C++. */
987b48
     p_Curl_Type = &Curl_Type;
987b48
-- 
987b48
2.10.2
987b48