共用方式為


X509AuthorityKeyIdentifierExtension.CreateFromCertificate 方法

定義

X509AuthorityKeyIdentifierExtension根據所提供憑證的值建立 。

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

參數

certificate
X509Certificate2

證書頒發機構單位 (CA) 將簽署此延伸模組的憑證。

includeKeyIdentifier
Boolean

true 表示從憑證包含主體密鑰標識碼值作為此延伸模組中的金鑰標識碼值;否則為 false

includeIssuerAndSerial
Boolean

true 表示在此延伸模組中包含憑證的簽發者名稱和序號;否則為 false

傳回

已設定的擴充功能。

例外狀況

certificatenull

includeKeyIdentifiertrue,但 certificate 不包含主體密鑰標識碼延伸模組。

適用於