import { type CertOptions } from './index.js';
/**
 * Override tls.createSecureContext to trust a CA cert specified by the
 * options. WARNING: Do not call this function more than once without calling
 * resetCreateSecureContext.
 *
 * @param options CA options.
 * @returns Unique symbol, to be used in resetCreateSecureContext.
 * @throws On invalid state.
 */
export declare function overrideCreateSecureContext(options: CertOptions | string): Promise<symbol>;
/**
 * Reset tls.createSecureContext back to its default.  This must match
 * a corresponding call to overrideCreateSecureContext.
 *
 * @param sym Unique symbol returned from overrideCreateSecureContext.
 * @throws On invalid state.
 */
export declare function resetCreateSecureContext(sym: symbol): void;
/**
 * Trust the CA cert that CertificateAuthority generates for all node.js TLS
 * operations, including fetch, but only for the duration of this function
 * call.
 *
 * @param options Certificate options.
 * @param during Callback during which the cert will be valid.
 * @returns The result of during.
 */
export declare function whileCAtrusted<T>(options: CertOptions | string, during: () => T): Promise<Awaited<T>>;
