import { Options } from '../index'; import { Platform } from '.'; /** * Linux distro indicator * @internal */ export declare enum LinuxFlavor { Unknown = 0, Ubuntu = 1, Rhel7 = 2, Fedora = 3 } interface Cmd { command: string; args: string[]; } interface LinuxFlavorDetails { caFolders: string[]; postCaPlacementCommands: Cmd[]; postCaRemovalCommands: Cmd[]; } /** * Determine the per-distro cert generation parameters for a given linux distro * * @param flavor linux distro * @param options options (mostly intended for dependency injection in tests) * * @internal */ export declare function linuxFlavorDetails(flavor: Exclude, options?: { customCaRoots?: string[]; omitPostCaPlacementCommands?: boolean; omitPostCaRemovalCommands?: boolean; }): LinuxFlavorDetails; export default class LinuxPlatform implements Platform { private FIREFOX_NSS_DIR; private CHROME_NSS_DIR; private FIREFOX_BIN_PATH; private CHROME_BIN_PATH; private HOST_FILE_PATH; /** * Linux is surprisingly difficult. There seems to be multiple system-wide * repositories for certs, so we copy ours to each. However, Firefox does it's * usual separate trust store. Plus Chrome relies on the NSS tooling (like * Firefox), but uses the user's NSS database, unlike Firefox (which uses a * separate Mozilla one). And since Chrome doesn't prompt the user with a GUI * flow when opening certs, if we can't use certutil to install our certificate * into the user's NSS database, we're out of luck. */ addToTrustStores(certificatePath: string, options?: Options): Promise; removeFromTrustStores(certificatePath: string): Promise; addDomainToHostFileIfMissing(domain: string): void; deleteProtectedFiles(filepath: string): void; readProtectedFile(filepath: string): string; writeProtectedFile(filepath: string, contents: string): void; private isFirefoxInstalled; private isChromeInstalled; } export {};