Finds a certificate having an enhanced key extension that matches one of the keyUsage members.

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

Syntax

C#
public Certificate FindCertificateByUsage(
	string[] keyUsage,
	Certificate previous
)
Visual Basic
Public Function FindCertificateByUsage ( _
	keyUsage As String(), _
	previous As Certificate _
) As Certificate
Visual C++
public:
Certificate^ FindCertificateByUsage(
	array<String^>^ keyUsage, 
	Certificate^ previous
)

Parameters

keyUsage
Type: array<System..::..String>[]()[][]
The list of enhanced key usages to search for.
previous
Type: LLCryptoLib.Security.Certificates..::..Certificate
The previous certificate.

Return Value

The Certificate that comes after previous and that has at least one of the specified key usages -or- a null reference (Nothing in Visual Basic) if no other valid certificate could be found.

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionkeyUsage is a null reference (Nothing in Visual Basic).
System..::..ArgumentExceptionkeyUsage is invalid.

See Also