/** * SMTP Client TLS Handler * TLS and STARTTLS client functionality */ import * as tls from 'node:tls'; import type { ISmtpConnection, ISmtpClientOptions } from './interfaces.js'; import type { CommandHandler } from './command-handler.js'; export declare class TlsHandler { private options; private commandHandler; constructor(options: ISmtpClientOptions, commandHandler: CommandHandler); /** * Upgrade connection to TLS using STARTTLS */ upgradeToTLS(connection: ISmtpConnection): Promise; /** * Create a direct TLS connection */ createTLSConnection(host: string, port: number): Promise; /** * Validate TLS certificate */ validateCertificate(socket: tls.TLSSocket): boolean; /** * Get TLS connection information */ getTLSInfo(socket: tls.TLSSocket): any; /** * Check if TLS upgrade is required or recommended */ shouldUseTLS(connection: ISmtpConnection): boolean; private performTLSUpgrade; }