HTTPS provides security to HTTP. We covered HTTP in Chapter 6, Building a Simple Web Client. HTTPS secures HTTP by using TLS over TCP on port
443. TLS is a protocol that can provide security to any TCP connection.
TLS is the successor to Secure Socket Layer (SSL), an earlier protocol also used by HTTPS. TLS and SSL are compatible, and most of the information in this chapter also applies to SSL. Generally, establishing an HTTPS connection involves the client and server negotiating which protocol to use. The ideal outcome is that the client and server agree on the most secure, mutually supported protocol and cipher.