Finds a certificate having an enhanced key extension that matches one of the keyUsage members.
Namespace: LLCryptoLib.Security.CertificatesAssembly: LLCryptoLib (in LLCryptoLib.dll) Version: 2.0.1024.0 (2.0.1024)
Syntax
| C# |
|---|
public Certificate FindCertificateByUsage(
string[] keyUsage
) |
| Visual Basic |
|---|
Public Function FindCertificateByUsage ( _
keyUsage As String() _
) As Certificate |
| Visual C++ |
|---|
public:
Certificate^ FindCertificateByUsage(
array<String^>^ keyUsage
) |
Parameters
- keyUsage
- Type: array<System..::..String>[]()[][]
The list of enhanced key usages to search for.
Return Value
A
Certificate that has at least one of the specified key usages -or- a null reference (
Nothing in Visual Basic) if no valid certificate could be found.
Exceptions
| Exception | Condition |
|---|
| System..::..ArgumentNullException | keyUsage is a null reference (Nothing in Visual Basic). |
| System..::..ArgumentException | keyUsage is invalid. |
See Also