LP #1007164: SSL connection error: protocol version mismatch

Description

**Reported in Launchpad by mgrennan last update 12-12-2016 04:19:43

Percona Server (MySQL) version Ver 5.5.23-55-log for Linux on x86_64 (Percona Server (GPL), Release rel25.3, Revision 240)

This is added to my.cnf
[mysqld]
ssl-ca = /root/newcerts/ca-cert.pem
ssl-cipher = DHE-RSA-AES256-SHA:AES128-SHA

MySQL show SSL is working enabled.
mysql> show global variables like '%Ssl%';
----------------------------------------------+

Variable_name

Value

----------------------------------------------+

have_openssl

YES

have_ssl

YES

ssl_ca

/root/newcerts/ca-cert.pem

ssl_capath

 

ssl_cert

 

ssl_cipher

DHE-RSA-AES256-SHA:AES128-SHA

ssl_key

 

----------------------------------------------+

No mater how I connect (-h) or who I connect as (-u) I get the same message when trying to use sll.

mysql --ssl-ca=/root/newcerts/ca-cert.pem
ERROR 2026 (HY000): SSL connection error: protocol version mismatch

Environment

None

Smart Checklist

Activity

Show:

George Lorch November 21, 2019 at 10:52 PM

Incomplete and no activity for > 90 days, please request to re-open if you obtain more information of believe this is in error.

lpjirasync January 24, 2018 at 4:24 AM

**Comment from Launchpad by: Anatoli on: 12-12-2016 04:19:41

If you tried everything, but SSL is not working, and at the same time you're running mysqld in chroot, then the cause for the errors like:

ERROR 2026 (HY000): SSL connection error: error:00000001:lib(0):func(0):reason(1)

or

ERROR 2026 (HY000): SSL connection error: protocol version mismatch

could be that you forgot to create dev/random and dev/urandom devices in the chroot environment (and openssl lib can't obtain entropy - it opens these devices after chroot). You can do that this way (replace /srv/mysqld with your chroot dir and mysqld with the user mysqld is running under):

sudo install -d -o mysqld -g mysqld -m 500 /srv/mysqld/dev
sudo mknod -m 444 /srv/mysqld/dev/random c 1 8
sudo mknod -m 444 /srv/mysqld/dev/urandom c 1 9

lpjirasync January 24, 2018 at 4:24 AM

**Comment from Launchpad by: Valerii Kravchuk on: 24-05-2013 13:58:07

All reporters,

Do you agree that with certificates properly created this problem is not repeatable?

lpjirasync January 24, 2018 at 4:24 AM

**Comment from Launchpad by: Andrian Jardan on: 17-04-2013 14:54:58

The official guide (http://dev.mysql.com/doc/refman/5.5/en/creating-ssl-certs.html) has -set_serial 01 for both server and client certificates, that is the reason why the issue appears.

use -set_serial 02 for the client certificate, and everything should be good. Make sure the output of the check command is the same as in the howto (openssl verify ...).

lpjirasync January 24, 2018 at 4:24 AM

**Comment from Launchpad by: Tamas Papp on: 07-01-2013 19:42:28

Works fine with certificates created by openssl 0.9.8o from debian squeeze.

Incomplete

Details

Assignee

Reporter

Priority

Smart Checklist

Created January 24, 2018 at 4:24 AM
Updated November 21, 2019 at 10:52 PM
Resolved November 21, 2019 at 10:52 PM

Flag notifications