Class DigitalCertificatesStore
- Namespace
- EvoPdf
- Assembly
- evohtmltopdf.dll
Provides and interface for getting digital certificates from system certificates store or from a password protected PKCS#12 file. A PKCS#12 file stores both the private and the public keys and such a file can be for example a file with extension .pfx generated by IIS from the SSL certificate installed for a website.
[ClassInterface(ClassInterfaceType.AutoDual)]
public class DigitalCertificatesStore
- Inheritance
-
DigitalCertificatesStore
- Inherited Members
Constructors
DigitalCertificatesStore()
public DigitalCertificatesStore()
Methods
GetCertificates()
Gets the certificates collection from the Personal Certificates store. The Personal Certificates store can be accessed from Control Panel/Internet Options, Content, Certificates.
public static DigitalCertificatesCollection GetCertificates()
Returns
- DigitalCertificatesCollection
The Personal certificates collection.
GetCertificates(CertSystemStore)
Gets the certificates collection from the specified system certificates store.
public static DigitalCertificatesCollection GetCertificates(CertSystemStore sysCertStore)
Parameters
sysCertStore
CertSystemStoreThe system certificates store
Returns
- DigitalCertificatesCollection
The certificates collection
GetCertificates(byte[], string)
Gets the certificates collection from the specified password protected PKCS#12 file given as binary data. A PKCS#12 file stores both the private and the public key and such a file can be for example a file with extension .pfx generated by IIS from the SSL certificate installed for a website.
public static DigitalCertificatesCollection GetCertificates(byte[] pfxData, string password)
Parameters
pfxData
byte[]The PFX file data
password
stringThe password used to decrypt and verify the PFX packet. This password must be exactly the same as the password that was used to encrypt the packet. If the password used to encrypt the packet was blank, pass NULL for the value of this parameter.
Returns
- DigitalCertificatesCollection
The certificates collection.
GetCertificates(string)
Gets the certificates collection from the specified PKCS#12 file. This method uses a NULL password to get the certificates from packet. A PKCS#12 file stores both the private and the public key and such a file can be for example a file with extension .pfx generated by IIS from the SSL certificate installed for a website.
public static DigitalCertificatesCollection GetCertificates(string certFileName)
Parameters
certFileName
stringThe path of the .pfx or .p12 file storing the certificates.
Returns
- DigitalCertificatesCollection
The certificates collection.
GetCertificates(string, string)
Gets the certificates collection from the specified password protected PKCS#12 file. A PKCS#12 file stores both the private and the public key and such a file can be for example a file with extension .pfx generated by IIS from the SSL certificate installed for a website.
public static DigitalCertificatesCollection GetCertificates(string certFileName, string password)
Parameters
certFileName
stringThe path of the .pfx or .p12 file storing the certificates.
password
stringThe password used to decrypt and verify the PFX packet. This password must be exactly the same as the password that was used to encrypt the packet. If the password used to encrypt the packet was blank, pass NULL for the value of this parameter.
Returns
- DigitalCertificatesCollection
The certificates collection.