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