我正在尝试在Chrome(V68)上保护我的本地主机网站(位于MAMP pro上),到目前为止,我已经做了以下事情:
答案 0 :(得分:2)
在解决此错误方面并不是很出色,他们需要在SSL证书中生成更多信息。要修复它,您需要创建一个conf文件并运行一些终端命令。这一直在为我工作
第一:conf文件sample.local.conf 将sammple.local替换为您的本地网址
[ req ]
default_bits = 4096
distinguished_name = req_distinguished_name
req_extensions = req_ext
[ req_distinguished_name ]
countryName = Country Name (2 letter code)
countryName_default = US
stateOrProvinceName = State or Province Name (full name)
stateOrProvinceName_default = NEW YORK
localityName = Locality Name (eg, city)
localityName_default = NEW YORK
organizationName = Organization Name (eg, company)
organizationName_default = SAMPLE
commonName = Common Name (e.g. server FQDN or YOUR name)
commonName_max = 64
commonName_default = sample.local
[ req_ext ]
subjectAltName = @alt_names
[alt_names]
DNS.1 = sample.local
首先创建.KEY
openssl genrsa -out sample.local.key 4096
制作.CSR
openssl req -new -sha256 \
-out sample.local.csr \
-key sample.local.key \
-config sample.local.conf
然后
openssl req -text -noout -in sample.local.csr
创建.CRT
openssl x509 -req \
-days 3650 \
-in sample.local.csr \
-signkey sample.local.key \
-out sample.local.crt \
-extensions req_ext \
-extfile sample.local.conf
然后,在Mac上,您无需在钥匙串中进行操作,而是可以在终端中运行以下命令
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain sample.local.crt