ssl - 无法通过通用名称访问服务器

标签 ssl openssl certificate ssl-certificate x509certificate

我在具有以下字段的 apache 服务器上安装了一个服务器证书

1) 通用名称:192.168.0.107

2) 主题别名: IP:192.168.0.108,IP:192.168.0.109

当浏览器访问任何主题备用名称时,浏览器显示绿色挂锁(安全连接),但当我尝试通过其通用名称访问服务器时,浏览器显示(不安全连接)。为什么会这样?我的证书有什么问题吗?请帮我解决这个问题

注意:我已经在浏览器上安装了根证书

最佳答案

自 2000 年引入基于 TLS 的 HTTP 以来,RFC2818 对其进行了定义commonName 字段的使用已被视为已弃用,如果存在 SubjectAlternativeName,则必须使用它。

If a subjectAltName extension of type dNSName is present, that MUSTbe used as the identity. Otherwise, the (most specific) Common Name field in the Subject field of the certificate MUST be used. Although the use of the Common Name is existing practice, it is deprecated and Certification Authorities are encouraged to use the dNSName instead.

目前大多数浏览器都需要 SAN 扩展,甚至不接受只有 CN 的证书。参见 https://security.stackexchange.com/questions/172626/chrome-requires-san-names-in-certificate-when-will-other-browsers-ie-follow

关于ssl - 无法通过通用名称访问服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55748509/

相关文章:

ssl - postman 未发送客户证书

C++ 和 OpenSSL : SIGPIPE when writing in closed pipe

c - 如何以编程方式从证书中提取信息?

apache - 用于嵌套子域的 OpenSSL 和 apache2 通配符自签名证书

ssl - 电话和后端连接,如何最大限度地减少黑客攻击

python - 在 python 中使用请求时,出现以下错误 "TLSV1_ALERT_PROTOCOL_VERSION."为什么会发生这种情况?

ssl - IBM MQ 和 Weblogic JMS 之间的连接认证

c++ - OpenSSL私钥读取错误(PEM_read_bio_RSAPrivateKey)

ssl - 如何确定最新的 OpenSSL 版本

c# - 如何以编程方式设置 X509Certificate2 的 PIN?