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 不包含使用者密钥标识符扩展。

适用于