Bug #67957 | Client not able to connect to server which has a ssl-cert that is SHA256 | ||
---|---|---|---|
Submitted: | 20 Dec 2012 22:18 | Modified: | 9 Jul 2019 17:15 |
Reporter: | Knut-Sigurd Knuteson | Email Updates: | |
Status: | Won't fix | Impact on me: | |
Category: | MySQL Server: Command-line Clients | Severity: | S2 (Serious) |
Version: | 5.5.28 | OS: | Linux (RHEL 6) |
Assigned to: | CPU Architecture: | Any | |
Tags: | certificate, SHA256, SSL, yassl |
[20 Dec 2012 22:18]
Knut-Sigurd Knuteson
[25 Dec 2012 16:40]
Sveta Smirnova
Thank you for the report. I can not repeat described behavior with certificates and key created using tutorial from http://dev.mysql.com/doc/refman/5.5/en/creating-ssl-certs.html with modification adding -sha256 to commands (file will be attached shortly: mysql> \s -------------- ../../bin/mysql Ver 14.14 Distrib 5.5.28, for Linux (x86_64) using EditLine wrapper Connection id: 1 Current database: Current user: root@localhost SSL: Cipher in use is DHE-RSA-AES256-SHA Current pager: stdout Using outfile: '' Using delimiter: ; Server version: 5.5.28-enterprise-commercial-advanced-log MySQL Enterprise Server - Advanced Edition (Commercial) Protocol version: 10 Connection: Localhost via UNIX socket Server characterset: latin1 Db characterset: latin1 Client characterset: latin1 Conn. characterset: latin1 UNIX socket: /tmp/SSgmBoUmoJ/mysqld.1.sock Uptime: 1 min 3 sec Threads: 1 Questions: 4 Slow queries: 0 Opens: 33 Flush tables: 1 Open tables: 26 Queries per second avg: 0.063 -------------- Please check these commands and explain why you want to use different way to create certificates and keys.
[25 Dec 2012 16:40]
Sveta Smirnova
Script to create keys/certs. Change paths!
Attachment: create_certs.sh (application/x-sh, text), 6.17 KiB.
[26 Dec 2012 18:54]
Knut-Sigurd Knuteson
So I tried using the method in the script to generate the certificates. However, the command: openssl ca -cert $DIR/ca-cert.pem -policy policy_anything \ -out $DIR/server-cert.pem -config $DIR/openssl.cnf \ -batch -passin pass:password \ -infiles $DIR/server-req.pem creates a sha1 certificate, which I checked using: openssl x509 -text -in $DIR/server-cert.pem The output shows: Certificate: Data: Version: 3 (0x2) Serial Number: 1 (0x1) Signature Algorithm: sha1WithRSAEncryption ... If I use the commands I gave it will say "sha256WithRSAEncryption".
[26 Dec 2012 19:37]
Sveta Smirnova
Thank you for the feedback. Verified as described. Removing option from openssl x509 -sha256 solves the problem.
[16 Jan 2013 17:15]
Dossy Shiobara
I'm experiencing the same symptoms, but with an 2048-bit sha1WithRSAEncryption issued by GoDaddy. Server is 5.5.27 on Linux (x86_64), client is 5.5.29 for Win32 (x86). I get this error: > ERROR 2026 (HY000): SSL connection error: unknown error number The certificate and CA certificate verifies correctly: # openssl verify -CAfile /etc/pki/tls/certs/gd_bundle.crt -purpose sslserver /etc/pki/tls/certs/REDACTED.crt /etc/pki/tls/certs/REDACTED.crt: OK The error message is less than helpful in troubleshooting why it's failing.
[17 Jun 2013 13:49]
MySQL Verification Team
Bug #69402 marked as duplicate of this one
[11 Apr 2014 19:59]
Jsaon Klein
We are replacing all of our certificates on servers that were exposed to SSL Heartbleed. Our original certificates were previously signed by Comodo with SHA-1. Our new (reissued) certificates are signed by Comodo with SHA-256. When we installed the new SSL certificates on our servers, the 5.5.35 clients are suddenly unable to connect to the (yaSSL) MySQL servers serving these new SHA256 certificates. We are receiving the following error messages: # mysql client ERROR 2026 (HY000): SSL connection error: ASN: bad other signature confirmation # mysqladmin error: 'SSL connection error: protocol version mismatch'
[16 Apr 2014 15:58]
Bram Matthys
Same here. I can't use our 'real' certificate because it uses a SHA256 hash. Now I have to generate my own (snakeoil) cert.. that's just a pity, really. This is on 5.5.35
[29 Apr 2014 12:53]
Brodey Dover
I'm experiencing this issue on 5.5.37 (ubuntu) with steps that are in production right now. This should work and yet: root@ubuntu:/etc/mysql/ssl# mysql -uroot -ptr1m@r@ --ssl-ca=ca-cert.pem --ssl-key=master1-key.pem --ssl-cert=master1-cert.pem ERROR 2026 (HY000): SSL connection error: ASN: bad other signature confirmation This output would indicate, all is well: root@ubuntu:/etc/mysql/ssl# openssl verify -CAfile ca-cert.pem master1-cert.pem master2-cert.pem master1-cert.pem: OK master2-cert.pem: OK
[7 May 2014 10:01]
Nigel Kukard
Same problem here using GoDaddy, Comodo and StartCom SSL certificates with RSA256. What a pity.
[7 May 2014 10:41]
Nigel Kukard
It seems the error "ERROR 2026 (HY000): SSL connection error: ASN: bad other signature confirmation" is also generated when you try use a plain .crt certificate. I solved the issue by adding the CA's chain certificate to the end of the crt and pointing ssl-ca to the system ca-certificates.crt file. Works now with both sha1 and sha2 certificates. Here is a outline of the steps: cat mydomain.example.net.crt ca-chain-cert.crt > mydomain.example.net.pem Here is my config... [mysqld] ssl ssl-cert=/etc/ssl/mydomain.example.net.pem ssl-key=/etc/ssl/private/mydomain.example.net.key ssl-ca=/etc/ssl/certs/ca-certificates.crt
[9 Mar 2016 23:53]
MySQL Verification Team
The issue is that YaSSL does not support SHA2 until versions 5.5.40, 5.6.11 and higher. Please upgrade to these versions and try again.
[9 Jul 2019 17:12]
Paul DuBois
Posted by developer: This is a yaSSL issue. yaSSL support is removed as of MySQL 5.6.46/5.7.28, so this bug is being closed with no action taken.