me(ssl, hostname)) {
    printf(&quot;Failed to set the SNI hostname\n&quot;);
    goto end;
}</code></pre>

<p>Here the <code>hostname</code> argument is a string representing the hostname of the server, e.g. &quot;www.example.com&quot;.</p>

<p>Secondly, we need to tell OpenSSL what hostname we expect to see in the certificate coming back from the server. This is almost always the same one that we asked for in the original request. This is important because, without this, we do not verify that the hostnam