title: SSL client authentication returning Bad Certificate error
body: <p>I was trying to connect to my custom wrote ssl server written in CPP. It has got client authentication features. Its throwing error Bad certificate when watched through Wireshark. At the server side the error returned was</p>
  
  <pre><code>14560:error:140890B2:SSL routines:SSL3_GET_CLIENT_CERTIFICATE:no certificate returned:s3_srvr.c:2619:
  </code></pre>
  
  <p>I used the following code to force requesting client certificate</p>
  
  <pre><code>SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, NULL);
  SSL_CTX_set_verify_depth(ctx, 1);
  </code></pre>
  
  <p>I could see client returning certificate in Wireshark.</p>
  
  <p>Which function should be used to set the public key used for verifying the client certificate at the server side?</p>