InterfaceICertificateProvider5
Extension interface for certificate provider implementation, adding methods to read and write the root certificate to a file To override default certificate handling, your class should implement this interface.
Definition
Namespace:Fiddler
Assembly:FiddlerCore.dll
Syntax:
public interface ICertificateProvider5 : ICertificateProvider4, ICertificateProvider3, ICertificateProvider2, ICertificateProvider
Inherited Members
Methods
ClearCertificateCache(bool, out CertificateStoreOperationStatus)
When this method is called, your extension should discard all certificates and clear any certificates that have been added to the user's certificate store
Declaration
bool ClearCertificateCache(bool bClearRoot, out CertificateStoreOperationStatus status)
Parameters
bClearRoot
TRUE if the root certificate should also be cleared
status
CertificateStoreOperationStatus
Provides details in case operation is not successful
Returns
TRUE, if all certificates were removed; FALSE if any certificates were preserved
ReadRootCertificateAndPrivateKeyFromPkcs12File(string, string, string)
When this method is called, your extension should read the root certificate and its private key from the PKCS#12 file(.pfx | .p12).
Declaration
void ReadRootCertificateAndPrivateKeyFromPkcs12File(string filename, string password, string alias = null)
Parameters
filename
The filename of the PKCS#12 file (.pfx | .p12).
password
The password which is used to protect the private key. Could be null or empty if the private key is not protected.
alias
The alias for the certificate and the private key. Could be null.
ReadRootCertificateAndPrivateKeyFromStream(Stream, string, string)
When this method is called, your extension should read the root certificate and its private key from a stream.
Declaration
void ReadRootCertificateAndPrivateKeyFromStream(Stream stream, string password, string alias = null)
Parameters
stream
The stream.
password
The password which is used to protect the private key. Could be null or empty if the private key is not protected.
alias
The alias for the certificate and the private key. Could be null.
WriteRootCertificateAndPrivateKeyToPkcs12File(string, string, string)
When this method is called, your extension should write the root certificate and its private key to a PKCS#12 file(.pfx | .p12).
Declaration
void WriteRootCertificateAndPrivateKeyToPkcs12File(string filename, string password, string alias = null)
Parameters
filename
The filename of the PKCS#12 file (.pfx | .p12).
password
The password which is used to protect the private key. If null or empty, the private key is written unprotected.
alias
The alias for the certificate and the private key. If null, a random alias could be created.
WriteRootCertificateAndPrivateKeyToStream(Stream, string, string)
When this method is called, your extension should write the root certificate and its private key to a stream.
Declaration
void WriteRootCertificateAndPrivateKeyToStream(Stream stream, string password, string alias = null)
Parameters
stream
The stream.
password
The password protecting the private key. If null or empty, the private key is written unprotected.
alias
The alias for the certificate and the private key. If null, a random alias could be created.
WriteRootCertificateToDerEncodedFile(string)
When this method is called, your extension should write the root certificate without the private key to a DER encoded file(.cer | .crt | .der).
Declaration
void WriteRootCertificateToDerEncodedFile(string filename)
Parameters
filename
The filename of the DER encoded file (.cer | .crt | .der)
WriteRootCertificateToStream(Stream)
When this method is called, your extension should write the root certificate without the private key to a stream.
Declaration
void WriteRootCertificateToStream(Stream stream)
Parameters
stream
The stream.