问题
I want to test my website in Mac with localhost.
I followed this step to generate localhost.crt
and localhost.key
. Then, I double-clicked localhost.crt
to insert it in System
of Keychains
and then set Always Trust
.
Then, I launched the website in Chrome. I still see Your connection to this site is not secure
and Certificate (Invalid)
.
Does anyone know how to fix this?
回答1:
The message indicates that the browser didn’t accept the certificate and can happen when you got the wrong domain, the certificate expired (not your case) or the browser doesn't recognize the certificate authority from where the certificate came from (most likely that's the case).
When creating a self signed SSL certificate, the browser (Firefox) can also return
Invalid Certification Authority
And the Chrome can say
Not secure
This is fine since one uses a self-signed certificate.
来源:https://stackoverflow.com/questions/60480306/self-signed-root-certificate-is-still-not-valid