Show quoted text > Hi Forrest,
>
> Thank you for using my module and taking the time to open a new CPAN bug
report and submitting
Show quoted text > a patch.
>
> I'll look into it as soon as I can. In the meantime, can you please give
me a trace using your
Show quoted text > patch so that I can follow your logs on what is happening?
>
> This will give me some needed information on implementing it. Including
the version of my software
Show quoted text > you are using. Also can you please let me know what version of
IO::Socket::SSL you are using?
Show quoted text > My logs don't currently tell me that.
>
> Try doing this in your sample program:
>
> use IO::Socket::SSL qw (debug3): # Turns on verbose SSL loging.
> use Net::FTPSSL;
>
> open (STDERR, "> myLogfile.txt"); # Redirects STDERR to this file.
> $ftps = Net::FTPSSL->new ($server, ..., Debug=>1);
> $ftps->trapWarn ();
> $ftps->login (user,pwd);
> $ftps->nlst();
> $ftps->quit();
>
> The above code snippet should be enough to demonstrate your patch in
action & the logs should help
Show quoted text > me out a lot.
>
> Thanks
>
> Curtis
Sorry it has taken so long to get back to you. Life gets in the way of
progress at times. Here is the short program that I used along with the
contents of the log. Note, Met::FTPSSL is a modified Net::FTPSSL 0.27 module
with the four lines changed as indicated in the previous post. If there is
any other information I can provide, please let me know. (Resending in plain
text as the last post wasn't readable).
Forrest
---------------------- test.pl ------------------------------------
#!/usr/bin/perl
use lib "./lib";
use IO::Socket::SSL qw (debug3); # Turns on verbose SSL loging.
use Met::FTPSSL;
open (STDERR, "> myLogfile.txt"); # Redirects STDERR to this file.
my %connectionHash = (
Port => 21,
Encryption => 'E',
Debug => 1,
OverridePASV => '192.168.0.200',
Croak => 0,
PreserveTimestamp => 0,
);
%sslHash = (
SSL_cert_file => 'C:\Users\ftiffany\Documents\ssl\forrest.pem',
SSL_reuse_ctx => '',
SSL_key_file => 'C:\Users\ftiffany\Documents\ssl\forrest.key',
SSL_ca_file => 'C:\Users\ftiffany\Documents\ssl\CA.crt',
SSL_use_cert => 1,
);
$connectionHash{SSL_Client_Certificate} = \%sslHash;
my $ftps = Met::FTPSSL->new(
'192.168.0.200',
%connectionHash,
);
$ftps->trapWarn ();
$ftps->login ('forrest', '********');
$ftps->nlst();
$ftps->quit();
------------------------------------------------ End test.pl
---------------------------------
Here are the contents of the log:
Net-FTPSSL Version: 0.27
Perl: 5.018004 [5.18.4], OS: MSWin32
Server (port): 192.168.0.200 (21)
Keys: (SSL_Client_Certificate), (Debug), (PreserveTimestamp), (OverridePASV),
(Croak), (Port), (Encryption)
Values: (HASH(0x3527798)), (1), (0), (192.168.0.200), (0), (21), (E)
SKT <<< 220 (vsFTPd 3.0.2)
SKT >>> AUTH TLS
SKT <<< 234 Proceed with negotiation.
DEBUG: .../IO/Socket/SSL.pm:2634: new ctx 53008208
DEBUG: .../IO/Socket/SSL.pm:1376: start handshake
DEBUG: .../IO/Socket/SSL.pm:573: ssl handshake not started
DEBUG: .../IO/Socket/SSL.pm:609: not using SNI because hostname is unknown
DEBUG: .../IO/Socket/SSL.pm:660: set socket to non-blocking to enforce
timeout=120
DEBUG: .../IO/Socket/SSL.pm:676: Net::SSLeay::connect -> -1
DEBUG: .../IO/Socket/SSL.pm:686: ssl handshake in progress
DEBUG: .../IO/Socket/SSL.pm:696: waiting for fd to become ready: SSL wants a
read first
DEBUG: .../IO/Socket/SSL.pm:716: socket ready, retrying connect
DEBUG: .../IO/Socket/SSL.pm:2490: ok=1 cert=3726976
DEBUG: .../IO/Socket/SSL.pm:2490: ok=1 cert=58351280
DEBUG: .../IO/Socket/SSL.pm:2490: ok=1 cert=58351104
DEBUG: .../IO/Socket/SSL.pm:2490: ok=1 cert=58350928
DEBUG: .../IO/Socket/SSL.pm:676: Net::SSLeay::connect -> -1
DEBUG: .../IO/Socket/SSL.pm:686: ssl handshake in progress
DEBUG: .../IO/Socket/SSL.pm:696: waiting for fd to become ready: SSL wants a
read first
DEBUG: .../IO/Socket/SSL.pm:716: socket ready, retrying connect
DEBUG: .../IO/Socket/SSL.pm:676: Net::SSLeay::connect -> 1
DEBUG: .../IO/Socket/SSL.pm:731: ssl handshake done
Object HASH Details ... (SSL_Client_Certificate:options - E)
SSL_ca_file ==> C:\Users\ftiffany\Documents\ssl\CA.crt
SSL_cert_file ==> C:\Users\ftiffany\Documents\ssl\forrest.pem
SSL_key_file ==> C:\Users\ftiffany\Documents\ssl\forrest.key
SSL_reuse_ctx ==>
SSL_use_cert ==> 1
Object Met::FTPSSL Details ... (192.168.0.200:21 - E)
Croak ==> (undef)
Crypt ==> E
FixGetTs ==> 0
FixPutTs ==> 0
Host ==> 192.168.0.200
OverridePASV ==> 192.168.0.200
Pret ==> 0
Timeout ==> 120
_SSL_arguments ==> HASH(0x36c9f50)
-- PeerAddr ===> 192.168.0.200
-- PeerPort ===> 21
-- Proto ===> tcp
-- SSL_ca_file ===> C:\Users\ftiffany\Documents\ssl\CA.crt
-- SSL_cert_file ===> C:\Users\ftiffany\Documents\ssl\forrest.pem
-- SSL_check_crl ===> 0
-- SSL_cipher_list ===> ECDHE-ECDSA-AES128-GCM-SHA256
ECDHE-ECDSA-AES128-SHA256 ECDHE-ECDSA-AES256-GCM-SHA384
ECDHE-ECDSA-AES256-SHA384 ECDHE-ECDSA-AES128-SHA ECDHE-ECDSA-AES256-SHA
ECDHE-RSA-AES128-SHA256 ECDHE-RSA-AES128-SHA ECDHE-RSA-AES256-SHA
DHE-DSS-AES128-SHA256 DHE-DSS-AES128-SHA DHE-DSS-AES256-SHA256
DHE-DSS-AES256-SHA AES128-SHA256 AES128-SHA AES256-SHA256 AES256-SHA
EDH-DSS-DES-CBC3-SHA DES-CBC3-SHA RC4-SHA !EXP !LOW !eNULL !aNULL !DES !MD5
!PSK !SRP
-- SSL_key_file ===> C:\Users\ftiffany\Documents\ssl\forrest.key
-- SSL_reuse_ctx ===>
-- SSL_server ===> 0
-- SSL_session_cache ===>
IO::Socket::SSL::Session_Cache=HASH(0x3acd40)
-- _head ----> HASH(0x36cbb98)
-- _maxsize ----> 10
-- abcd1234:1 ----> HASH(0x36cbb98)
-- SSL_session_key ===> abcd1234
-- SSL_use_cert ===> 1
-- SSL_verify_callback ===> CODE(0x36ca0e8)
-- SSL_verify_mode ===> 1
-- SSL_version ===> TLSv1
_SSL_ctx ==> IO::Socket::SSL::SSL_Context=HASH(0x36ca0d0)
-- context ===> 53008208
-- ocsp_mode ===> 16
-- session_cache ===> IO::Socket::SSL::Session_Cache=HASH(0x3acd40)
-- _head ----> HASH(0x36cbb98)
-- _maxsize ----> 10
-- abcd1234:1 ----> HASH(0x36cbb98)
-- verify_mode ===> 1
-- verify_name_ref ===> SCALAR(0x323f3e0) [192.168.0.200]
_SSL_fileno ==> 3
_SSL_ioclass_upgraded ==> IO::Socket::INET
_SSL_last_err ==> ARRAY(0x36cbc10)
_SSL_object ==> 58358768
_SSL_opened ==> 1
buf_size ==> 10240
data_prot ==> P
dcsc_mode ==> 1
debug ==> 1
debug_extra ==> 0
io_sock_nonblocking ==> 0
io_socket_domain ==> 2
io_socket_proto ==> 6
io_socket_timeout ==> 120
io_socket_type ==> 1
last_ftp_msg ==> 234 Proceed with negotiation.
myContext ==> HASH(0x352d6a8)
-- SSL_ca_file ===> C:\Users\ftiffany\Documents\ssl\CA.crt
-- SSL_reuse_ctx ===> IO::Socket::SSL::SSL_Context=HASH(0x36ca0d0)
-- context ----> 53008208
-- ocsp_mode ----> 16
-- session_cache ---->
IO::Socket::SSL::Session_Cache=HASH(0x3acd40)
-- verify_mode ----> 1
-- verify_name_ref ----> SCALAR(0x323f3e0) [192.168.0.200]
mySocketOpts ==> HASH(0x352cba8)
-- PeerAddr ===> 192.168.0.200
-- PeerPort ===> 21
-- Proto ===> tcp
-- Timeout ===> 120
trace ==> 0
type ==> A
Show quoted text >>> USER +++++++
<<< 331 Please specify the password.
Show quoted text >>> PASS *******
<<< 230 Login successful.
Show quoted text >>> HELP
<<< 214-The following commands are recognized.
<<< ABOR ACCT ALLO APPE CDUP CWD DELE EPRT EPSV FEAT HELP LIST MDTM MKD
<<< MODE NLST NOOP OPTS PASS PASV PORT PWD QUIT REIN REST RETR RMD RNFR
<<< RNTO SITE SIZE SMNT STAT STOR STOU STRU SYST TYPE USER XCUP XCWD XMKD
<<< XPWD XRMD
<<< 214 Help OK.
Show quoted text >>> FEAT
<<< 211-Features:
<<< AUTH TLS
<<< EPRT
<<< EPSV
<<< MDTM
<<< PASV
<<< PBSZ
<<< PROT
<<< REST STREAM
<<< SIZE
<<< TVFS
<<< UTF8
<<< 211 End
<<+ 214 The HELP command is supported.
Show quoted text >>> PBSZ 0
<<< 200 PBSZ set to 0.
Show quoted text >>> PROT P
<<< 200 PROT now Private.
Show quoted text >>> PASV
<<< 227 Entering Passive Mode (192,168,0,200,233,30).
--- Overriding PASV IP Address 192.168.0.200 with 192.168.0.200
--- Host (192.168.0.200) Port (59678)
Show quoted text >>> NLST
<<< 150 Here comes the directory listing.
DEBUG: .../IO/Socket/SSL.pm:1376: start handshake
DEBUG: .../IO/Socket/SSL.pm:573: ssl handshake not started
DEBUG: .../IO/Socket/SSL.pm:609: not using SNI because hostname is unknown
DEBUG: .../IO/Socket/SSL.pm:676: Net::SSLeay::connect -> 1
DEBUG: .../IO/Socket/SSL.pm:731: ssl handshake done
<<< 226 Directory send OK.
Show quoted text >>> QUIT
<<< 221 Goodbye.
DEBUG: .../IO/Socket/SSL.pm:2667: free ctx 53008208 open=53008208
DEBUG: .../IO/Socket/SSL.pm:2672: free ctx 53008208 callback
DEBUG: .../IO/Socket/SSL.pm:2679: OK free ctx 53008208