[]
Builds the chain of certificates from a byte array.
public static X509Certificate2[] GetCertificateChain(byte[] rawData, string password, X509RevocationMode revocationMode = X509RevocationMode.NoCheck, X509VerificationFlags verificationFlags = X509VerificationFlags.AllFlags)
| Type | Name | Description |
|---|---|---|
| byte[] | rawData | The byte array containing data in PFX or P12 format. |
| string | password | The password to use. |
| X509RevocationMode | revocationMode | The revocation mode used to build the X509Chain. |
| X509VerificationFlags | verificationFlags | The verification flags used to build the X509Chain. |
| Type | Description |
|---|---|
| X509Certificate2[] | The chain of certificates. The first element is the signing certificate, the last element is the certificate of CA. |
Builds the chain of certificates from a specified file.
public static X509Certificate2[] GetCertificateChain(string fileName, string password, X509RevocationMode revocationMode = X509RevocationMode.NoCheck, X509VerificationFlags verificationFlags = X509VerificationFlags.AllFlags)
| Type | Name | Description |
|---|---|---|
| string | fileName | The name of a .pfx or a .p12 file. |
| string | password | The password to use. |
| X509RevocationMode | revocationMode | The revocation mode used to build the X509Chain. |
| X509VerificationFlags | verificationFlags | The verification flags used to build the X509Chain. |
| Type | Description |
|---|---|
| X509Certificate2[] | The chain of certificates. The first element is the signing certificate, the last element is the certificate of CA. |