我已经使用以下命令使用 powershell 创建了一个证书
New-SelfSignedCertificate -Subject “CN=”ids” -CertStoreLocation “cert:\Localmachine\My”
我也将此证书复制到受信任的根证书中。设置 IIS 以使用此证书,但 chrome 显示错误不安全 (NET::ERR_CERT_COMMON_NAME_INVALID)。设置及问题请参考附件
请帮我解决这个问题
首先,您需要在hosts文件中添加“127.0.0.1 ids”。
其次,更改powershell命令行重新生成证书。删除旧的并使用这个新的。
New-SelfSignedCertificate -DnsName "ids" -CertStoreLocation “cert:\Localmachine\My”
New-SelfSignedCertificate -Subject “CN=ids” -DnsName ”ids”, ”idsDomin1”,”idsDomin2” -CertStoreLocation “cert:\Localmachine\My”
使用 IIS 自签名证书禁用 HTTP/2 对我有用。