Note that there are some explanatory texts on larger screens.

plurals
  1. POBoost, asio, https, and host/certificate verifcation
    primarykey
    data
    text
    <p>I'm looking at Boost's <a href="http://www.boost.org/doc/libs/1_54_0/doc/html/boost_asio/example/cpp03/ssl/client.cpp">SSL Client</a>. There's a reference to OpenSSL in the comments (sorry, no line numbers):</p> <pre><code>// The verify callback can be used to check whether the certificate that is // being presented is valid for the peer. For example, RFC 2818 describes // the steps involved in doing this for HTTPS. Consult the OpenSSL // documentation for more details. Note that the callback is called once // for each certificate in the certificate chain, starting from the root // certificate authority. </code></pre> <p>Proper OpenSSL use and verification can be tricky. From experience, I know I have to perform the following to use the library correctly:</p> <ul> <li>Disable SSLv2, SSLv3, and Compression on the Context object</li> <li>Provide the proper root certificate for chain building and checking</li> <li>Call <code>SSL_get_peer_certificate</code> and verify the certificate is non-NULL</li> <li>Call <code>SSL_get_verify_result</code> and verify the result is <code>X509_V_OK</code></li> <li>Perform name matching (CN or SAN must match requested host)</li> </ul> <p>OpenSSL 1.1.0 will provide name checking, but its only in HEAD at this point in time. From the <a href="http://www.openssl.org/news/changelog.html">OpenSSL Change Log</a>:</p> <pre><code>Integrate hostname, email address and IP address checking with certificate verification. New verify options supporting checking in opensl utility. </code></pre> <p>And:</p> <pre><code>New functions to check a hostname email or IP address against a certificate. Add options x509 utility to print results of checks against a certificate. </code></pre> <p>I don't see where Boost is performing any of the configurations or checks in the client code.</p> <p>What precisely is Boost configuring, and what is it checking or verifying in its <code>asio</code> library component when using SSL?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload