Expand description
rustls / QUIC TLS configuration construction. TLS and QUIC configuration construction.
flexd uses rustls exclusively — there is no
OpenSSL dependency. This module turns the parsed
SslSettings (or explicit cert/key paths, for
ACME-issued certificates) into the acceptors the server needs:
build_tls_acceptor— atokio_rustlsacceptor for static certs, advertisingh2andhttp/1.1via ALPN.build_tls_acceptor_acme— like the above but with a challenge-aware certificate resolver that also serves TLS-ALPN-01 validation certs.build_quinn_server_config/build_quinn_server_config_from_paths— a QUIC server config advertisingh3for HTTP/3 listeners.
Only TLS 1.2 and 1.3 are ever negotiated; the configuration validator rejects older versions before these functions run.
Functions§
- build_
quinn_ server_ config - Build a QUIC (HTTP/3) server config from
SslSettings. - build_
quinn_ server_ config_ from_ paths - QUIC server config from explicit cert/key paths (used for ACME-issued certs,
where
SslSettings.certificateis absent). - build_
tls_ acceptor - Build a
tokio_rustlsacceptor from static-certificateSslSettings. - build_
tls_ acceptor_ acme - Build a TLS acceptor for an
acme.enabledblock. The default cert is the ACME-issued chain atcert_path/key_path; ancrate::acme::AcmeResolveradditionally serves TLS-ALPN-01 challenge certs fromstore. The acceptor advertisesacme-tls/1alongside h2/http1.1 so the CA’s validation handshake (C52) negotiates it. - load_
certificate - Load a PEM certificate chain from
cert_path. - load_
private_ key - Load a private key from
key_path, trying PKCS#8 first and then RSA.