Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
10.2.11, 10.0(EOL), 10.1(EOL), 10.2(EOL)
-
CentOS Linux release 7.4.1708
Description
Following the directions in https://mariadb.com/kb/en/library/replication-with-secure-connections/, after generating keys following the tutorial at https://www.cyberciti.biz/faq/how-to-setup-mariadb-ssl-and-secure-connections-from-clients/ linked from https://mariadb.com/kb/en/library/secure-connections-overview/, results in an error.
Specifically:
CHANGE MASTER TO
|
MASTER_HOST='master_host_name', |
MASTER_USER='user_name', |
MASTER_PASSWORD='password', |
MASTER_SSL=1, |
MASTER_SSL_CA = 'ca_file_name', |
MASTER_SSL_CAPATH = 'ca_directory_name', |
MASTER_SSL_CERT = 'cert_file_name', |
MASTER_SSL_KEY = 'key_file_name'; |
is misleading, because the variable MASTER_SSL_CAPATH does nothing in 10.2.11
MASTER_SSL_CA, MASTER_SSL_CERT, and MASTER_SSL_KEY must contain full path names for each corresponding file, and changing the value of MASTER_SSL_CAPATH has no effect on these variables. When the filenames are not fully qualified, turning on replication results in
Last_IO_Error: error connecting to master 'repl@10.0.0.1:3306' - retry-time: 10 maximum-retries: 86400
|
message: SSL connection error: SSL_CTX_set_default_verify_paths failed
|
It's not limited to replication, server --ssl-ca* options exhibit the same behavior.
This works:
bin/mysqld_safe \
--ssl-ca=/data/bld/10.2/mysql-test/std_data/cacert.pem \
--ssl-capath=/data/bld/10.2/mysql-test/std_data/ \
--ssl
+---------------------+-----------------------------------------------+
| Variable_name | Value |
+---------------------+-----------------------------------------------+
| have_openssl | YES |
| have_ssl | YES |
| ssl_ca | /data/bld/10.2/mysql-test/std_data/cacert.pem |
| ssl_capath | /data/bld/10.2/mysql-test/std_data/ |
| ssl_cert | |
| ssl_cipher | |
| ssl_crl | |
| ssl_crlpath | |
| ssl_key | |
| version_ssl_library | OpenSSL 1.0.1t 3 May 2016 |
+---------------------+-----------------------------------------------+
But this doesn't:
bin/mysqld_safe \
--ssl-ca=cacert.pem \
--ssl-capath=/data/bld/10.2/mysql-test/std_data/ \
--ssl
+---------------------+-------------------------------------+
| Variable_name | Value |
+---------------------+-------------------------------------+
| have_openssl | YES |
| have_ssl | DISABLED |
| ssl_ca | cacert.pem |
| ssl_capath | /data/bld/10.2/mysql-test/std_data/ |
| ssl_cert | |
| ssl_cipher | |
| ssl_crl | |
| ssl_crlpath | |
| ssl_key | |
| version_ssl_library | OpenSSL 1.0.1t 3 May 2016 |
+---------------------+-------------------------------------+
2017-12-14 2:37:51 140276674546560 [Warning] Failed to setup SSL
2017-12-14 2:37:51 140276674546560 [Warning] SSL error: SSL_CTX_set_default_verify_paths failed
2017-12-14 2:37:51 140276674546560 [Warning] SSL error: error:02001002:system library:fopen:No such file or directory
2017-12-14 2:37:51 140276674546560 [Warning] SSL error: error:2006D080:BIO routines:BIO_new_file:no such file
2017-12-14 2:37:51 140276674546560 [Warning] SSL error: error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib