Class CertificateConfiguration
The certificate configuration identifies an X.509 certificate stored as a string, in a file, in the Windows certificate store, or elsewhere in the configuration.
If the certificate is stored as a string, the certificate base-64 encoded string must be specified and, if the certificate includes a private key, the password.
If the certificate is stored in a file, the file name must be specified and, if the file includes a private key, the password.
If the certificate is stored in the Windows certificate store, the store name and location must be specified as well as the certificate's serial number, thumbprint or subject name.
If the certificate is stored elsewhere in the configuration, the configuration key must be specified. This may be used to retrieve certificates stored in an Azure key vault.
Inherited Members
Namespace: ComponentSpace.SAML2.Configuration
Assembly: ComponentSpace.Saml2.dll
Syntax
public class CertificateConfiguration : Entity
Constructors
CertificateConfiguration()
Constructs a certificate configuration.
Declaration
public CertificateConfiguration()
CertificateConfiguration(XmlElement)
Constructs a certificate configuration from XML.
Declaration
public CertificateConfiguration(XmlElement xmlElement)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlElement | xmlElement | The certificate configuration XML. |
Fields
PasswordKeySeparator
Password key separator between the section name and key.
Declaration
public const char PasswordKeySeparator = '/'
Field Value
Type | Description |
---|---|
System.Char |
Properties
FileName
Gets or sets the certificate file name.
The file contains a base-64 encoded, DER encoded or PFX/PKCS12 X.509 certificate.
Declaration
public string FileName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The certificate file name or |
Key
Gets or sets the configuration key to the certificate base-64 encoded string.
Declaration
public string Key { get; set; }
Property Value
Type | Description |
---|---|
System.String | The configuration key or |
Password
Gets or sets the certificate password.
A password is required with PFX/PKCS12 X.509 certificates.
Declaration
public string Password { get; set; }
Property Value
Type | Description |
---|---|
System.String | The password or |
PasswordKey
Gets or sets the configuration key to the certificate password.
A password is required with PFX/PKCS12 X.509 certificates.
Declaration
public string PasswordKey { get; set; }
Property Value
Type | Description |
---|---|
System.String | The configuration key or |
SerialNumber
Gets or sets the certificate serial number.
Declaration
public string SerialNumber { get; set; }
Property Value
Type | Description |
---|---|
System.String | The certificate serial number or |
StoreLocation
Gets or sets the Windows certificate store location.
Declaration
public StoreLocation StoreLocation { get; set; }
Property Value
Type | Description |
---|---|
System.Security.Cryptography.X509Certificates.StoreLocation | The Windows certificate store location. |
StoreName
Gets or sets the Windows certificate store name.
Declaration
public string StoreName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The Windows certificate store name. |
String
Gets or sets the certificate base-64 encoded string.
Declaration
public string String { get; set; }
Property Value
Type | Description |
---|---|
System.String | The certificate string or |
SubjectName
Gets or sets the certificate subject name.
Declaration
public string SubjectName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The certificate subject name or |
Thumbprint
Gets or sets the certificate thumbprint.
Declaration
public string Thumbprint { get; set; }
Property Value
Type | Description |
---|---|
System.String | The certificate thumbprint or |
Use
Gets or sets the certificate use.
Declaration
public CertificateConfiguration.CertificateUse Use { get; set; }
Property Value
Type | Description |
---|---|
CertificateConfiguration.CertificateUse | The certificate use. |
Methods
ToXml(XmlElement)
Serializes the certificate configuration to XML.
Declaration
public void ToXml(XmlElement xmlElement)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlElement | xmlElement | The XML element. |