start the path to rust

This commit is contained in:
2026-02-10 15:54:09 +00:00
parent 237dba3bab
commit 8bd8c295b0
318 changed files with 28352 additions and 428 deletions

View File

@@ -0,0 +1,45 @@
/**
* Certificate Utilities for SMTP Server
* Provides utilities for managing TLS certificates
*/
import * as tls from 'tls';
/**
* Certificate data
*/
export interface ICertificateData {
key: Buffer;
cert: Buffer;
ca?: Buffer;
}
/**
* Load certificates from PEM format strings
* @param options - Certificate options
* @returns Certificate data with Buffer format
*/
export declare function loadCertificatesFromString(options: {
key: string | Buffer;
cert: string | Buffer;
ca?: string | Buffer;
}): ICertificateData;
/**
* Load certificates from files
* @param options - Certificate file paths
* @returns Certificate data with Buffer format
*/
export declare function loadCertificatesFromFiles(options: {
keyPath: string;
certPath: string;
caPath?: string;
}): ICertificateData;
/**
* Generate self-signed certificates for testing
* @returns Certificate data with Buffer format
*/
export declare function generateSelfSignedCertificates(): ICertificateData;
/**
* Create TLS options for secure server or STARTTLS
* @param certificates - Certificate data
* @param isServer - Whether this is for server (true) or client (false)
* @returns TLS options
*/
export declare function createTlsOptions(certificates: ICertificateData, isServer?: boolean): tls.TlsOptions;