title: In OPENSSL , After SSL_Connect() i am getting SSL_ERROR_WANT_READ
body: <p>I am using <code>SSL_Connect()</code> and return code is "-1" , with <code>SSL_get_error()</code> i can see that error is <code>SSL_ERROR_WANT_READ</code>.</p>
  
  <p>As per suggestion on one forum, where it suggested to keep calling <code>SSL_connect()</code> until this error goes. With this modification for first call i am getting error WANT_READ and for second call i am getting <code>SSL_ERROR_SSL</code>. After that for all subsequent calls it is <code>SSL_ERROR_SSL</code> only and as per description of this error it looks something went wrong in <code>SSL library</code>.</p>
  
  <p>Can some one who resolved <code>SSL_connect</code> successfully provide some help.</p>
  
  <p>My code is a plain sequence of calling :<br>
   1. SSL_library_init()<br>
   2. Creating methods(v23) and context using this meth<br>
   3. context has not been modified and it plain as created.<br>
   4. SSL object is created using this plain ctx and ssl_connect is called on this ssl after calling SSL_set_fd()<br><br></p>
  
  <p>Please let me know if i am doing some thing wrong in this sequence or if i am missing something ?</p>
  
  <p>Is it required to load various things to <code>ctx</code> like certificates and verify locations before using it , if yes what are the bare minimum things required.</p>
  
  <p>Thanks in advance for help.</p>