UNPKG

@stacksjs/tlsx

Version:

A TLS/HTTPS library with automation.

24 lines 1.28 kB
import type { Cert, CertPath, TlsOption } from '../types'; /** * Add a certificate to the system trust store and save the certificate to a file * @param cert - Certificate and private key * @param caCert - CA Certificate * @param options - TLS options * @returns The path to the stored certificate */ export declare function addCertToSystemTrustStoreAndSaveCert(cert: Cert, caCert: string, options?: TlsOption): Promise<CertPath>; /** * Remove a certificate from the system trust store * @param domain - Domain of the certificate to remove * @param options - TLS options * @param certName - Optional specific certificate name to remove (defaults to config.commonName) */ export declare function removeCertFromSystemTrustStore(domain: string, options?: TlsOption, certName?: string): Promise<void>; /** * Clean up all TLSX certificates from the system trust store * This function removes all certificates created by TLSX from the system trust store * @param options - TLS options * @param certNamePattern - Optional pattern to match certificate names (defaults to all TLSX certificates) * @returns Promise that resolves when all certificates have been removed */ export declare function cleanupTrustStore(options?: TlsOption, certNamePattern?: string): Promise<void>;