LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-15-2014, 09:14 PM   #1
prw8864
LQ Newbie
 
Registered: Apr 2013
Distribution: Suse 12.3
Posts: 18

Rep: Reputation: Disabled
ERROR 2026 (HY000): SSL connection error: SSL_CTX_set_default_verify_paths failed


I am trying to set up an SSL connection to a Mariadb database
Server version: 5.5.33-MariaDB openSUSE package
and am getting this error each time I try to log into a user set up for SSL
I have done the following to work this out.
1) I have set up and placed the
[mysqld]
ssl-ca=/etc/mysql/newcerts/ca-cert.pem
ssl-cert=/etc/mysql/newcerts/server-cert.pem
ssl-key=/etc/mysql/newcerts/server-key.pem
[client]
ssl-ca=/etc/mysql/newcerts/ca-cert.pem
ssl-cert=/etc/mysql/newcerts/client-cert.pem
ssl-key=/etc/mysql/newcerts/client-key.pem

2) as per reading on the error I have changed the CN values such that the client is not the same as the server

CN=Phillip_Wyckoff_S server
CN=Phillip_wyckoff_C cient

3) have verified the cert with
openssl verify -CAfile ca-cert.pem server-cert.pem client-cert.pem
server-cert.pem: OK
client-cert.pem: OK

show grants for 'SSL_user'@'%';
|
| GRANT USAGE ON *.* TO 'SSL_user'@'%' IDENTIFIED BY PASSWORD
'*****************************************' REQUIRE SSL
| GRANT SELECT, INSERT, UPDATE, DELETE ON `appt_db`.* TO 'SSL_user'@'%' |

mysql -u SSL_user --ssl-ca=/etc/mysql/newcerts/ca-cert.pem
ERROR 2026 (HY000): SSL connection error: SSL_CTX_set_default_verify_paths failed

MariaDB [(none)]> show variables like 'have_ssl';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| have_ssl | YES |
+---------------+-------+
1 row in set (0.00 sec)

MariaDB [(none)]> SHOW STATUS LIKE 'Ssl_cipher';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Ssl_cipher | |
+---------------+-------+
1 row in set (0.00 sec)

What does this error mean. How to I correct it

Additional note I original set up both CN (client/server) as same Phillip_Wyckoff
I then changed one (server) to Phillip_Wyckoff_S . When I did the I got the error
18 at 0 ...
when I set the client side to Phillip_Wyckoff_C the error went away.. BUT i still can't connect

Last edited by prw8864; 11-15-2014 at 09:20 PM.
 
Old 11-15-2014, 09:24 PM   #2
prw8864
LQ Newbie
 
Registered: Apr 2013
Distribution: Suse 12.3
Posts: 18

Original Poster
Rep: Reputation: Disabled
P.S I used the following to create and verify the files:
# Create CA certificate
openssl genrsa 2048 > ca-key.pem

openssl req -new -x509 -nodes -days 3600 -key ca-key.pem -out ca-cert.pem

# Create server certificate, remove passphrase, and sign it
# server-cert.pem = public key, server-key.pem = private key

openssl req -newkey rsa:2048 -days 3600 -nodes -keyout server-key.pem -out server-req.pem

openssl rsa -in server-key.pem -out server-key.pem

openssl x509 -req -in server-req.pem -days 3600 -CA ca-cert.pem -CAkey ca-key.pem -set_serial 01 -out server-cert.pem

# Create client certificate, remove passphrase, and sign it
# client-cert.pem = public key, client-key.pem = private key

openssl req -newkey rsa:2048 -days 3600 -nodes -keyout client-key.pem -out client-req.pem

openssl rsa -in client-key.pem -out client-key.pem

openssl x509 -req -in client-req.pem -days 3600 -CA ca-cert.pem -CAkey ca-key.pem -set_serial 01 -out client-cert.pem

After generating the certificates, verify them:

openssl verify -CAfile ca-cert.pem server-cert.pem client-cert.pem
server-cert.pem: OK
client-cert.pem: OK
 
  


Reply

Tags
connect, error message, ssl



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Webmin error Failed to save SSL option mikesjays Linux - Software 7 11-06-2017 10:40 PM
[SOLVED] SSL Connection Error JJJCR Linux - Security 13 10-03-2013 09:56 PM
[SOLVED] SSL connection error . call_krushna Linux - Server 6 03-26-2013 11:10 AM
[SOLVED] Error on SVN checkout: SSL handshake failed: SSL error: Key usage violation in certif jsaravana87 Linux - Server 3 05-07-2012 10:00 AM
online_update failed - ERROR(Media:connection failed)[Connect failed] rover SUSE / openSUSE 8 02-22-2005 07:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration