Is it possible to configure OpenSSL to allow the use of a non-blocking socket
? I red things about BIO* object but I am not sure if it's the good way to
do it.
Thanks.

Normand

David Schwartz wrote:
> 
> 
>> SSL_accept always returns < 0 error. With SSL_get_error I found that the
>> error is SSL_ERROR_WANT_READ.
>> During debugging and troubleshooting, I realised that when I use "normal"
>> blocking windows socket, SSL_accept works fine.
>>
>> Why using non-blocking windows socket caused that error ?
> 
> This is expected behavior. Because the socket is non-blocking, it returns
> an
> error rather than blocking. If you would rather it block than return an
> error, use blocking sockets.
> 
> The SSL_accept cannot complete immediately because data from the other
> side
> cannot be read at this moment (since the other side has not sent it yet or
> it hasn't gotten here yet). Since the socket is non-blocking, it cannot
> wait
> for the data to arrive. So it returns an error, and the error
> (SSL_ERROR_WANT_READ) explains that it wants to read from the socket, but
> cannot do so because the socket is non-blocking.
> 
> DS
> 
> 
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    openssl-users@openssl.org
> Automated List Manager                           [EMAIL PROTECTED]
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Non-blocking-windows-socket-cause-SSL_accept-error-%28SSL_ERROR_WANT_READ%29-tp20663587p20666975.html
Sent from the OpenSSL - User mailing list archive at Nabble.com.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to