Creates a new instance of the Certificate class by opening a certificate file and retrieving the first certificate from it.

Namespace: LLCryptoLib.Security.Certificates
Assembly: LLCryptoLib (in LLCryptoLib.dll) Version: 2.0.1024.0 (2.0.1024)

Syntax

C#
public static Certificate CreateFromCerFile(
	string file
)
Visual Basic
Public Shared Function CreateFromCerFile ( _
	file As String _
) As Certificate
Visual C++
public:
static Certificate^ CreateFromCerFile(
	String^ file
)

Parameters

file
Type: System..::..String
The full path to the certificate file to open.

Return Value

One of the certificates in the certificate file.

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionfile is a null reference (Nothing in Visual Basic).
LLCryptoLib.Security.Certificates..::..CertificateExceptionAn error occurs while loading certificates from the specified file.

See Also