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

Categories

0 votes
899 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 Answer

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 。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...