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

Owner: Nobody in particular
Requestors: dom [...]

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


Subject: Misinterpretation of ssl_write_all return value
Download (untitled) / with headers
text/plain 272b
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/ Thu Sep 26 19:47:55 2002 +++ src/perllib/IO/Socket/ 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; }

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to