【发布时间】:2019-04-11 15:23:21
【问题描述】:
我最近研究了 Windows 中的证书。
我尝试了两种不同的方式来安装证书:
1.使用certutil命令安装。例如:certutil -addstore -f "ROOT" rootCA.pem
2.使用微软api安装。
certStore = CertOpenSystemStore(NULL, "ROOT")
CertAddEncodedCertificateToStore(
certStore,
X509_ASN_ENCODING | PKCS_7_ASN_ENCODING,
rootCACert,
len(rootCACert),
CERT_STORE_ADD_REPLACE_EXISTING,
NULL
)
安装后,我使用certmgr.msc检查是否成功。
并且 firefox 的 security.enterprise_roots.enabled 设置为 True。
但是我发现了一个奇怪的情况。
Firefox 只信任 certutil 安装的证书。
谁能告诉我为什么?
提前致谢!
【问题讨论】:
标签: windows firefox certificate certutil