///
import { uninstall } from './certificate-authority';
import { UserInterface } from './user-interface';
export { uninstall };
export interface Options {
/** Return the CA certificate data? */
getCaBuffer?: boolean;
/** Return the path to the CA certificate? */
getCaPath?: boolean;
/** If `certutil` is not installed already (for updating nss databases; e.g. firefox), do not attempt to install it */
skipCertutilInstall?: boolean;
/** Do not update your systems host file with the domain name of the certificate */
skipHostsFile?: boolean;
/** User interface hooks */
ui?: UserInterface;
}
interface ICaBuffer {
ca: Buffer;
}
interface ICaPath {
caPath: string;
}
interface IDomainData {
key: Buffer;
cert: Buffer;
}
declare type IReturnCa = O['getCaBuffer'] extends true ? ICaBuffer : false;
declare type IReturnCaPath = O['getCaPath'] extends true ? ICaPath : false;
declare type IReturnData = (IDomainData) & (IReturnCa) & (IReturnCaPath);
/**
* Request an SSL certificate for the given app name signed by the devcert root
* certificate authority. If devcert has previously generated a certificate for
* that app name on this machine, it will reuse that certificate.
*
* If this is the first time devcert is being run on this machine, it will
* generate and attempt to install a root certificate authority.
*
* Returns a promise that resolves with { key, cert }, where `key` and `cert`
* are Buffers with the contents of the certificate private key and certificate
* file, respectively
*
* If `options.getCaBuffer` is true, return value will include the ca certificate data
* as { ca: Buffer }
*
* If `options.getCaPath` is true, return value will include the ca certificate path
* as { caPath: string }
*/
export declare function certificateFor(domain: string, options?: O): Promise>;
export declare function hasCertificateFor(domain: string): boolean;
export declare function configuredDomains(): string[];
export declare function removeDomain(domain: string): void;