Skip Menu |

This queue is for tickets about the Net-FTPSSL CPAN distribution.

Report information
The Basics
Id: 28914
Status: resolved
Priority: 0/
Queue: Net-FTPSSL

People
Owner: Nobody in particular
Requestors: danny [...] debsinc.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in:
  • 0.06
  • 0.04
  • 0.05
  • 0.07
Fixed in: 0.08



Subject: Process doesn't work with Implicit connections (990).
Date: Mon, 20 Aug 2007 10:06:42 -0500
To: <bug-Net-FTPSSL [...] rt.cpan.org>
From: "Danny Nicholas" <danny [...] debsinc.com>
When the Implicit flag is turned on, the $<ftps> variable does not get set, so ftps->login, ftps->put and ftps->quit all fail. Here is a sample $ftps = Net::FTPSSL->new($to_srv, Port => $to_port, Encryption => 'I', Debug => $ftp_debug) or die $!; $ftps->login("twincity", "twincb#") or die $!; print "put $outfile as $outfile2\n"; $ftps->put($outfile, $outfile2) or print "error $!\n"; $ftps->quit(); } Regards, Danny Nicholas
Hi I am facing same problem in release 0.06. Whenever I try to make a implicit FTPS connection, process hangs. I am trying to invoke the constructor as: my $ftps = Net::FTPSSL->new( <IPA>, Encryption => IMP_CRYPT, Timeout => 30, Debug => 1, trace => 1, ); Also, the timeout value specified does not seems to be effective. Is there a workaround for this?
Sending the previous mail has failed. Please contact your admin, they can find more details in the logs.
I possibly have the workaround for this. In the constructor at line 82 we check the socket response: return undef unless ( response($socket) == CMD_OK ); But in case of implicit this hangs as the channel is still on clear and not converted to SSL. If we do this check later after starting SSL, it would work fine. Modified snippet is: 80 $socket->autoflush(1); 81 ${*$socket}{'debug'} = $debug; 82 ===> 83 #return undef unless ( response($socket) == CMD_OK ); 84 85 # In explicit mode, FTPSSL send an AUTH SSL command, catch the messages 86 # and then transform the clear connection in a crypted one. 87 if ( $encrypt_mode eq EXP_CRYPT ) { 88 command( $socket, "AUTH", ($use_ssl ? "SSL" : "TLS" ) ); 89 return undef unless ( response($socket) == CMD_OK ); 90 } 91 92 # Turn the clear connection in a SSL one. 93 my $mode = $use_ssl ? "SSLv23" : "TLSv1"; 94 my $obj = $type->start_SSL( $socket, SSL_version => $mode ) 95 or croak ( "$mode: " . IO::Socket::SSL::errstr () ); 96 97 # This is made for catch the banner when the connection 98 # is implicitly crypted. ===> 99 if ( $encrypt_mode eq IMP_CRYPT ) { ===> 100 return undef unless ( response($socket) == CMD_OK ); ===> 101 } 102 103 ${*$obj}{'debug'} = $debug;
Sorry to say I haven't been working on Implicit connections in my latest releases. So it isn't fixed in v0.07 either. Could you please post the output to running "perl t/10-complex" to this chain so that I can see your fix in action? The output file will be called "t/test_trace_log_new.txt". Feel free to edit out the server name & login before you post it. The password is already automatially edited out of the trace. I need this trace since your patch doesn't work with the only server I have that accepts implicit connections. I'll need this trace from either v0.06 or v0.07, since I made so many major changes lately. But v0.07 would be best. Curtis
Made requested changes. Turned out my test case had the bug, not your solution.