[MDEV-13102] “SSL certificate validation failure” when verifying wildcard server certificate Created: 2017-06-15 Updated: 2017-06-15 Resolved: 2017-06-15 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | SSL |
| Affects Version/s: | 5.5.52 |
| Fix Version/s: | 10.1.23 |
| Type: | Bug | Priority: | Major |
| Reporter: | Loop system developers | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
CentOS 7, Linux 3.10.0-514.21.1.el7.x86_64 |
||
| Issue Links: |
|
||||||||
| Description |
|
I've been trying to move from using a self-signed certificate to using a wildcard certificate from a well-known CA to reduce maintenance overhead and improve security. The certificate has already been in use for months on test servers. The setup is working well enough that I can do the following (domain name anonymised):
This connects successfully after providing the password. However, when I try to actually verify the certificate Common Name it fails:
After compiling MariaDB 5.5 using
and running the client with
I get the following trace log (trimmed):
Note specifically that the `Server name` value matches the `CN` value. The certificate is valid for the given hostname and is not expired, as verified by `openssl s_client -connect host.example-dot-com-equivalent-for.co.uk:443 -verify_return_error < /dev/null`. The "X509v3 Subject Alternative Name" field contains "DNS:*.example-dot-com-equivalent-for.co.uk, DNS:example-dot-com-equivalent-for.co.uk" The whole certificate chain is in the file pointed to by the server's `ssl-cert` configuration, as recommended elsewhere. "USERTrust RSA Certification Authority" is in the client's /etc/pki/tls/certs/ca-bundle.crt and /etc/pki/tls/certs/ca-bundle.trust.crt. I tried adding `--ssl-ca=/etc/pki/tls/certs/ca-bundle.crt` to the command, but that didn't change anything. The question ends up being: *Do MySQL/MariaDB clients support wildcard certificates? If they do, is something wrong with my connection?* Original client:
Debug client:
Server:
|
| Comments |
| Comment by Sergei Golubchik [ 2017-06-15 ] |
|
This was implemented in |