相关疑难解决方法(0)

使用可在 Chrome 58 中运行的 openssl 生成自签名证书

从 Chrome 58 开始,它不再接受依赖于Common Name以下内容的自签名证书:https : //productforums.google.com/forum/#! topic/chrome/zVo3M8CgKzQ;context-place = topicsearchin/chrome/category $3ACanary%7Csort:相关性%7Cspell:false

相反,它需要使用Subject Alt Name. 我之前一直在关注有关如何生成自签名证书的指南:https : //devcenter.heroku.com/articles/ssl-certificate-self,它工作得很好,因为我需要server.crtserver.key文件来完成我正在做的事情。我现在需要生成新的证书,其中包括SAN我所有的尝试都没有在 Chrome 58 上工作。

这是我所做的:

我按照上面提到的 Heroku 文章中的步骤来生成密钥。然后我写了一个新的 OpenSSL 配置文件:

[ req ]
default_bits        = 2048
distinguished_name  = req_distinguished_name
req_extensions      = san
extensions          = san
[ req_distinguished_name ]
countryName         = US
stateOrProvinceName = Massachusetts
localityName        = Boston
organizationName    = MyCompany
[ san ]
subjectAltName      = DNS:dev.mycompany.com
Run Code Online (Sandbox Code Playgroud)

然后server.crt使用以下命令生成:

openssl req …
Run Code Online (Sandbox Code Playgroud)

ssl openssl ssl-certificate chrome

70
推荐指数
5
解决办法
11万
查看次数

标签 统计

chrome ×1

openssl ×1

ssl ×1

ssl-certificate ×1