Skip to content

Commit

Permalink
Update libnet to CPAN version 3.04
Browse files Browse the repository at this point in the history
  [DELTA]

3.04 2014-11-29

    - SNI is now only used for SSL connections if it is supported by
      IO::Socket::SSL (i.e. OpenSSL version >= 1).  (The previous release
      switched to using SNI by default, which caused some CPAN Testers
      failures.)  [Steffen Ullrich, PR#10]
  • Loading branch information
bingos committed Nov 29, 2014
1 parent 2901a52 commit 6233097
Show file tree
Hide file tree
Showing 16 changed files with 25 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Porting/Maintainers.pl
Expand Up @@ -681,7 +681,7 @@ package Maintainers;
},

'libnet' => {
'DISTRIBUTION' => 'SHAY/libnet-3.03.tar.gz',
'DISTRIBUTION' => 'SHAY/libnet-3.04.tar.gz',
'FILES' => q[cpan/libnet],
'EXCLUDED' => [
qw( Configure
Expand Down
2 changes: 1 addition & 1 deletion cpan/libnet/Makefile.PL
Expand Up @@ -64,7 +64,7 @@ MAIN: {
ABSTRACT => 'Collection of network protocol modules',
AUTHOR => 'Graham Barr <gbarr@pobox.com>, Steve Hay <shay@cpan.org>',
LICENSE => 'perl_5',
VERSION => '3.03',
VERSION => '3.04',

META_MERGE => {
'meta-spec' => {
Expand Down
2 changes: 1 addition & 1 deletion cpan/libnet/lib/Net/Cmd.pm
Expand Up @@ -41,7 +41,7 @@ BEGIN {
}
}

our $VERSION = "3.03";
our $VERSION = "3.04";
our @ISA = qw(Exporter);
our @EXPORT = qw(CMD_INFO CMD_OK CMD_MORE CMD_REJECT CMD_ERROR CMD_PENDING);

Expand Down
2 changes: 1 addition & 1 deletion cpan/libnet/lib/Net/Config.pm
Expand Up @@ -19,7 +19,7 @@ use Socket qw(inet_aton inet_ntoa);

our @EXPORT = qw(%NetConfig);
our @ISA = qw(Net::LocalCfg Exporter);
our $VERSION = "3.03";
our $VERSION = "3.04";

our($CONFIGURE, $LIBNET_CFG);

Expand Down
2 changes: 1 addition & 1 deletion cpan/libnet/lib/Net/Domain.pm
Expand Up @@ -20,7 +20,7 @@ use Net::Config;

our @ISA = qw(Exporter);
our @EXPORT_OK = qw(hostname hostdomain hostfqdn domainname);
our $VERSION = "3.03";
our $VERSION = "3.04";

my ($host, $domain, $fqdn) = (undef, undef, undef);

Expand Down
10 changes: 7 additions & 3 deletions cpan/libnet/lib/Net/FTP.pm
Expand Up @@ -24,7 +24,7 @@ use Net::Config;
use Socket;
use Time::Local;

our $VERSION = '3.03';
our $VERSION = '3.04';

our $IOCLASS;
BEGIN {
Expand Down Expand Up @@ -103,7 +103,8 @@ sub new {
%tlsargs = (
SSL_verifycn_scheme => 'ftp',
SSL_verifycn_name => $hostname,
SSL_hostname => $hostname,
# use SNI if supported by IO::Socket::SSL
$pkg->can_client_sni ? (SSL_hostname => $hostname):(),
# reuse SSL session of control connection in data connections
SSL_session_cache => Net::FTP::_SSL_SingleSessionCache->new,
);
Expand Down Expand Up @@ -1039,7 +1040,10 @@ sub _dataconn {
$ftp->is_SSL ? (
SSL_reuse_ctx => $ftp,
SSL_verifycn_name => ${*$ftp}{net_ftp_tlsargs}{SSL_verifycn_name},
SSL_hostname => ${*$ftp}{net_ftp_tlsargs}{SSL_hostname},
# This will cause the use of SNI if supported by IO::Socket::SSL.
$ftp->can_client_sni ? (
SSL_hostname => ${*$ftp}{net_ftp_tlsargs}{SSL_hostname}
):(),
) :( %{${*$ftp}{net_ftp_tlsargs}} ),
):(),
) or return;
Expand Down
2 changes: 1 addition & 1 deletion cpan/libnet/lib/Net/FTP/A.pm
Expand Up @@ -13,7 +13,7 @@ use Carp;
use Net::FTP::dataconn;

our @ISA = qw(Net::FTP::dataconn);
our $VERSION = "3.03";
our $VERSION = "3.04";

our $buf;

Expand Down
2 changes: 1 addition & 1 deletion cpan/libnet/lib/Net/FTP/E.pm
Expand Up @@ -8,6 +8,6 @@ use warnings;
use Net::FTP::I;

our @ISA = qw(Net::FTP::I);
our $VERSION = "3.03";
our $VERSION = "3.04";

1;
2 changes: 1 addition & 1 deletion cpan/libnet/lib/Net/FTP/I.pm
Expand Up @@ -13,7 +13,7 @@ use Carp;
use Net::FTP::dataconn;

our @ISA = qw(Net::FTP::dataconn);
our $VERSION = "3.03";
our $VERSION = "3.04";

our $buf;

Expand Down
2 changes: 1 addition & 1 deletion cpan/libnet/lib/Net/FTP/L.pm
Expand Up @@ -8,6 +8,6 @@ use warnings;
use Net::FTP::I;

our @ISA = qw(Net::FTP::I);
our $VERSION = "3.03";
our $VERSION = "3.04";

1;
2 changes: 1 addition & 1 deletion cpan/libnet/lib/Net/FTP/dataconn.pm
Expand Up @@ -13,7 +13,7 @@ use Carp;
use Errno;
use Net::Cmd;

our $VERSION = '3.03';
our $VERSION = '3.04';

$Net::FTP::IOCLASS or die "please load Net::FTP before Net::FTP::dataconn";
our @ISA = $Net::FTP::IOCLASS;
Expand Down
4 changes: 2 additions & 2 deletions cpan/libnet/lib/Net/NNTP.pm
Expand Up @@ -20,7 +20,7 @@ use Net::Cmd;
use Net::Config;
use Time::Local;

our $VERSION = "3.03";
our $VERSION = "3.04";

# Code for detecting if we can use SSL
my $ssl_class = eval {
Expand Down Expand Up @@ -758,7 +758,7 @@ sub DESTROY {
( $arg{SSL_verifycn_name} ||= $nntp->host )
=~s{(?<!:):[\w()]+$}{}; # strip port
$arg{SSL_hostname} = $arg{SSL_verifycn_name}
if ! defined $arg{SSL_hostname};
if ! defined $arg{SSL_hostname} && $class->can_client_sni;
my $ok = $class->SUPER::start_SSL($nntp,
SSL_verifycn_scheme => 'nntp',
%arg
Expand Down
2 changes: 1 addition & 1 deletion cpan/libnet/lib/Net/Netrc.pm
Expand Up @@ -17,7 +17,7 @@ use warnings;
use Carp;
use FileHandle;

our $VERSION = "3.03";
our $VERSION = "3.04";

our $TESTING;

Expand Down
4 changes: 2 additions & 2 deletions cpan/libnet/lib/Net/POP3.pm
Expand Up @@ -19,7 +19,7 @@ use IO::Socket;
use Net::Cmd;
use Net::Config;

our $VERSION = "3.03";
our $VERSION = "3.04";

# Code for detecting if we can use SSL
my $ssl_class = eval {
Expand Down Expand Up @@ -579,7 +579,7 @@ sub banner {
( $arg{SSL_verifycn_name} ||= $pop3->host )
=~s{(?<!:):[\w()]+$}{}; # strip port
$arg{SSL_hostname} = $arg{SSL_verifycn_name}
if ! defined $arg{SSL_hostname};
if ! defined $arg{SSL_hostname} && $class->can_client_sni;
$arg{SSL_verifycn_scheme} ||= 'pop3';
my $ok = $class->SUPER::start_SSL($pop3,%arg);
$@ = $ssl_class->errstr if !$ok;
Expand Down
4 changes: 2 additions & 2 deletions cpan/libnet/lib/Net/SMTP.pm
Expand Up @@ -20,7 +20,7 @@ use Net::Cmd;
use Net::Config;
use Socket;

our $VERSION = "3.03";
our $VERSION = "3.04";

# Code for detecting if we can use SSL
my $ssl_class = eval {
Expand Down Expand Up @@ -616,7 +616,7 @@ sub _STARTTLS { shift->command("STARTTLS")->response() == CMD_OK }
( $arg{SSL_verifycn_name} ||= $smtp->host )
=~s{(?<!:):[\w()]+$}{}; # strip port
$arg{SSL_hostname} = $arg{SSL_verifycn_name}
if ! defined $arg{SSL_hostname};
if ! defined $arg{SSL_hostname} && $class->can_client_sni;
$arg{SSL_verifycn_scheme} ||= 'smtp';
my $ok = $class->SUPER::start_SSL($smtp,%arg);
$@ = $ssl_class->errstr if !$ok;
Expand Down
2 changes: 1 addition & 1 deletion cpan/libnet/lib/Net/Time.pm
Expand Up @@ -23,7 +23,7 @@ use Net::Config;
our @ISA = qw(Exporter);
our @EXPORT_OK = qw(inet_time inet_daytime);

our $VERSION = "3.03";
our $VERSION = "3.04";

our $TIMEOUT = 120;

Expand Down

0 comments on commit 6233097

Please sign in to comment.