我怎样才能做到这一点在BouncyCastle的(已安装的证书)? [英] How can I do that in bouncyCastle (get installed certificates)?

查看:260
本文介绍了我怎样才能做到这一点在BouncyCastle的(已安装的证书)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,我是很新的BouncyCastle的的加密世界里,也许是一个心理障碍,我似乎无法找到(/谷歌)相当于:

Ok, I am quite new to the crypto world of bouncyCastle, and perhaps is a mental block, I can't seem to find(/google for) the equivalent to:

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



我想这可能是最简单,最愚蠢的事情,但我怎么能访问安装的证书窗户,使用充气城堡?

I think it might be the easiest and dumbest thing, but how can I access the windows installed certificates, using bouncy castle?

或者,如果我不能,我怎么能转换我的 System.Security.Cryptography.X509Certificates.X509Certificate2
Org.BouncyCastle.X509.X509Certificate

Or if I can't, how can i convert my System.Security.Cryptography.X509Certificates.X509Certificate2 to Org.BouncyCastle.X509.X509Certificate?

推荐答案

BouncyCastle的不能访问到Windows证书存储,这是微软的.NET类的角色。到.NET证书及其BouncyCastle的等价物来看看在 Org.BouncyCastle.Security.DotNetUtilities 类,特别是 ToX509Certificate FromX509Certificate 方法。

Bouncycastle doesn't have access to Windows certificates store, that is the role of Microsoft's .NET classes. To convert between .NET certificates and their Bouncycastle equivalents look at the methods in the Org.BouncyCastle.Security.DotNetUtilities class, particularly the ToX509Certificate and FromX509Certificate methods.

这篇关于我怎样才能做到这一点在BouncyCastle的(已安装的证书)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆