X509AuthorityKeyIdentifierExtension.CreateFromCertificate 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
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
。
傳回
已設定的擴充功能。
例外狀況
certificate
為 null
。
includeKeyIdentifier
是 true
,但 certificate
不包含主體密鑰標識碼延伸模組。