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