Windows 创建 SSL 证书
创建配置文件 openssl-temp.cnf
[req]
distinguished_name = req_distinguished_name
x509_extensions = v3_req
prompt = no
[req_distinguished_name]
C = US
ST = VA
L = SomeCity
O = MyCompany
OU = MyDivision
CN = test.geehon.top
[v3_req]
keyUsage = critical, digitalSignature, keyAgreement
extendedKeyUsage = serverAuth
subjectAltName = @alt_names
[alt_names]
DNS.1 = test.geehon.top
在配置文件的同级目录下运行如下命令创建证书
openssl req -x509 -nodes -days 3650 \
-newkey rsa:2048 -config ./openssl-temp.cnf \
-keyout server.key -out server.crt
Windows edge 浏览器导入刚刚创建的证书
根据证书导入向导安装
重启浏览器,打开本地配置好该 SSL 证书的网站(要事先设置好 host)
本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!