Interface
ICertificateProvider

Implement ICertificateProvider5 instead

Definition

Namespace:Fiddler

Assembly:FiddlerCore.dll

Syntax:

cs-api-definition
public interface ICertificateProvider

Methods

ClearCertificateCache()

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

cs-api-definition
bool ClearCertificateCache()

Returns

bool

TRUE, if all certificates were removed; FALSE if any certificates were preserved

CreateRootCertificate()

When this method is called, your extension should create a Root certificate.

Declaration

cs-api-definition
bool CreateRootCertificate()

Returns

bool

TRUE if the operation was successful

GetCertificateForHost(string)

Return a certificate to secure this traffic. Generally, it's expected that this method WILL create a new certificate if needed.

Declaration

cs-api-definition
X509Certificate2 GetCertificateForHost(string sHostname)

Parameters

sHostname

string

Hostname (e.g. "www.example.com")

Returns

X509Certificate2

An X509Certificate, or null on error

GetRootCertificate()

Return the root certificate to which Host Certificates are chained. Generally, it's expected that this method will NOT create a root certificate.

Declaration

cs-api-definition
X509Certificate2 GetRootCertificate()

Returns

X509Certificate2

An X509Certificate, or null on error

TrustRootCertificate()

When this method is called, your extension should copy the your Root certificate into the user's (or machines's) Root certificate store.

Declaration

cs-api-definition
bool TrustRootCertificate()

Returns

bool

TRUE if the operation was successful

TrustRootCertificateMachine()

When this method is called, your extension should copy the your Root certificate into the or machines's Root certificate store. You should implement this method only for Windows platforms and leave it empty for others.

Declaration

cs-api-definition
bool TrustRootCertificateMachine()

Returns

bool

TRUE if the operation was successful

rootCertIsTrusted(out bool, out bool)

When this method is called, your extension should check to see if the User or Machine Root certificate store contains your Root certificate. The Machine trust value is only valid for Windows platforms.

Declaration

cs-api-definition
bool rootCertIsTrusted(out bool bUserTrusted, out bool bMachineTrusted)

Parameters

bUserTrusted

bool

Set to TRUE if StoreLocation.CurrentUser StoreName.Root has the certificate

bMachineTrusted

bool

Set to TRUE if StoreLocation.LocalMachine StoreName.Root has the certificate

Returns

bool

TRUE if either bUserTrusted or bMachineTrusted