X509SecurityToken.MatchesKeyIdentifierClause Method

Definition

Returns a value indicating whether the key identifier for this instance is equal to the specified key identifier.

public override bool MatchesKeyIdentifierClause (System.IdentityModel.Tokens.SecurityKeyIdentifierClause keyIdentifierClause);

Parameters

keyIdentifierClause
SecurityKeyIdentifierClause

An SecurityKeyIdentifierClause to compare to this instance.

Returns

true if keyIdentifierClause is one of the X509SubjectKeyIdentifierClause, X509ThumbprintKeyIdentifierClause, X509IssuerSerialKeyIdentifierClause, or X509RawDataKeyIdentifierClause types and the key identifier clauses match; otherwise, false.

Remarks

The MatchesKeyIdentifierClause method matches criteria in the X.509 certificate in the Certificate property based on the type of the keyIdentifierClause parameter. The following table details what is matched.

Key identifier clause type What is matched
X509IssuerSerialKeyIdentifierClause The value of the IssuerName property and the issuer serial number returned from the GetSerialNumber method.
X509RawDataKeyIdentifierClause The data returned from the GetRawCertData method.
X509SubjectKeyIdentifierClause The subject key identifier extension in the Extensions property is matched.
X509ThumbprintKeyIdentifierClause The thumbprint that is returned by the GetCertHash method.

Applies to

Produit Versions
.NET 8 (package-provided)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)