title: When to call SSL_set_verify vs SSL_CTX_set_verify
body: <p>According the <a href="https://www.openssl.org/docs/manmaster/ssl/SSL_CTX_set_verify.html" rel="nofollow">OpenSSL documentation</a>, both <code>SSL_set_verify</code> and <code>SSL_CTX_set_verify</code> appear to do pretty much the same thing.</p>
  
  <p>Using the Boost libraries, I can't tell whether/when I need to call <a href="http://www.boost.org/doc/libs/1_47_0/doc/html/boost_asio/reference/ssl__stream/set_verify_callback/overload1.html" rel="nofollow"><code>ssl::stream::set_verify_callback</code></a> versus <a href="http://www.boost.org/doc/libs/1_49_0/doc/html/boost_asio/reference/ssl__context/set_verify_callback/overload1.html" rel="nofollow"><code>ssl::context::set_verify_callback</code></a>, since the stream uses the context anyways. The functions call <code>SSL_set_verify</code> and <code>SSL_CTX_set_verify</code>, respectively, under the hood.</p>
  
  <p>When do I need to set the verification callback for the context instead of the SSL stream?</p>