X509Certificate 2ExtensionsAs Bouncy Castle Certificate Method
Convert an X509Certificate2 into a BouncyCastle X509Certificate.
Definition
Namespace: MimeKit.Cryptography
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
The bouncy castle certificate.
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
C#
public static X509Certificate AsBouncyCastleCertificate(
this X509Certificate2 certificate
)Parameters
- certificate X509Certificate2
- The certificate.
Return Value
X509CertificateThe bouncy castle certificate.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type X509Certificate2. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).Remarks
Converts an X509Certificate2 into a BouncyCastle X509Certificate.
Exceptions
| ArgumentNullException | certificate is . |
| ArgumentException | certificate could not be converted into a BouncyCastle X509Certificate. |