Finds a certificate with a subject that contains a specified string.

Namespace: LLCryptoLib.Security.Certificates
Assembly: LLCryptoLib (in LLCryptoLib.dll) Version: 2.0.1024.0 (2.0.1024)

Syntax

C#
public Certificate FindCertificateBySubjectString(
	string subject,
	Certificate previous
)
Visual Basic
Public Function FindCertificateBySubjectString ( _
	subject As String, _
	previous As Certificate _
) As Certificate
Visual C++
public:
Certificate^ FindCertificateBySubjectString(
	String^ subject, 
	Certificate^ previous
)

Parameters

subject
Type: System..::..String
The string to search for.
previous
Type: LLCryptoLib.Security.Certificates..::..Certificate
The previous certificate.

Return Value

A Certificate with a matching subject string -or- a null reference (Nothing in Visual Basic) if no matching certificate could be found in the store.

Remarks

The string matching algorithm used is case-insensitive.

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionsubject is a null reference (Nothing in Visual Basic).
System..::..ArgumentExceptionsubject is invalid.

See Also