On 5/9/2011 6:27 AM, Harshvir Sidhu wrote:
Also i suspect, that if i change the socket to non blocking, then
my current read write code will not work. i mean the one in which i use
FD_SET and select to perform operations.
Thanks.
It's very easy to get things wrong and it won't work unless you get
everything right.
The most common mistake is refusing to call one of the SSL_* functions
until you get a 'select' hit. You should only do that if OpenSSL
specifically tells you to do that.
The second most common mistake is assuming that an SSL connection has
separate read and write readiness, like a TCP connection does. An SSL
connection is a single state machine and so has only a single state. (So
if SSL_Read returns WANT_READ and then you call SSL_Write, regardless of
what return value you get, the WANT_READ from SSL_Read is invalidated
because SSL_Write can change the state of the SSL connection.)
DS
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [email protected]
Automated List Manager [email protected]