Skip to main content

Module tls

Module tls 

Source
Expand description

TLS support for PostgreSQL connections.

TLS is opt-in via the connection string’s sslmode. When sslmode is require, verify-ca, verify-full, or prefer, the pool uses a rustls connector with the system’s native root certificates. Otherwise (the default, or sslmode=disable/allow) connections stay plaintext, matching the previous behavior exactly.

Functions§

make_connector
Build a rustls connector loading the OS trust store.
wants_tls
Return true if the connection string opts into TLS via sslmode.