Subject: | SOAP::Transport::TCP in use with IO::Socket::SSL exits process when TLS authentication fail |
Date: | Wed, 18 Aug 2010 09:36:50 +0200 |
To: | <bug-SOAP-Lite [...] rt.cpan.org> |
From: | David Zurborg <david [...] fakenet.eu> |
If SOAP::Transport::TCP uses SSL, TLS authentication can be used. The
server can verify a client certificate. But when this verification fails,
the whole server process exits with exit code 255:
"Can't call method "read" on an undefined value at
/usr/share/perl5/SOAP/Transport/TCP.pm line 210."
Reason:
In SOAP/Transport/TCP.pm the sub handle() gets a list of ready Sockets. If
TLS authentication is mandatory and fails, the socket will be closed by
IO::Socket::SSL, but then SOAP::Transport::TCP still tries to read (on a
undefined value)
A workaround is, to check for defined values by using grep:
line 207:
for my $session (grep { defined } @ready)
Now the server don't exit when TLS authentication fails.
greetings from Oldenburg, Germany
/David