Search Results for

    Show / Hide Table of Contents

    Class FirefoxCertificateTrust

    Firefox-specific CA trust: Windows ImportEnterpriseRoots policy / policies.json, profile user.js (and prefs.js when Firefox is not running) so Firefox uses OS roots, plus optional NSS import into the default profile (cert9.db). Does not write into the Firefox.app bundle (that would invalidate the code signature).

    Inheritance
    object
    FirefoxCertificateTrust
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Titanium.Web.Proxy.Network
    Assembly: Titanium.Web.Proxy.dll
    Syntax
    public static class FirefoxCertificateTrust

    Properties

    | Edit this page View Source

    LastEnterpriseRootsStep

    Last step tag from TryEnableWindowsEnterpriseRoots() / TryEnableEnterpriseRootsUserPref() for Inspector ux-trace (e.g. HkcuOk, UserJsSkippedFirefoxRunning, UserJsOk, Failed).

    Declaration
    public static string? LastEnterpriseRootsStep { get; }
    Property Value
    Type Description
    string

    Methods

    | Edit this page View Source

    ClearRootTrustBestEffort(string?)

    Clears enterprise-roots policy/prefs (HKCU / user.js). Does not run NSS certutil — that can hang for minutes on a locked Firefox profile and blocked Clear/reinstall on "Finishing root CA removal…". Use Trust/Untrust Firefox for NSS.

    Declaration
    public static void ClearRootTrustBestEffort(string? friendlyName)
    Parameters
    Type Name Description
    string friendlyName
    | Edit this page View Source

    IsFirefoxProcessRunning()

    True when a firefox process is running (best-effort).

    Declaration
    public static bool IsFirefoxProcessRunning()
    Returns
    Type Description
    bool
    | Edit this page View Source

    IsFirefoxProfilePresent()

    True when a Firefox profiles.ini (or common profile root) is present.

    Declaration
    public static bool IsFirefoxProfilePresent()
    Returns
    Type Description
    bool
    | Edit this page View Source

    TrustDefaultProfile(X509Certificate2, string)

    Imports the CA into the default Firefox profile NSS DB via certutil. Caller should ensure Firefox is not locking the DB.

    Declaration
    public static CertificateOsTrustResult TrustDefaultProfile(X509Certificate2 certificate, string friendlyName)
    Parameters
    Type Name Description
    X509Certificate2 certificate
    string friendlyName
    Returns
    Type Description
    CertificateOsTrustResult
    | Edit this page View Source

    TryClearWindowsEnterpriseRoots()

    Clears the HKCU ImportEnterpriseRoots value and profile user.js pref we may have set.

    Declaration
    public static bool TryClearWindowsEnterpriseRoots()
    Returns
    Type Description
    bool
    | Edit this page View Source

    TryEnableEnterpriseRootsUserPref()

    Enables security.enterprise_roots.enabled in the default Firefox profile (user.js; also prefs.js when Firefox is not running) so Firefox trusts OS roots (Windows store / macOS Keychain / Linux system CAs).

    Declaration
    public static CertificateOsTrustResult TryEnableEnterpriseRootsUserPref()
    Returns
    Type Description
    CertificateOsTrustResult
    | Edit this page View Source

    TryEnableWindowsEnterpriseRoots()

    Windows: enable OS-root trust for Firefox via HKCU policy when allowed, otherwise set security.enterprise_roots.enabled in the default profile user.js. Also best-effort writes/merges Mozilla policies.json on all OSes.

    Declaration
    public static CertificateOsTrustResult TryEnableWindowsEnterpriseRoots()
    Returns
    Type Description
    CertificateOsTrustResult
    | Edit this page View Source

    TryRequestFirefoxQuit(TimeSpan?)

    Asks Firefox to quit gracefully (user already consented). Waits briefly for exit. Does not force-kill; returns false if Firefox is still running after the wait.

    Declaration
    public static bool TryRequestFirefoxQuit(TimeSpan? waitForExit = null)
    Parameters
    Type Name Description
    TimeSpan? waitForExit
    Returns
    Type Description
    bool
    | Edit this page View Source

    TryResolveDefaultProfileDirectory(out string, out string?)

    Resolves the default Firefox profile directory from profiles.ini.

    Declaration
    public static bool TryResolveDefaultProfileDirectory(out string profileDirectory, out string? error)
    Parameters
    Type Name Description
    string profileDirectory
    string error
    Returns
    Type Description
    bool
    | Edit this page View Source

    UntrustDefaultProfile(string)

    Best-effort removal of the CA nickname from the default Firefox profile.

    Declaration
    public static bool UntrustDefaultProfile(string friendlyName)
    Parameters
    Type Name Description
    string friendlyName
    Returns
    Type Description
    bool
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX