Foreword
TLS (Transport Layer Security) is a cryptographic protocol that provides secure communication over a network, commonly used to secure HTTP traffic (i.e., HTTPS). Here’s a high-level overview of the TLS workflow, which includes handshake and data transfer phases.
After TCP handshake, it will execute TLS handshake if client require.
Below image is my experiment TLS (TLS 1.2) workflow from PostgreSQL server, Red-frame represent TCP 3 handshake, and yellow-frame represent TLS handshake.
In the beginning, client will send a request to require sslmode connection (SSL/TLS), if server support it will reply (‘S’).
Eventually, processing below steps to do TLS handshake.
- ClientHello → 2. ServerHello → 3. Server Certificate → 4. ServerHelloDone → 5. Client Key Exchange