Replies: 1 comment 5 replies
-
If you create a socket with let plaintext = Socket::builder()
.secure_transport(SecureTransport::StartTls)
.connect("host", 5432);
let socket = plaintext.start_tls();
// Pass to tokio-postgres, with `tokio_postgres::tls::NoTls`
// as far as it is concerned, it is just a plaintext socket. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I can only connect to my database through a secure context (i.e. TLS). However for this to work I had to replace the
NoTls
enum inconnect_raw
through some actual TLS connector implementation. Unfortunately there are only two solutions available: One with native-tls and one with openssl. Both don't compile to wasm. The only option would be using rustls but there isn't a crate that connects rustls to the tokio-postgres crate. What is they way you would use TLS?Beta Was this translation helpful? Give feedback.
All reactions