Matches Method (X509Certificate2)
Collapse the table of content
Expand the table of content

X509RawDataKeyIdentifierClause.Matches Method (X509Certificate2)


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

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

public bool Matches(
	X509Certificate2 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 raw data that matches the current instance; otherwise, false.

Exception Condition

certificate is null.

The Matches method calls the GetRawCertData method for the certificate and then compares that to the current instance.

.NET Framework
Available since 3.0
Return to top
© 2015 Microsoft