Blame SOURCES/MySQL-python-no-openssl.patch

3376f0
mysql 5.5 does not export a HAVE_OPENSSL symbol, thus breaking MySQL-python's
3376f0
rather-misguided-anyway conditional compilation for SSL support.  Since we
3376f0
have no intention of ever shipping a non-SSL-enabled mysql in Fedora/RHEL,
3376f0
we can just drop the conditionals, pending some other fix upstream.
3376f0
(Since mysql_ssl_set is supposed to exist anyway, this might well be a
3376f0
suitable fix for upstream too.)
3376f0
3376f0
d9cb6a
diff -Naur MySQL-python-1.2.5.orig/_mysql.c MySQL-python-1.2.5/_mysql.c
d9cb6a
--- MySQL-python-1.2.5.orig/_mysql.c	2014-01-02 13:52:50.000000000 +0100
d9cb6a
+++ MySQL-python-1.2.5/_mysql.c	2015-10-15 17:14:08.495603713 +0200
d9cb6a
@@ -551,10 +551,8 @@
d9cb6a
 	MYSQL *conn = NULL;
d9cb6a
 	PyObject *conv = NULL;
d9cb6a
 	PyObject *ssl = NULL;
d9cb6a
-#if HAVE_OPENSSL
d9cb6a
 	char *key = NULL, *cert = NULL, *ca = NULL,
d9cb6a
 		*capath = NULL, *cipher = NULL;
d9cb6a
-#endif
d9cb6a
 	char *host = NULL, *user = NULL, *passwd = NULL,
d9cb6a
 		*db = NULL, *unix_socket = NULL;
d9cb6a
 	unsigned int port = 0;
d9cb6a
@@ -618,18 +616,12 @@
d9cb6a
 #endif
d9cb6a
 
d9cb6a
 	if (ssl) {
d9cb6a
-#if HAVE_OPENSSL
d9cb6a
 		PyObject *value = NULL;
d9cb6a
 		_stringsuck(ca, value, ssl);
d9cb6a
 		_stringsuck(capath, value, ssl);
d9cb6a
 		_stringsuck(cert, value, ssl);
d9cb6a
 		_stringsuck(key, value, ssl);
d9cb6a
 		_stringsuck(cipher, value, ssl);
d9cb6a
-#else
d9cb6a
-		PyErr_SetString(_mysql_NotSupportedError,
d9cb6a
-				"client library does not have SSL support");
d9cb6a
-		return -1;
d9cb6a
-#endif
d9cb6a
 	}
d9cb6a
 
d9cb6a
 	Py_BEGIN_ALLOW_THREADS ;
d9cb6a
@@ -667,11 +659,9 @@
d9cb6a
 	if (local_infile != -1)
d9cb6a
 		mysql_options(&(self->connection), MYSQL_OPT_LOCAL_INFILE, (char *) &local_infile);
d9cb6a
 
d9cb6a
-#if HAVE_OPENSSL
d9cb6a
 	if (ssl)
d9cb6a
 		mysql_ssl_set(&(self->connection),
d9cb6a
 			      key, cert, ca, capath, cipher);
d9cb6a
-#endif
d9cb6a
 
d9cb6a
 	conn = mysql_real_connect(&(self->connection), host, user, passwd, db,
d9cb6a
 				  port, unix_socket, client_flag);