Skip to content

Detect SSL broken on mysqlclient 1.3.11 with mysql < 5.5 #291

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
martinbarlow opened this issue Dec 4, 2018 · 1 comment
Closed

Detect SSL broken on mysqlclient 1.3.11 with mysql < 5.5 #291

martinbarlow opened this issue Dec 4, 2018 · 1 comment

Comments

@martinbarlow
Copy link

Previously mysqlclient would detect if SSL was available by checking for HAVE_OPENSSL in my_config.h

/usr/include/mysql/my_config.h:#include "my_config_x86_64.h"
/usr/include/mysql/my_config_x86_64.h:#define HAVE_OPENSSL 1

In this change ca41a64#diff-b86fdc88461d69279e84018bca8ea267

my_config.h was replaced with mysql.h which does not have the constant defined.

Other > 5.5 would not be affected, as by default SSL is ON

c12e7cc

mysql_config shows it has being built with ssl

mysql_config
Usage: /usr/lib64/mysql/mysql_config [OPTIONS]
Options:
--cflags [-I/usr/include/mysql -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv -fPIC -DUNIV_LINUX -DUNIV_LINUX]
--include [-I/usr/include/mysql]
--libs [-rdynamic -L/usr/lib64/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -lssl -lcrypto]
--libs_r [-rdynamic -L/usr/lib64/mysql -lmysqlclient_r -lz -lpthread -lcrypt -lnsl -lm -lpthread -lssl -lcrypto]
--plugindir [/usr/lib64/mysql/plugin]
--socket [/var/lib/mysql/mysql.sock]
--port [0]
--version [5.1.73]
--libmysqld-libs [-rdynamic -L/usr/lib64/mysql -lmysqld -ldl -lz -lpthread -lcrypt -lnsl -lm -lpthread -lrt -lssl -lcrypto]

This is Centos 6 with mysql-devel-5.1.73-5.el6_7.1.x86_64

Apologies if i am wasting your time.

@martinbarlow
Copy link
Author

oh, and side effect is clients always get exception

_mysql_exceptions.NotSupportedError: client library does not have SSL support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant