I've been trying to get stunnel
to work with my signed certificate (with a CA that I've trusted in Firefox). The error is:
127.0.0.1:5559 uses an invalid security certificate.
The certificate is only valid for 127.0.0.1
Error code: SSL_ERROR_BAD_CERT_DOMAIN
However, 127.0.0.1
is in alternative DNS names. Here is my OpenSSL config file:
[req]
distinguished_name = req_distinguished_name
req_extensions = v3_req
prompt = no
[req_distinguished_name]
CN = chacheserver.net
[v3_req]
keyUsage = digitalSignature, keyEncipherment, dataEncipherment, keyAgreement
extendedKeyUsage = serverAuth, clientAuth
subjectAltName = @alt_names
[alt_names]
DNS.1 = chacheserver.net
DNS.2 = *.chacheserver.net
DNS.3 = *.*.chacheserver.net
DNS.4 = *.*.*.chacheserver.net
DNS.5 = 192.168.1.130
DNS.6 = 192.168.1.70
DNS.7 = 192.168.2.130
DNS.8 = 192.168.2.70
DNS.9 = 192.168.8.70
DNS.10 = 192.168.8.130
DNS.11 = 127.0.0.1
openssl x509 -noout -text -in certfile
show the SAN values (assuming you have or get it in a file)?