Creates a new certificate store from a certificate file.
Namespace: LLCryptoLib.Security.CertificatesAssembly: LLCryptoLib (in LLCryptoLib.dll) Version: 2.0.1024.0 (2.0.1024)
Syntax
C# |
---|
public static CertificateStore CreateFromCerFile( string file ) |
Visual Basic |
---|
Public Shared Function CreateFromCerFile ( _ file As String _ ) As CertificateStore |
Visual C++ |
---|
public: static CertificateStore^ CreateFromCerFile( String^ file ) |
Parameters
- file
- Type: System..::..String
The certificate file.
Return Value
A CertificateStore instance.
Remarks
The provider opens the file and first attempts to read the file as a serialized store, then as a PKCS #7 signed message, and finally as a single encoded certificate.
Exceptions
Exception | Condition |
---|---|
System..::..ArgumentNullException | file is a null reference (Nothing in Visual Basic). |
LLCryptoLib.Security.Certificates..::..CertificateException | An error occurs while loading the certificate. |