QuickOPC User's Guide and Reference
FindCertificates Method



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.Security.Cryptography.PkiCertificates Namespace > IPkiStore Interface : FindCertificates Method
A string representing the thumbprint of the certificate.
Specifies whether the certificates should be returned with their private keys.
A password to access the private key.
Searches the PKI store for certificates with the given thumbprint.
Syntax
'Declaration
 
<ElementsNotNullAttribute()>
<NotNullAttribute()>
Function FindCertificates( _
   ByVal thumbprint As String, _
   ByVal withPrivateKeys As Boolean, _
   ByVal password As String _
) As PkiCertificateCollection
'Usage
 
Dim instance As IPkiStore
Dim thumbprint As String
Dim withPrivateKeys As Boolean
Dim password As String
Dim value As PkiCertificateCollection
 
value = instance.FindCertificates(thumbprint, withPrivateKeys, password)
[ElementsNotNull()]
[NotNull()]
PkiCertificateCollection FindCertificates( 
   string thumbprint,
   bool withPrivateKeys,
   string password
)
[ElementsNotNull()]
[NotNull()]
PkiCertificateCollection^ FindCertificates( 
   String^ thumbprint,
   bool withPrivateKeys,
   String^ password
) 

Parameters

thumbprint
A string representing the thumbprint of the certificate.
withPrivateKeys
Specifies whether the certificates should be returned with their private keys.
password
A password to access the private key.

Return Value

A collection of certificates that have the given thumbprint.
Exceptions
ExceptionDescription

A null reference (Nothing in Visual Basic) is passed to a method that does not accept it as a valid argument.

This is a usage error, i.e. it will never occur (the exception will not be thrown) in a correctly written program. Your code should not catch this exception.

An error occurred during a cryptographic operation.

This is an operation error that depends on factors external to your program, and thus cannot be always avoided. Your code must handle it appropriately.

Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also