Struct TlsConfig

Struct Documentation

struct TlsConfig

TLS/HTTPS configuration settings.

Enables encrypted communication using OpenSSL. When enabled, the gateway will start an HTTPS server instead of HTTP.

Public Functions

std::string validate() const

Validate the configuration

Returns:

Empty string if valid, error message otherwise

Public Members

bool enabled = {false}

Whether TLS is enabled (default: false for backward compatibility)

std::string cert_file

Path to PEM-encoded certificate file.

std::string key_file

Path to PEM-encoded private key file.

std::string ca_file

Optional: Path to CA certificate file for client verification (mutual TLS)

std::string min_version = {"1.2"}

Minimum TLS version: “1.2” or “1.3” (default: “1.2”)