[stunnel-users] Timeouts and inetd mode

Bruce Guenter bruce at untroubled.org
Fri Sep 28 20:56:26 CEST 2012


Hi.

As far as I can tell, if stunnel is running in "inetd mode", at least
TIMEOUTbusy does not work. In particularl, stunnel will never timeout
waiting for the SSL handshake to complete.

If I'm reading the sources right, this is because the code to set up the
SSL session calls SSL_accept before checking for data on stdin, and
stdin is never set to non-blocking mode (only newly created sockets
and/or pipes are).

Would it make sense to set stdin (and stdout) to non-blocking mode when
timeouts are enabled? Something in init_local maybe?

-- 
Bruce Guenter <bruce at untroubled.org>                http://untroubled.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://www.stunnel.org/pipermail/stunnel-users/attachments/20120928/84bef8e7/attachment.sig>


More information about the stunnel-users mailing list