Certificate.LoadCertificate Method
Creates a new instance of ICertificate from a specified source.
Overloads
Name | Description |
---|---|
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.
- C#
- VB
public static iCore.Public.Crypto.X509Certificates.ICertificate LoadCertificate(string filePath, string password=null);
Public Shared Function LoadCertificate(ByVal filePath As String, ByVal Optional password As String = Nothing) As iCore.Public.Crypto.X509Certificates.ICertificate
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.
- C#
- VB
public static iCore.Public.Crypto.X509Certificates.ICertificate LoadCertificate(System.IO.Stream input, string password=null);
Public Shared Function LoadCertificate(ByVal input As System.IO.Stream, ByVal Optional password As String = Nothing) As iCore.Public.Crypto.X509Certificates.ICertificate
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.