给本地localhost域名添加https证书
1 ssl 给本地localhost域名添加https证书 2 mkcert https://github.com/FiloSottile/mkcert [dn] CN=localhost [req] distinguished_name = dn [EXT] subjectAltName=DNS:localhost keyUsage=digitalSignature extendedKeyUsage=serverAuth d:\localhost.cnf cd "D:\Program Files (x86)\GnuWin32\bin" .\openssl req -x509 -out localhost.crt -keyout localhost.key -newkey rsa:2048 -nodes -sha256 -subj '/CN=localhost' -extensions EXT -config d:\localhost.cnf 本文介绍如何给本地域名localhost添加证书,但此方法仅限在开发环境使用。在生产环境中,强烈禁止使用自签名证书。 创建认证中心(Certificate authority,CA) 生成RootCA.pem, RootCA.key 以及 RootCA.crt: openssl req -x509 -nodes -new