import type { RequestListener } from "node:http"; import { type Server } from "node:https"; import type { SecurityEvents } from "../incident/SecurityEvents.js"; import type { SecretHandle } from "../secrets/SecretHandle.js"; export type TlsMinVersion = "TLSv1.2" | "TLSv1.3"; /** What the listener presents and, when a client CA is set, what it asks for. */ export interface TlsMaterial { readonly cert: string; readonly key: SecretHandle; readonly clientCa: string | null; } export interface TlsListenerOptions { readonly minVersion: TlsMinVersion; /** Read at construction and at every rotation: the certificate, the key handle, the client CA. */ readonly material: () => TlsMaterial; readonly events: SecurityEvents; } /** For TLS 1.2 only: ECDHE with an AEAD cipher; TLS 1.3 has nothing else to offer. */ export declare const TLS12_CIPHERS: string; /** * The TLS listener: TLS 1.3 by default, 1.2 only with AEAD ciphers, no * renegotiation, HTTP/1.1 only. When a client CA is configured every * connection is asked for a certificate, but the handshake admits a client * without one deliberately, because the kubelet's HTTPS probes present * none; the door then requires `socket.authorized` on every route that is * not public, so a probe reaches `/health` and nothing else. The context is * replaced in place when the key rotates, and connections already open keep * the context they negotiated. */ export declare class TlsListener { private readonly options; readonly mutual: boolean; constructor(options: TlsListenerOptions); createServer(handler: RequestListener, options?: { handshakeTimeoutMs?: number; }): Server; rotate(server: Server): void; private context; } //# sourceMappingURL=TlsListener.d.ts.map