Finds a certificate with a matching subject name.
Namespace: LLCryptoLib.Security.CertificatesAssembly: LLCryptoLib (in LLCryptoLib.dll) Version: 2.0.1024.0 (2.0.1024)
Syntax
| C# |
|---|
public Certificate FindCertificateBySubjectName( string name, Certificate previous ) |
| Visual Basic |
|---|
Public Function FindCertificateBySubjectName ( _ name As String, _ previous As Certificate _ ) As Certificate |
| Visual C++ |
|---|
public: Certificate^ FindCertificateBySubjectName( String^ name, Certificate^ previous ) |
Parameters
- name
- Type: System..::..String
The X500 string to search for.
- previous
- Type: LLCryptoLib.Security.Certificates..::..Certificate
The previous certificate.
Return Value
A Certificate with a matching subject name -or- a null reference (Nothing in Visual Basic) if no matching certificate could be found in the store.
Exceptions
| Exception | Condition |
|---|---|
| System..::..ArgumentNullException | name is a null reference (Nothing in Visual Basic). |
| System..::..ArgumentException | name is invalid. |
| LLCryptoLib.Security.Certificates..::..CertificateException | An error occurs while encoding the specified string. |