gpt4 book ai didi

c# - 我如何在 bouncyCaSTLe 中执行此操作(获取已安装的证书)?

转载 作者:太空狗 更新时间:2023-10-29 22:24:08 28 4
gpt4 key购买 nike

好吧,我对 bouncyCaSTLe 的加密世界还很陌生,也许是一个心理障碍,我似乎无法找到(/google for)等同于:

X509Store store = 
new X509Store(StoreName.My, StoreLocation.CurrentUser);
store.Open(OpenFlags.ReadOnly);

我认为这可能是最简单和最愚蠢的事情,但我如何使用充气城堡访问 Windows 安装的证书?

或者如果我不能,我该如何转换我的 System.Security.Cryptography.X509Certificates.X509Certificate2Org.BouncyCaSTLe.X509.X509Certificate

最佳答案

BouncycaSTLe 无法访问 Windows 证书存储,这是 Microsoft 的 .NET 类的作用。要在 .NET 证书和它们的 BouncycaSTLe 等效证书之间进行转换,请查看 Org.BouncyCaSTLe.Security.DotNetUtilities 类中的方法,尤其是 ToX509CertificateFromX509Certificate 方法。

关于c# - 我如何在 bouncyCaSTLe 中执行此操作(获取已安装的证书)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6549565/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com