Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
838 views
in Technique[技术] by (71.8m points)

google-chrome - 使Chrome接受自签名的本地主机证书(Getting Chrome to accept self-signed localhost certificate)

I have created a self-signed SSL certificate for the localhost CN.

(我已经为本地主机CN创建了一个自签名SSL证书。)

Firefox accepts this certificate after initially complaining about it, as expected.

(如预期的那样,Firefox在最初抱怨它之后接受了该证书。)

Chrome and IE, however, refuse to accept it, even after adding the certificate to the system certificate store under Trusted Roots.

(但是,即使将证书添加到“受信任的根”下的系统证书存储中,Chrome和IE也拒绝接受它。)

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.

(即使我在Chrome的HTTPS弹出窗口中单击“查看证书信息”时列出的证书已正确安装,它仍然坚持认为证书不可信任。)

What am I supposed to do to get Chrome to accept the certificate and stop complaining about it?

(我应该怎么做才能让Chrome接受证书并停止抱怨呢?)

  ask by pjohansson translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

For localhost only:

(仅适用于localhost)

Simply paste this in your chrome:

(只需将其粘贴到您的Chrome中:)

chrome://flags/#allow-insecure-localhost

You should see highlighted text saying: Allow invalid certificates for resources loaded from localhost

(您应该看到突出显示的文字:允许从本地主机加载的资源使用无效证书)

Click Enable .

(点击Enable 。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...