Overview
Features
Download
Documentation
Community
Add-Ons & Services

SSL timeout not working correctly

Please post support and help requests here.

SSL timeout not working correctly

Postby jengle » 26 Sep 2012, 22:14

I'm using Poco 1.4.4 with the fix in for setting the timeout prior to handshakes.

What I'm seeing now is this situation:

Windows VM and OSX system talking over SSL. While a connection was active, took down the Windows VM. Now the OSX-side it stuck in an infinite loop in SecureSocketImpl::sendBytes. The 'do/while' loop ending on line 292 of SecureSocketImpl.cpp breaks with rc == -1. Then it pops back up to SecureStreamSocketImpl::sendBytes. There's a check if(n < 0 && !blocking) return n;, the socket is blocking, so no return. It then yields the thread and tries again. Over and over again.

I'm not 100% sure on this, but it seems like if the return from _impl.sendBytes <= 0 on a blocking socket, that should be an error and it should throw.
jengle
 
Posts: 14
Joined: 23 Nov 2011, 00:39

Re: SSL timeout not working correctly

Postby jengle » 04 Oct 2012, 00:20

Any help on this?
jengle
 
Posts: 14
Joined: 23 Nov 2011, 00:39

Re: SSL timeout not working correctly

Postby jengle » 04 Oct 2012, 19:40

Forgot to mention, SSL_get_error is returning SSL_ERROR_WANT_READ. It seems like if SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE is returned on a blocking socket, that should be considered an error. Really seems like a bug in OpenSSL, since Poco sets auto_retry mode already.
jengle
 
Posts: 14
Joined: 23 Nov 2011, 00:39


Return to Support

Who is online

Users browsing this forum: No registered users and 5 guests

cron