title: OpenSSL verify domain certificate
body: <p>I'm trying to verify certificate from a CA file and it's working pretty good:</p>
  <pre><code>SL_CTX_load_verify_locations(ctx, trusted_ca.c_str(), nullptr)
  ...
  SSL_set_verify(ssl, SSL_VERIFY_PEER, verify_callback);
  </code></pre>
  <p>In such a situation, it checks that the signature does indeed match the CA but it does not verify the domain.</p>
  <p>How verify_callback should look? How do I check within the function <code>verify_callback</code> what is the domain?</p>