[]
        
(Showing Draft Content)

GrapeCity.Documents.Pdf.Security.SecurityUtils.GetCertificateChain

GetCertificateChain Method

GetCertificateChain(byte[], string, X509RevocationMode, X509VerificationFlags)

Builds the chain of certificates from a byte array.

Declaration
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()
Parameters
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.

Returns
Type Description
X509Certificate2[]

The chain of certificates. The first element is the signing certificate, the last element is the certificate of CA.

GetCertificateChain(string, string, X509RevocationMode, X509VerificationFlags)

Builds the chain of certificates from a specified file.

Declaration
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()
Parameters
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.

Returns
Type Description
X509Certificate2[]

The chain of certificates. The first element is the signing certificate, the last element is the certificate of CA.