Ssl-Certificate

Chrome 自簽名萬用字元證書錯誤

  • May 16, 2017

一段時間以來,我一直在內部系統中使用相同的萬用字元證書。我已將證書添加(並信任)到我的 OSX 鑰匙串中。但是,我在嘗試使用 Chrome 訪問我的網站時仍然收到錯誤消息:

Attackers might be trying to steal your information from jenkins.kensnet.priv (for example, passwords, messages, or credit cards). NET::ERR_CERT_COMMON_NAME_INVALID
Subject: *.kensnet.priv
Issuer: *.kensnet.priv
Expires on: Oct 18, 2023
Current date: May 16, 2017

This server could not prove that it is jenkins.kensnet.priv; its security certificate is from [missing_subjectAltName]. This may be caused by a misconfiguration or an attacker intercepting your connection.

如何讓 Chrome 允許使用此萬用字元證書?

您需要重新創建證書並分配 SubjectAltName。這適用於帶有 Brew 的 OSX 10.11.6 上的我:

openssl req -x509 -sha256 -nodes -days 3650 \
-newkey rsa:2048 -keyout visible.priv.key \ 
-out kensnet.priv.crt -subj "/CN=*.kensnet.priv" \
-reqexts SAN -extensions SAN -config <(cat /usr/local/etc/openssl/openssl.cnf \
<(printf '[SAN]\nsubjectAltName=DNS:*.kensnet.priv'))

引用自:https://serverfault.com/questions/850544