在本地商店找不到证书

发布于 2024-10-27 11:00:34 字数 539 浏览 4 评论 0原文

我已按照以下说明安装了 x509 证书; http://www.vandyke.com/products/vshell/docs /windows/Use_X.509_Certificates.htm 这会将其安装到受信任的根证书颁发机构存储 AuthRoot 中。 当试图找到证书时; 打开商店:X509Store store = new X509Store(StoreName.AuthRoot) 循环遍历,找到带有 X 指纹的一个。当它安装到受信任的根证书身份验证存储中时,它可以正常工作。

当我尝试执行相同操作但将其安装到个人商店中时,请将打开商店更改为 X509Store store = new X509Store(StoreName.My) 我找不到证书。

查看 certmgr,我可以在个人->证书下看到它。

IIS7中的个人证书需要配置吗?谁能帮助解释我所缺少的东西?

I have installed an x509 cert following these directions; http://www.vandyke.com/products/vshell/docs/windows/Use_X.509_Certificates.htm
This istalls it into the trusted root certification authorities store, AuthRoot.
When trying to find the cert;
open the store:X509Store store = new X509Store(StoreName.AuthRoot)
loop through, find one with X thumbprint. This works fine when it is installed into the trusted root cert auth store.

When I try to do the same but install it into the personal store, change opening the store to
X509Store store = new X509Store(StoreName.My) I can not find the cert.

Looking in the certmgr I can see it under personal->certificates.

Is there configuration required in IIS7 for personal cert? Could anyone help explain what I'm missing?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

空‖城人不在 2024-11-03 11:00:34

对于受信任的根证书颁发机构,它是 StoreName.Root,而不是 StoreName.AuthRoot。

对于个人存储,您必须使用带有 StoreLocation 参数的 X509Store 构造函数才能使用本地计算机、个人存储,否则您将在当前用户、个人存储中搜索。

尝试:

var store = new X509Store(StoreName.My, StoreLocation.LocalMachine);

It's StoreName.Root, not StoreName.AuthRoot, for Trusted Root Certification Authorities.

For the personal store, you have to use the X509Store constructor with the StoreLocation parameter to use the Local Computer, Personal store, otherwise you are searching in the Current User, Personal store.

Try:

var store = new X509Store(StoreName.My, StoreLocation.LocalMachine);
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文