export declare const DEFAULT_SELF_SIGNED_CERT_DAYS = 3650;
export type HttpsCertificateMaterial = {
    cert: string;
    key: string;
    certPath: string;
    keyPath: string;
    matchedHost: string;
    matchedHostPriority: number;
    validTo: Date;
};
export type CertificateLookupEndpoint = Readonly<{
    bindHost: string;
    urlHost: string;
}>;
export type CertificateLookupDiagnostic = {
    level: 'warn';
    code: 'invalid_cert_file' | 'missing_key_file' | 'invalid_key_pair' | 'expired_or_not_yet_valid';
    message: string;
    certPath: string;
    keyPath?: string;
} | {
    level: 'warn';
    code: 'multiple_matching_certs';
    message: string;
    host: string;
    certPaths: readonly string[];
};
export type CertificateLookupResult = {
    kind: 'found';
    certsDirAbs: string;
    endpoint: CertificateLookupEndpoint;
    certificate: HttpsCertificateMaterial;
    diagnostics: readonly CertificateLookupDiagnostic[];
} | {
    kind: 'not_found';
    certsDirAbs: string;
    endpoint: CertificateLookupEndpoint;
    diagnostics: readonly CertificateLookupDiagnostic[];
};
export type CreatedSelfSignedCertificate = {
    host: string;
    hosts: readonly string[];
    days: number;
    certsDirAbs: string;
    certPath: string;
    keyPath: string;
    metadataPath: string;
};
export declare function getDefaultDomindsCertsDir(): string;
export declare function findAutoHttpsCertificateForHost(params: {
    host: string;
    certsDirAbs?: string;
    now?: Date;
}): Promise<CertificateLookupResult>;
export declare function createSelfSignedCertificate(params: {
    host?: string;
    altHosts?: readonly string[];
    days?: number;
    certsDirAbs?: string;
    force?: boolean;
}): Promise<CreatedSelfSignedCertificate>;
