Class CertificateExtensions
- Namespace
- ComponentSpace.Saml2.Utility
- Assembly
- ComponentSpace.Saml2.dll
Extensions for X509Certificate2.
public static class CertificateExtensions
- Inheritance
-
CertificateExtensions
- Inherited Members
Methods
GetPrivateAsymmetricAlgorithm(X509Certificate2)
Gets the private asymmetric key. This can either be an RSA or ECDsa.
public static AsymmetricAlgorithm GetPrivateAsymmetricAlgorithm(this X509Certificate2 x509Certificate)
Parameters
x509CertificateX509Certificate2The X.509 certificate.
Returns
- AsymmetricAlgorithm
The private asymmetric key or
nullif none.
Exceptions
- SamlCertificateException
Thrown when there's no private asymmetric key.
GetPublicAsymmetricAlgorithm(X509Certificate2)
Gets the public asymmetric key. This can either be an RSA or ECDsa.
public static AsymmetricAlgorithm GetPublicAsymmetricAlgorithm(this X509Certificate2 x509Certificate)
Parameters
x509CertificateX509Certificate2The X.509 certificate.
Returns
- AsymmetricAlgorithm
The public asymmetric key.
Exceptions
- SamlCertificateException
Thrown when there's no public asymmetric key.