import { FxError, LogProvider, UserInteraction } from "@microsoft/teamsfx-api"; import * as fs from "fs-extra"; import * as os from "os"; import { getLocalizedString } from "../../common/localizeUtils"; import * as ps from "./process"; export declare const localCertificateManagerDeps: { ensureDir: typeof fs.ensureDir; pathExists: typeof fs.pathExists; readFile: typeof fs.readFile; writeFile: typeof fs.writeFile; homedir: typeof os.homedir; osType: typeof os.type; execPowerShell: typeof ps.execPowerShell; execShell: typeof ps.execShell; localize: typeof getLocalizedString; }; export interface LocalCertificate { certPath: string; keyPath: string; isTrusted?: boolean; alreadyTrusted?: boolean; error?: FxError; found?: boolean; } export declare class LocalCertificateManager { private readonly ui?; private readonly logger?; private readonly certFolder; constructor(ui?: UserInteraction, logger?: LogProvider); /** * Local certificates are located at {home}/.fx/certificate/ * Public certificate should be trusted into user"s certificate store. * * - Check and generate cert and key files (subject, usage, expiration, ...) * - Check cert store if trusted (thumbprint, expiration) * - Add to cert store if not trusted (friendly name as well) */ setupCertificate(needTrust: boolean, checkOnly?: boolean): Promise; generateCertificate(certFile: string, keyFile: string): Promise; verifyCertificateContent(certContent: string, keyContent: string): [string | undefined, boolean]; verifyCertificateInStore(thumbprint: string): Promise; private trustCertificate; private waitForUserConfirm; private checkCertificateWindows; private trustCertificateWindows; } //# sourceMappingURL=localCertificateManager.d.ts.map