I believe you are using non-blocking call. This kind of error will come in the situatation when the SSL is still waiting for data to be available to be read. Before that it can't start processing the data. Pls send me the code snippets where it is failing. I can try to help you in this.
If it is in non-blocking mode, then you put the SSL_connect in do while and continue this till SSL_pending is zero bytes or any other error comes. Whichever is earlier.
This is based on my assumptions. I can provide you help only when you send your code.
> Hi team,
> I am using SSL_Connect() in one of my projects and this SSL_connect
> is returning a value of -1.
> With SSL_get_error() i can see it is *SSL_ERROR_WANT_READ ?*
> * Now i am not understanding why this can come and if this is there
> then should i call SSL_Connect again.
> I am really new to OpenSSL API's and learning it. Please consider me
> as a beginner while replying.
> Any help will be greatly appreciated.
It means SSL_Connect has made as much forward progress as it can right
now and will be able to make further forward progress when it reads some
data from the server. Since you asked it not to block, it is not blocking.