Edit

Share via


X509AuthorityKeyIdentifierExtension.CreateFromCertificate Method

Definition

Creates an X509AuthorityKeyIdentifierExtension based on values from the provided certificate.

public:
 static System::Security::Cryptography::X509Certificates::X509AuthorityKeyIdentifierExtension ^ CreateFromCertificate(System::Security::Cryptography::X509Certificates::X509Certificate2 ^ certificate, bool includeKeyIdentifier, bool includeIssuerAndSerial);
public static System.Security.Cryptography.X509Certificates.X509AuthorityKeyIdentifierExtension CreateFromCertificate (System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, bool includeKeyIdentifier, bool includeIssuerAndSerial);
static member CreateFromCertificate : System.Security.Cryptography.X509Certificates.X509Certificate2 * bool * bool -> System.Security.Cryptography.X509Certificates.X509AuthorityKeyIdentifierExtension
Public Shared Function CreateFromCertificate (certificate As X509Certificate2, includeKeyIdentifier As Boolean, includeIssuerAndSerial As Boolean) As X509AuthorityKeyIdentifierExtension

Parameters

certificate
X509Certificate2

The Certificate Authority (CA) certificate that will sign this extension.

includeKeyIdentifier
Boolean

true to include the Subject Key Identifier value from the certificate as the key identifier value in this extension; otherwise, false.

includeIssuerAndSerial
Boolean

true to include the certificate's issuer name and serial number in this extension; otherwise, false.

Returns

The configured extension.

Exceptions

certificate is null.

includeKeyIdentifier is true, but certificate does not contain a Subject Key Identifier extension.

Applies to