X509CertificateLoader.LoadCertificate 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.
Overloads
LoadCertificate(Byte[]) |
Loads a single X.509 certificate from |
LoadCertificate(ReadOnlySpan<Byte>) |
Loads a single X.509 certificate from |
LoadCertificate(Byte[])
Loads a single X.509 certificate from data
, in either the PEM
or DER encoding.
public:
static System::Security::Cryptography::X509Certificates::X509Certificate2 ^ LoadCertificate(cli::array <System::Byte> ^ data);
public static System.Security.Cryptography.X509Certificates.X509Certificate2 LoadCertificate (byte[] data);
static member LoadCertificate : byte[] -> System.Security.Cryptography.X509Certificates.X509Certificate2
Public Shared Function LoadCertificate (data As Byte()) As X509Certificate2
Parameters
- data
- Byte[]
The data to load.
Returns
The certificate loaded from data
.
Exceptions
data
is null
.
The data did not load as a valid X.509 certificate.
Remarks
This method only loads plain certificates, which are identified as Cert by GetCertContentType(Byte[])
See also
Applies to
LoadCertificate(ReadOnlySpan<Byte>)
Loads a single X.509 certificate from data
, in either the PEM
or DER encoding.
public:
static System::Security::Cryptography::X509Certificates::X509Certificate2 ^ LoadCertificate(ReadOnlySpan<System::Byte> data);
public static System.Security.Cryptography.X509Certificates.X509Certificate2 LoadCertificate (ReadOnlySpan<byte> data);
static member LoadCertificate : ReadOnlySpan<byte> -> System.Security.Cryptography.X509Certificates.X509Certificate2
Public Shared Function LoadCertificate (data As ReadOnlySpan(Of Byte)) As X509Certificate2
Parameters
- data
- ReadOnlySpan<Byte>
The data to load.
Returns
The certificate loaded from data
.
Exceptions
The data did not load as a valid X.509 certificate.
Remarks
This method only loads plain certificates, which are identified as Cert by GetCertContentType(Byte[])