Skip Menu |

This queue is for tickets about the IO-Socket-SSL CPAN distribution.

Report information
The Basics
Id: 6165
Status: resolved
Priority: 0/
Queue: IO-Socket-SSL

People
Owner: Nobody in particular
Requestors: dom [...] idealx.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.95
Fixed in: 0.97



Subject: Misinterpretation of ssl_write_all return value
IO::Socket::SSL misinterprets the return value of Net::SSLeay::ssl_write_all (Net::SSLeay version 1.22): the latter function returns undef upon failure, and IO::Socket::SSL checks for <0. The attached patch fixes that (both conditions, undef and <0, now elicit an error).
--- /usr/share/perl5/IO/Socket/SSL.pm Thu Sep 26 19:47:55 2002 +++ src/perllib/IO/Socket/SSL.pm Thu Apr 29 16:56:12 2004 @@ -212,7 +212,8 @@ my $written = &Net::SSLeay::ssl_write_all ($ssl, \substr($$buffer, $offset+$[, $length)); - return $self->error("SSL write error") if ($written<0); + return $self->error("SSL write error") if + (!defined($written) || $written<0); return $written; }