ssl - 其中 X509 StoreName 是指存储在 Windows10 中受信任的根证书颁发机构下的证书

标签 ssl client-certificates x509certificate2

枚举 AuthRoot 时和 CertificateAuthorities X509 商店,我一直找不到导入到 Trusted Root Certification Authorities 的自签名 SSL 证书在本地机器上:

        X509Store store = new X509Store(StoreName.AuthRoot);  // also tried StoreName.CertificateAuthorities
        store.Open(OpenFlags.ReadOnly);
        var storecollection = (X509Certificate2Collection) store.Certificates;
        foreach (X509Certificate2 x509 in storecollection)
        {
            Console.WriteLine("certificate name: {0}", x509.Subject);
        }
自签名 SSL 证书是否被枚举器视为无效而跳过?我找错地方了吗?
这是我在 MMC 的证书管理单元中看到的内容:
MMC Certificates snap-in

最佳答案

StoreName.Root是您想要的“受信任的根证书颁发机构”。AuthRoot是“第三方根证书颁发机构”,CertificateAuthority是“中级证书颁发机构”。

关于ssl - 其中 X509 StoreName 是指存储在 Windows10 中受信任的根证书颁发机构下的证书,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63286085/

相关文章:

certificate - IISExpress ClientCertificate 设置步骤

python - 如何使用客户端证书从 python 发出休息调用请求(在 Windows 中)

java - 使用 Java 的 SunMSCAPI/Windows-MY 访问智能卡证书以进行 TLS/SSL 连接并进行客户端身份验证

php - composer 无法安装 slim api 框架

php - 我应该如何保护我的银行卡详细信息表格?

ios - 如何让 AVPlayer 检索受 SSL 保护的播放列表?

api - 如何将 .pfx 文件添加到 Postman?

c# - 解决 WCF 错误 : The EncryptedKey clause was not wrapped with the required encryption token 'System.IdentityModel.Tokens.X509SecurityToken'

c# - 在 .Net 中创建和验证 x509 证书

c# - X509Certificate2 Import PathTooLongException : The specified path, 文件名,或两者都太长