nection */
ssl = SSL_new(ctx);
if (ssl == NULL) {
    printf(&quot;Failed to create the SSL object\n&quot;);
    goto end;
}</code></pre>

<h2 id="Creating-the-socket-and-BIO">Creating the socket and BIO</h2>

<p>TLS data is transmitted over an underlying transport layer. Normally a TCP socket. It is the application&#39;s responsibility for ensuring that the socket is created and associated with an SSL object (via a BIO).</p>

<p>Socket creation for use by a client is typically a 2 step process, i.e. constr