Class
DefaultCertificateProvider

[DEPRECATED] Use the BCCertMaker instead. This is the default Fiddler certificate provider.

Definition

Namespace:Fiddler

Assembly:FiddlerCore.dll

Syntax:

cs-api-definition
public class DefaultCertificateProvider : ICertificateProvider3, ICertificateProvider2, ICertificateProvider, ICertificateProviderInfo

Inheritance: objectDefaultCertificateProvider

Implements: ICertificateProviderICertificateProvider2ICertificateProvider3ICertificateProviderInfo

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()

Constructors

DefaultCertificateProvider()

Creates a new instance of the default Fiddler certificate provider.

Declaration

cs-api-definition
[Obsolete("This provider is deprecated. Please use the BCCertMaker provider instead.")]
public DefaultCertificateProvider()

Remarks

[DEPRECATED] Use the BCCertMaker instead.

Methods

CacheCertificateForHost(string, X509Certificate2)

Updates the Server Certificate cache under the Writer lock

Declaration

cs-api-definition
public bool CacheCertificateForHost(string sHost, X509Certificate2 oCert)

Parameters

sHost

string

The target hostname

oCert

X509Certificate2

The certificate to cache

Returns

bool

Implements ICertificateProvider3.CacheCertificateForHost(string, X509Certificate2)

ClearCertificateCache()

Interface method: Clear the in-memory caches and Windows certificate stores

Declaration

cs-api-definition
public bool ClearCertificateCache()

Returns

bool

Implements ICertificateProvider.ClearCertificateCache()

ClearCertificateCache(bool)

Interface method: Clear the in-memory caches and Windows certificate stores

Declaration

cs-api-definition
public bool ClearCertificateCache(bool bRemoveRoot)

Parameters

bRemoveRoot

bool

TRUE to clear the Root Certificate from the cache and Windows stores

Returns

bool

TRUE if successful

Implements ICertificateProvider2.ClearCertificateCache(bool)

CreateRootCertificate()

Use MakeCert to generate a unique self-signed certificate

Declaration

cs-api-definition
public bool CreateRootCertificate()

Returns

bool

TRUE if the Root certificate was generated successfully

Implements ICertificateProvider.CreateRootCertificate()

GetCertificateForHost(string)

Returns an Interception certificate for the specified hostname

Declaration

cs-api-definition
public X509Certificate2 GetCertificateForHost(string sHostname)

Parameters

sHostname

string

Hostname for the target certificate

Returns

X509Certificate2

An Interception Certificate, or NULL

Implements ICertificateProvider.GetCertificateForHost(string)

Remarks

This method uses a Reader lock when checking the cache and a Writer lock when updating the cache.

GetConfigurationString()

Return a string describing the current configuration of the Certificate Provider. For instance, list the configured key size, hash algorithms, etc.

Declaration

cs-api-definition
public string GetConfigurationString()

Returns

string

The certificate provider and Fidder Root CA configuration information

Implements ICertificateProviderInfo.GetConfigurationString()

GetRootCertificate()

Get the root certificate from cache or storage, only IF IT ALREADY EXISTS.

Declaration

cs-api-definition
public X509Certificate2 GetRootCertificate()

Returns

X509Certificate2

Implements ICertificateProvider.GetRootCertificate()

TrustRootCertificate()

Copies the Root certificate authority into the Current User's Root store.

Declaration

cs-api-definition
public bool TrustRootCertificate()

Returns

bool

True if the certificate was trusted successfully

Implements ICertificateProvider.TrustRootCertificate()

TrustRootCertificateMachine()

Not applicable. Calls TrustRootCertificate().

Declaration

cs-api-definition
public bool TrustRootCertificateMachine()

Returns

bool

Implements ICertificateProvider.TrustRootCertificateMachine()

rootCertIsTrusted(out bool, out bool)

Checks if the Fiddler Root CA is trusted

Declaration

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

Parameters

bUserTrusted

bool

Output parameter set to True if Fiddler Root CA is present in the user certificate store

bMachineTrusted

bool

Output parameter set to True if Fiddler Root CA is present in the machine certificate store

Returns

bool

True if the Fiddler Root CA is present in either the user or machine certificate store

Implements ICertificateProvider.rootCertIsTrusted(out bool, out bool)