This documentation is archived and is not being maintained.

X509SecurityToken::MatchesKeyIdentifierClause Method

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

Namespace:  System.IdentityModel.Tokens
Assembly:  System.IdentityModel (in System.IdentityModel.dll)

public:
virtual bool MatchesKeyIdentifierClause(
	SecurityKeyIdentifierClause^ keyIdentifierClause
) override

Parameters

keyIdentifierClause
Type: System.IdentityModel.Tokens::SecurityKeyIdentifierClause
An SecurityKeyIdentifierClause to compare to this instance.

Return Value

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

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.

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: