Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
X509CertificateLoader.LoadCertificateFromFile(String) Method
Definition
- Assembly:
- System.Security.Cryptography.dll
- Assembly:
- Microsoft.Bcl.Cryptography.dll
- Package:
- Microsoft.Bcl.Cryptography v11.0.0-preview.5.26302.115
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
Feedback
Was this page helpful?
