Class CertificateExtensions
Extensions for X509Certificate2
.
Inheritance
System.Object
CertificateExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
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 |
---|---|---|
System. |
x509Certificate | The X.509 certificate. |
Returns
Type | Description |
---|---|
System. |
The private asymmetric key or |
Exceptions
Type | Condition |
---|---|
Saml |
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 |
---|---|---|
System. |
x509Certificate | The X.509 certificate. |
Returns
Type | Description |
---|---|
System. |
The public asymmetric key. |
Exceptions
Type | Condition |
---|---|
Saml |
Thrown when there's no public asymmetric key. |