问题描述
我有一个System.Security.Cryptography.X509Certificates.X509Certificate2的对象.我需要将其转换为Org.BouncyCastle.X509.X509Certificate的对象.
I have an object of System.Security.Cryptography.X509Certificates.X509Certificate2.I need to convert it into an object of Org.BouncyCastle.X509.X509Certificate.
有人可以帮我吗?
推荐答案
自从我和Bouncy Castle一起玩已经有一段时间了.基本上采用X509Certificate2.RawData并将其传递给BC X509Certificate构造函数.
It's been a while since I played with Bouncy Castle. Basically take X509Certificate2.RawData and pass it to the BC X509Certificate constructor.
如果我没记错的话,卑诗省有一个 Org.BouncyCastle.Security.DotNetUtilities
.这应该允许您导入证书.
If I remember correctly, BC has a Org.BouncyCastle.Security.DotNetUtilities
. This should allow you to import a certificate.
这篇关于将X509Certificate2证书转换为BouncyCastle X509Certificate的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!