/**
 * STARTTLS Implementation
 * Provides an improved implementation for STARTTLS upgrades
 */
import * as plugins from '../../../plugins.js';
import type { ISmtpSession, ISessionManager, IConnectionManager } from './interfaces.js';
import { SmtpState } from '../interfaces.js';
/**
 * Enhanced STARTTLS handler for more reliable TLS upgrades
 */
export declare function performStartTLS(socket: plugins.net.Socket, options: {
    key: string;
    cert: string;
    ca?: string;
    session?: ISmtpSession;
    sessionManager?: ISessionManager;
    connectionManager?: IConnectionManager;
    onSuccess?: (tlsSocket: plugins.tls.TLSSocket) => void;
    onFailure?: (error: Error) => void;
    updateSessionState?: (session: ISmtpSession, state: SmtpState) => void;
}): Promise<plugins.tls.TLSSocket | undefined>;
