Converting X509Certificate2 certificate into BouncyCastle X509Certificate

c#

Solution

It's been a while since I played with Bouncy Castle. Basically take X509Certificate2.RawData and pass it to the BC X509Certificate constructor.

If I remember correctly, BC has a `Org.BouncyCastle.Security.DotNetUtilities`. This should allow you to import a certificate.

Problem

I have an object of System.Security.Cryptography.X509Certificates.X509Certificate2. I need to convert it into an object of Org.BouncyCastle.X509.X509Certificate. Can anyone help me please?

Original source