I have a certificate for *.mydomain, and trying to reach the host with https://my-host.mydomain .
Here's the verbose output (scrambled a bit).
curl https://my-host.mydomain --verbose
* Rebuilt URL to: https://my-host.mydomain/
* Trying 10.0.128.43...
* Connected to my-host.mydomain (10.0.128.43) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* Server certificate:
* subject: CN=*.mydomain,OU=MyDomain,O=MyCompany,ST=AZ,C=US
* start date: Nov 09 01:39:29 2016 GMT
* expire date: Nov 09 01:39:29 2017 GMT
* common name: *.mydomain
* issuer: CN=my.other.domain.com,OU=MyDomain,O=MyCompany,ST=AZ,C=US
* NSS error -12276 (SSL_ERROR_BAD_CERT_DOMAIN)
* Unable to communicate securely with peer: requested domain name does not match the server's certificate.
* Closing connection 0
curl: (51) Unable to communicate securely with peer: requested domain name does not match the server's certificate.
I've seen several cases, when people would complain about *.bla not matching bla, but that is not my case.
I only have wild and nonsensical guesses:
- can it have something to do with the issuer being in a completely separate domain?
- maybe I am not allowed to issue level 2 wildcards? (e.g. *.a.b is ok, but *.b is not)
The certificate, obtained the same way for *.other.domain.com works fine.