import { EventEmitter } from 'node:events'; import net from 'node:net'; import tls from 'node:tls'; import { LRUCache } from 'lru-cache'; import forge from 'node-forge'; import { SslBumpConfig } from './SslBumpProxy.js'; /** * Issues temporary certificates and caches them as connections arrive. */ export declare class SslCertStore extends EventEmitter { protected caCert: forge.pki.Certificate; protected caCertPem: string; protected caPrivateKey: forge.pki.rsa.PrivateKey; protected certPublicKey: forge.pki.rsa.PublicKey; protected certPrivateKey: forge.pki.rsa.PrivateKey; protected certPrivateKeyPem: string; protected certTtlDays: number; protected certPemCache: LRUCache; constructor(config: SslBumpConfig); /** * Creates a decrypted TLS socket from an encrypted `clientSocket`. */ bumpClientSocket(hostname: string, clientSocket: net.Socket): tls.TLSSocket; createSecureContextForHostname(hostname: string): tls.SecureContext; /** * Returns a temporary certificate for the hostname * (from cache or newly generated). */ getCertificate(hostname: string): string; /** * Creates a new temporary certificate for the hostname, ignoring the cache. */ createCertificate(hostname: string): string; }