X509CertificateLoader.LoadCertificateFromFile(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Loads a single X.509 certificate (in either the PEM or DER encoding) from the specified file.
public:
static System::Security::Cryptography::X509Certificates::X509Certificate2 ^ LoadCertificateFromFile(System::String ^ path);
public static System.Security.Cryptography.X509Certificates.X509Certificate2 LoadCertificateFromFile (string path);
static member LoadCertificateFromFile : string -> System.Security.Cryptography.X509Certificates.X509Certificate2
Public Shared Function LoadCertificateFromFile (path As String) As X509Certificate2
Parameters
- path
- String
The path of the file to open.
Returns
The loaded certificate.
Exceptions
path
is null
.
The data did not load as a valid X.509 certificate.
An error occurred while loading the specified file.
Remarks
This method only loads plain certificates, which are identified as Cert by GetCertContentType(String)
Applies to
See also
Samarbeid med oss på GitHub
Du finner kilden for dette innholdet på GitHub. Der du også kan opprette og se gjennom problemer og pull-forespørsler. Hvis du vil ha mer informasjon, kan du se vår bidragsyterveiledning.