Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am using a self-signed certificate from OpenSSL on localhost with the URL https://localhost.com:3000 Chrome is complaining about an insecure connection. Your connection to this site is not secure This is my openssl.conf

[req]
default_bits = 2048
distinguished_name = dn
prompt             = no

[dn]
C="US"
ST="CA"
L="Venice Beach"
O="YIDAS"
OU="Service"
emailAddress="[email protected]"
CN="localhost.com"

[req_ext]
subjectAltName = DNS:127.0.0.1

[alt_names]
DNS.1=localhost.com 
DNS.2=$HOSTNAME 
IP.1=127.0.0.1
[v3_req]
keyUsage = critical, digitalSignature, keyAgreement
extendedKeyUsage = serverAuth
subjectAltName = DNS:127.0.0.1

Am I missing something?

question from:https://stackoverflow.com/questions/65888653/ssl-insecure-connection

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.2k views
Welcome To Ask or Share your Answers For Others

1 Answer

Need way more information. Chrome gives more information in the error message.

First, try using the address localhost and use it both in the CN and subjectAltName fields. An ip address is not a DNS name.

Second, verify that whatever server is using the created certificate by inspecting it from chrome.

Third, make sure the certificate is trusted by chrome by importing it into the chrome certificate store.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...