Consider following example:
We created own CA certificate (self-signed) and imported into browser trust store. We signed certificate by this CA certificate with SAN extension with following domains:
- DNS: *.dev
- DNS: *.*.dev
No matter if CN is present in certificate or even whole DN is missing. Still getting following errors in browsers when accessing domain https://test.dev:
Firefox 45.8.0:
test.dev uses an invalid security certificate. The certificate is only valid for the following names: *.dev, *.*.dev Error code: SSL_ERROR_BAD_CERT_DOMAIN
Chrome 58.0.3029.81 (64-bit):
NET::ERR_CERT_COMMON_NAME_INVALID
There is only one working wildcard in SAN for third level domain, when browsers accepts connection:
- DNS: *.secondlevel.dev
Multilevel wildcard in SAN is not accepted by browsers:
- DNS: *.*.secondlevel.dev
Is there a way to have multilevel wildcard in SAN extension or what are limitations for wildcards in SAN extensions?