/usr/share/doc/libnet-sslglue-perl/examples/ftps-starttls.pl is in libnet-sslglue-perl 1.055-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 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;
|