Getting Chrome to accept self
I have created a self-signed SSL certificate for the localhost CN. Firefox accepts this certificate after initially complaining about it, as expected. Chrome and IE, however, refuse to accept it, even after adding the certificate to the system certificate store under Trusted Roots. Even though the certificate is listed as correctly installed when I click "View certificate information" in Chrome's HTTPS popup, it still insists the certificate cannot be trusted.
What am I supposed to do to get Chrome to accept the certificate and stop complaining about it?
This worked for me:
Chrome Settings > Show advanced settings > HTTPS/SSL > Manage Certificates
. Authorities
tab and scroll down to find your certificate under the Organization Name that you gave to the certificate. You should get the nice green lock on your pages now.
EDIT: I tried this again on a new machine and the certificate did not appear on the Manage Certificates window just by continuing from the red untrusted certificate page. I had to do the following:
https://
is crossed out in red), click the lock > Certificate Information. NOTE: on newer versions of chrome, you have to open Developer Tools > Security
, and select View certificate
. Details tab > Export
. Choose PKCS #7, single certificate
as the file format. Authorities tab > Import
and choose the file to which you exported the certificate, and make sure to choose PKCS #7, single certificate
as the file type. NOT FOR PROD
Simply paste this in your chrome:
chrome://flags/#allow-insecure-localhost
You should see highlighted text saying: Allow invalid certificates for resources loaded from localhost
Click Enable
.
On the Mac, you can use the Keychain Access utility to add the self-signed certificate to the System keychain, and Chrome will then accept it. I found the step-by-step instructions here:
Google Chrome, Mac OS X and Self-Signed SSL Certificates
Basically:
上一篇: 使用openssl从服务器获取证书
下一篇: 让Chrome接受自我