This is an integration between the rustls TLS stack and the tokio-postgres asynchronous PostgreSQL client library.
let config = rustls::ClientConfig::builder()
.with_safe_defaults()
.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);
// ...
tokio-postgres-rustls is distributed under the MIT license.
To submit a patch, please familiarise yourself with mailing list etiquette and the use of git-send-email and then send your patch to the ~jbg/patches mailing list. Please prefix the subject with [PATCH tokio-postgres-rustls].