SslConfig manages SSL/TLS configuration for serving agents over HTTPS. It reads
from explicit options or falls back to environment variables (SWML_SSL_ENABLED,
SWML_SSL_CERT_PATH, SWML_SSL_KEY_PATH, SWML_SSL_DOMAIN). See
Environment Variables for the full list.
Optional SSL configuration overrides. Any field omitted falls back to the
corresponding SWML_SSL_* environment variable. Accepts the same keys as
the Properties section below (enabled, certPath,
keyPath, domain, hsts, hstsMaxAge).
Whether SSL is enabled. Falls back to SWML_SSL_ENABLED env var.
Filesystem path to the PEM-encoded certificate. Falls back to SWML_SSL_CERT_PATH.
Filesystem path to the PEM-encoded private key. Falls back to SWML_SSL_KEY_PATH.
Domain name for HSTS headers. Falls back to SWML_SSL_DOMAIN.
Whether to emit Strict-Transport-Security headers.
HSTS max-age value in seconds (default 1 year).
Check if SSL is fully configured with cert and key files.
Read the PEM certificate from disk.
Read the PEM private key from disk.
Build the HSTS header value.
Create options for Node.js https.createServer().
Hono middleware that appends HSTS headers.