【发布时间】:2018-03-22 02:40:01
【问题描述】:
我已使用 openSSL 以下命令生成自签名证书 在我基于 ubuntu 的电脑中。
openssl req -x509 -newkey rsa:2048 -nodes -keyout key.pem -out cert.pem -pubkey -days 365 -subj "/C=NZ/ST=LH/O=SoN, Inc./CN=10.16.1.96" -reqexts Canada -config <(cat /etc/ssl/openssl.cnf <(printf "[Wellington]\nsubjectAltName=DNS:10.16.1.96,DNS:10.16.1.96"))
接下来,我在运行网络服务器并使用这些密钥的 raspberrypi(10.16.1.96) 中复制了私钥和 cert.pem。
另外,我已经在我的 chrome 浏览器中添加了 cert.pem - 管理证书/权限,我已经导入了这个证书。
但是,我的浏览器抱怨这个 -
Subject Alternative Name missing
The certificate for this site does not contain a Subject Alternative Name extension containing a domain name or IP address.
Certificate error
There are issues with the site's certificate chain (net::ERR_CERT_COMMON_NAME_INVALID).
我怎样才能摆脱这个错误?
【问题讨论】: