共用方式為


X509SubjectKeyIdentifierClause.TryCreateFrom 方法

定義

使用指定的 X.509 憑證來建立金鑰識別碼子句。

public:
 static bool TryCreateFrom(System::Security::Cryptography::X509Certificates::X509Certificate2 ^ certificate, [Runtime::InteropServices::Out] System::IdentityModel::Tokens::X509SubjectKeyIdentifierClause ^ % keyIdentifierClause);
public static bool TryCreateFrom (System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, out System.IdentityModel.Tokens.X509SubjectKeyIdentifierClause keyIdentifierClause);
static member TryCreateFrom : System.Security.Cryptography.X509Certificates.X509Certificate2 * X509SubjectKeyIdentifierClause -> bool
Public Shared Function TryCreateFrom (certificate As X509Certificate2, ByRef keyIdentifierClause As X509SubjectKeyIdentifierClause) As Boolean

參數

certificate
X509Certificate2

要建立金鑰識別碼子句的 X509Certificate2

keyIdentifierClause
X509SubjectKeyIdentifierClause

當這個方法傳回時,會包含表示金鑰識別項子句的 X509SubjectKeyIdentifierClause。 這個參數會以未初始化的狀態傳遞。

傳回

如果可以建立指定之 X.509 憑證的金鑰識別碼子句,則為 true,否則為 false

例外狀況

certificatenull

備註

如果 X.509 憑證包含主體金鑰識別碼,就可以為該憑證建立 X509SubjectKeyIdentifierClause 金鑰識別碼子句。

適用於