import { CertificateInfo } from "@certd/acme-client"; import { ILogger } from "@certd/basic"; export interface ICertInfoGetter { getByPipelineId: (pipelineId: number) => Promise; } export type CertInfo = { crt: string; key: string; csr?: string; oc?: string; ic?: string; pfx?: string; der?: string; jks?: string; one?: string; p7b?: string; }; export type CertReaderHandleContext = { reader: CertReader; tmpCrtPath: string; tmpKeyPath: string; tmpOcPath?: string; tmpPfxPath?: string; tmpDerPath?: string; tmpIcPath?: string; tmpJksPath?: string; tmpOnePath?: string; tmpP7bPath?: string; }; export type CertReaderHandle = (ctx: CertReaderHandleContext) => Promise; export type HandleOpts = { logger: ILogger; handle: CertReaderHandle; }; export type SimpleCertDetail = { notBefore: Date; notAfter: Date; domains: string[]; }; export declare class CertReader { cert: CertInfo; detail: CertificateInfo; effective: number; expires: number; constructor(certInfo: CertInfo); getIc(): string; getOc(): string; toCertInfo(format?: string): CertInfo; getCrtDetail(crt?: string): { detail: CertificateInfo; effective: Date; expires: Date; }; getSimpleDetail(): { notBefore: Date; notAfter: Date; domains: any; }; static readCertDetail(crt: string): { detail: CertificateInfo; effective: Date; expires: Date; }; static getFingerprintX509(crt: string): { fingerprint: string; fingerprint256: string; fingerprint512: string; }; getAllDomains(): any; getAltNames(): string[]; static getMainDomain(crt: string): string; getMainDomain(): string; static getMainDomainFromDetail(detail: CertificateInfo): string; saveToFile(type: "crt" | "key" | "pfx" | "der" | "oc" | "one" | "ic" | "jks" | "p7b", filepath?: string): string; readCertFile(opts: HandleOpts): Promise; buildCertFileName(suffix: string, applyTime: any, prefix?: string): string; buildCertName(prefix?: string, useHash?: boolean): string; static appendTimeSuffix(name?: string): string; static buildCertName(cert: CertInfo, useHash?: boolean): string; buildZip(): Promise; buildZipFilename(prefix?: string): string; } //# sourceMappingURL=cert-reader.d.ts.map