Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chrome显示不安全应该如何解决? #1

Closed
haowanxing opened this issue Dec 22, 2017 · 8 comments
Closed

chrome显示不安全应该如何解决? #1

haowanxing opened this issue Dec 22, 2017 · 8 comments
Labels

Comments

@haowanxing
Copy link
Contributor

RT:在safari下已经信任且通过,在地址栏也有锁了 但是 chrome就是不行, 最新版的chrome

@Fishdrowned
Copy link
Owner

这个问题我也很困惑。

以前 Windows 旧版本的 Chrome 是可以通过的,Firefox 也没事,Linux 下的 Chrome 也没问题,但是不知道从哪个版本开始, Windows 的 Chrome 就不认这个自签名证书了 😰。

Mac 没试过。

@Fishdrowned
Copy link
Owner

以前没重视过这个问题,多谢你提 issue 让我去调查。貌似半年前已经有人发现这个问题了,待验证:
webpack/webpack-dev-server#854

@Fishdrowned
Copy link
Owner

解决了,生成证书的时候重新生成一个 key,不偷懒重复使用 root key 就可以了。

@aoeng
Copy link

aoeng commented Jan 23, 2018

@Fishdrowned 没明白,能详细说明下吗?怎么重新生成key啊?

@haowanxing
Copy link
Contributor Author

@upgod 作者已经在代码中修复这个BUG,解决方案就是生成证书的时候不使用和根证书相同的密钥。
如果你遇到了此bug,可以尝试clone最新的代码下来重新制作证书。

@aoeng
Copy link

aoeng commented Jan 23, 2018

@haowanxing 域名文件夹下的key是一个软链接,我用的是软连接指向的源文件 out/cert.key.pem
这个文件,还是不安全,我的代码是刚clone的.
nginx配置:

        listen 443 ssl default_server;
        listen [::]:443 ssl default_server;


        ssl on;
        ssl_certificate /www/ssl/out/test.exp/test.exp.bundle.crt;
        ssl_certificate_key /www/ssl/out/test.exp/test.exp.key.pem;

我的是ubuntu,并且root.crt已经导入并信任

@Fishdrowned
Copy link
Owner

Chrome Ubuntu 要在浏览器中导入 root.crt。
你可以附上截图看一下 Chrome 具体报什么错吗?(F12 >> Security 标签)

@aoeng
Copy link

aoeng commented Jan 24, 2018

This page is not secure (broken HTTPS).

Active content with certificate errors
You have recently allowed content loaded with certificate errors (such as scripts or iframes) to run on this site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants