[]
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)
Public Shared Function GetCertificateChain(rawData As Byte(), password As String, Optional revocationMode As X509RevocationMode = X509RevocationMode.NoCheck, Optional verificationFlags As X509VerificationFlags = X509VerificationFlags.AllFlags) As X509Certificate2()
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)
Public Shared Function GetCertificateChain(fileName As String, password As String, Optional revocationMode As X509RevocationMode = X509RevocationMode.NoCheck, Optional verificationFlags As X509VerificationFlags = X509VerificationFlags.AllFlags) As X509Certificate2()
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. |