Class CertificateChainExtensions
Extension methods for CertificateChain.
Inheritance
CertificateChainExtensions
Namespace: Certes
Assembly: Certes.dll
Syntax
public static class CertificateChainExtensions
Methods
| Edit this page View SourceToPem(CertificateChain, IKey)
Encodes the full certificate chain in PEM.
Declaration
public static string ToPem(this CertificateChain certificateChain, IKey certKey = null)
Parameters
| Type | Name | Description |
|---|---|---|
| CertificateChain | certificateChain | The certificate chain. |
| IKey | certKey | The certificate key. |
Returns
| Type | Description |
|---|---|
| string | The encoded certificate chain. |
Remarks
When a key is supplied, verifies that it matches the leaf certificate. This does not validate the certificate chain or establish trust in it.
ToPfx(CertificateChain, IKey)
Converts the certificate to PFX with the key.
Declaration
public static PfxBuilder ToPfx(this CertificateChain certificateChain, IKey certKey)
Parameters
| Type | Name | Description |
|---|---|---|
| CertificateChain | certificateChain | The certificate chain. |
| IKey | certKey | The certificate private key. |
Returns
| Type | Description |
|---|---|
| PfxBuilder | The PFX. |