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