UNPKG

1.06 kBTypeScriptView Raw
1/// <reference types="node" />
2import { UserInterface } from './user-interface';
3export interface Options {
4 skipCertutilInstall?: true;
5 skipHostsFile?: true;
6 ui?: UserInterface;
7}
8/**
9 * Request an SSL certificate for the given app name signed by the devcert root
10 * certificate authority. If devcert has previously generated a certificate for
11 * that app name on this machine, it will reuse that certificate.
12 *
13 * If this is the first time devcert is being run on this machine, it will
14 * generate and attempt to install a root certificate authority.
15 *
16 * Returns a promise that resolves with { key, cert }, where `key` and `cert`
17 * are Buffers with the contents of the certificate private key and certificate
18 * file, respectively
19 */
20export declare function certificateFor(domain: string, options?: Options): Promise<{
21 key: Buffer;
22 cert: Buffer;
23}>;
24export declare function hasCertificateFor(domain: string): boolean;
25export declare function configuredDomains(): string[];
26export declare function removeDomain(domain: string): void;