Skip to main content
Version: 4.2.5

Certificate.LoadCertificate Method

Creates a new instance of ICertificate from a specified source.

Overloads

NameDescription
LoadCertificate(string, string)Creates a new instance of ICertificate from specified file. The supported formats are DER, PEM, PFX, SPC.
LoadCertificate(System.IO.Stream, string)Creates a new instance of ICertificate from stream that contains the certificate data. The supported formats are DER, PEM, PFX, SPC.

LoadCertificate(string, string) Method

Creates a new instance of ICertificate from specified file. The supported formats are DER, PEM, PFX, SPC.

public static iCore.Public.Crypto.X509Certificates.ICertificate LoadCertificate(string filePath, string password=null);

Parameters

filePath string
Path to certificate file.

password string
The password to the certificate. May be null.

Returns

ICertificate
A new instance of ICertificate representing the certificate from file.

LoadCertificate(System.IO.Stream, string) Method

Creates a new instance of ICertificate from stream that contains the certificate data. The supported formats are DER, PEM, PFX, SPC.

public static iCore.Public.Crypto.X509Certificates.ICertificate LoadCertificate(System.IO.Stream input, string password=null);

Parameters

input Stream
The stream of the certificate.

password string
The password to the certificate. May be null.

Returns

ICertificate
A new instance of ICertificate representing the certificate from stream.