Subject: | accept() doesn't pass errors to SSL_error_trap |
Date: | Thu, 10 Aug 2006 17:02:58 +0200 |
To: | bug-IO-Socket-SSL [...] rt.cpan.org |
From: | Matej Vela <vela [...] debian.org> |
Hi,
With IO::Socket::SSL 0.99 and later, the SSL_error_trap subroutine
will always receive an undefined error if accept() fails. The problem
is that accept_SSL() sets the error on the listening socket, but calls
fatal_ssl_error() on the accepted one. This causes a test failure for
HTTP::Daemon::SSL.
The following patch sets the error on the accepted socket, as was the
case in 0.96.
(Note that HTTP::Daemon::SSL also assumes opened() is true even though
accept() failed, so it needs an additional one-line patch in order to
work with IO::Socket:SSL 0.991 and later.)
Thanks,
Matej
Message body is not shown because sender requested not to inline it.