pub fn upgrade_tls(conn: i64, host: String) -> Result<(), String>Expand description
Wrap an ESTABLISHED plain connection in TLS, in place.
★ THIS IS THE ONE PostgreSQL NEEDS. Its negotiation is not “connect with TLS”: the client sends
an 8-byte SSLRequest over the plain socket, reads a single S or N, and only then hands the
same socket to TLS. A connect-only API cannot express that. It also gives SMTP STARTTLS and
HTTP CONNECT proxying for nothing.