Heray-Was-Here
Server : Apache
System : Linux vps103298.mylogin.co 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64
User : calvet ( 273824)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /usr/share/doc/perl-Net-SSLGlue/examples/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/doc/perl-Net-SSLGlue/examples/ftps-starttls.pl
use strict;
use warnings;
use Net::SSLGlue::FTP;

my $ftp = Net::FTP->new( 'ftp.example.com', 
    Passive => 1,
    Debug => 1,
);
$ftp->starttls( SSL_ca_path => '/etc/ssl/certs' )
    or die "tls upgrade failed";
$ftp->login('foo','bar');
print $ftp->ls;

# change protection to clear
$ftp->prot('C');
$ftp->ls;

# stop TLS on control channel
$ftp->stoptls;
$ftp->ls;


Hry