Handles PostgreSQL SSL negotiation protocol and socket upgrade.
Builds the effective SSL configuration for a connection.
Asks the server for TLS and upgrades the connection if it agrees, before the startup message and so before any credential is on the wire.
Wraps an agreed socket in TLS and completes the handshake.