Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Searches an X509Certificate2Collection object using the search criteria specified by the X509FindType enumeration and the findValue object.
Namespace: System.Security.Cryptography.X509Certificates
Assembly: System.Security (in System.Security.dll)
Syntax
'Declaration
Public Function Find ( _
findType As X509FindType, _
findValue As Object, _
validOnly As Boolean _
) As X509Certificate2Collection
public X509Certificate2Collection Find(
X509FindType findType,
Object findValue,
bool validOnly
)
public:
X509Certificate2Collection^ Find(
X509FindType findType,
Object^ findValue,
bool validOnly
)
member Find :
findType:X509FindType *
findValue:Object *
validOnly:bool -> X509Certificate2Collection
public function Find(
findType : X509FindType,
findValue : Object,
validOnly : boolean
) : X509Certificate2Collection
Parameters
- findType
Type: System.Security.Cryptography.X509Certificates. . :: . .X509FindType
One of the X509FindType values.
- findValue
Type: System. . :: . .Object
The search criteria as an object.
- validOnly
Type: System. . :: . .Boolean
true to allow only valid certificates to be returned from the search; otherwise, false.
Return Value
Type: System.Security.Cryptography.X509Certificates. . :: . .X509Certificate2Collection
An X509Certificate2Collection object.
Exceptions
Exception | Condition |
---|---|
CryptographicException | findType is invalid. |
Remarks
Use this method to find X509Certificate2 objects if no user interaction is needed. Use the Find method to allow the user to select X509Certificate2 objects.
Note that this method can be used in a cascading or nested style, narrowing the search criteria with each call to the method.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.