#rustls #integration #tokio-postgres #postgresql #tls

tokio-postgres-tls

Rustls integration for tokio-postgres

1 unstable release

0.12.0 Jun 30, 2024

#24 in #tokio-postgres

MIT license

10KB
198 lines

tokio-postgres-rustls

This is an integration between the rustls TLS stack and the tokio-postgres asynchronous PostgreSQL client library.

Crate

API Documentation

Example

let config = rustls::ClientConfig::builder()
    .with_root_certificates(rustls::RootCertStore::empty())
    .with_no_client_auth();
let tls = tokio_postgres_rustls::MakeRustlsConnect::new(config);
let connect_fut = tokio_postgres::connect("sslmode=require host=localhost user=postgres", tls);
// ...

License

tokio-postgres-rustls is distributed under the MIT license.

Dependencies

~16–27MB
~503K SLoC