System.Security.Cryptography.X509Certificates.X509Certificate.CreateFromCertFile Method

Creates an X.509v3 certificate from the specified PKCS7 signed file.

Syntax

public static X509Certificate CreateFromCertFile (string filename)

Parameters

filename
The path of the PKCS7 signed file from which to create the X.509 certificate.

Returns

The newly created X.509 certificate.

Remarks

ASN.1 DER is the only certificate format supported by this class.

Note:

The certificate file is not restricted to .cer files. Any PKCS7 signed file can be used, including an Authenticode signed .pfx file.

Requirements

Namespace: System.Security.Cryptography.X509Certificates
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0