We begin with a quick review of the HTTPS protocol, as covered in Chapter 9, Loading Secure Web Pages with HTTPS and OpenSSL. However, we do recommend that you work through Chapter 9, Loading Secure Web Pages with HTTPS and OpenSSL, before beginning this chapter.
HTTPS uses TLS to add security to HTTP. You will recall from Chapter 6, Building a Simple Web Client, and Chapter 7, Building a Simple Web Server, that HTTP is a text-based protocol that works over TCP on port 80. The TLS protocol can be used to add security to any TCP-based protocol. Specifically, TLS is used to provide security for HTTPS. So in a nutshell, HTTPS is simply HTTP with TLS. The default HTTPS port is 443.
OpenSSL is a popular open source library that provides functionality for TLS/SSL and HTTPS. We use it in this book to provide the methods needed to implement...