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?
Use Org.BouncyCastle.Security.DotNetUtilities.FromX509Certificate
, which takes a System.Security.Cryptography.X509Certificates.X509Certificate
and returns a Org.BouncyCastle.X509.X509Certificate
.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With