export interface P12ReaderData { key: string | undefined; cert: string | undefined; publicKey?: string | undefined; } declare class P12Reader { private passphrase; constructor(passphrase: string); private getCertificateFromP12; private getKeyFromP12; /** * Get the certificate Key from a .p12 file * @param fileName filename.p12 with the full file path */ getKeyFromFile: (fileName: string) => P12ReaderData; private getPublicKeyFromCert; /** * Instead to read the file from the file system we can get from s3 bucket encoded * @param p12file * @returns */ getKeyFromStringBase64: (p12file: string) => P12ReaderData; /** * Get basic information from the p12 certificate, including expiration date. * @param fileName filename.p12 with the full file path */ getCertificateInfo: (fileName: string) => { subject: string; issuer: string; validFrom: Date; validTo: Date; serialNumber: string; }; /** * Get basic information from a base64-encoded p12 certificate, including expiration date. * @param p12base64 base64-encoded p12 certificate string */ getCertificateInfoFromBase64: (p12base64: string) => { subject: string; issuer: string; validFrom: Date; validTo: Date; serialNumber: string; }; } export default P12Reader;