X509SubjectKeyIdentifierClause.Matches Method (X509Certificate2)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Returns a value that indicates whether the key identifier for this instance is equivalent to the key identifier of the specified X.509 certificate.

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

public bool Matches(
	X509Certificate2 certificate
)

Parameters

certificate
Type: System.Security.Cryptography.X509Certificates.X509Certificate2

An X509Certificate2 that contains the X.509 certificate to compare.

Return Value

Type: System.Boolean

true if certificate has the same subject key identifier as the current instance; otherwise, false.

Exception Condition
ArgumentNullException

certificate is null.

The Matches method compares the X509SubjectKeyIdentifierExtension extension for the two X.509 certificates.

.NET Framework
Available since 3.0
Return to top
Show: