将X509Certificate2证书转换为BouncyCastle X509Certificate [英] Converting X509Certificate2 certificate into BouncyCastle X509Certificate

查看:92
本文介绍了将X509Certificate2证书转换为BouncyCastle X509Certificate的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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