Tests the supplied certificate if the subject name begins with the supplied name string

Namespace: NHINDirect.Certificates
Assembly: nhinCommon (in nhinCommon.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#
public static bool NameContains(
	this X509Certificate2 cert,
	string name
)
Visual Basic
<ExtensionAttribute> _
Public Shared Function NameContains ( _
	cert As X509Certificate2, _
	name As String _
) As Boolean
Visual C++
[ExtensionAttribute]
public:
static bool NameContains(
	X509Certificate2^ cert, 
	String^ name
)

Parameters

cert
Type: System.Security.Cryptography.X509Certificates..::..X509Certificate2
The certificate to test.
name
Type: System..::..String
The String to test against the CN value

Return Value

true if the supplied certificate's subject name matches the supplied name, false otherwise.

See Also