[liblwp-protocol-https-perl] 01/10: New upstream version 6.07

dod at debian.org dod at debian.org
Fri Jul 14 17:26:01 UTC 2017


This is an automated email from the git hooks/post-receive script.

dod pushed a commit to branch master
in repository liblwp-protocol-https-perl.

commit fc5ac68569ba22e4d366d316ad4cb2bab7545298
Author: Dominique Dumont <dod at debian.org>
Date:   Thu Jun 29 13:25:02 2017 +0200

    New upstream version 6.07
---
 Changes                   | 100 +++++++++++++++++++---------------------------
 MANIFEST                  |   3 +-
 META.json                 |  56 ++++++++++++++++++++++++++
 META.yml                  |  52 ++++++++++++------------
 Makefile.PL               |  98 ++++++++++++++++++++++++++++++++-------------
 lib/LWP/Protocol/https.pm |  27 ++++++++-----
 t/apache.t                |   5 +--
 7 files changed, 216 insertions(+), 125 deletions(-)

diff --git a/Changes b/Changes
index 2ea82fd..18e8ad7 100644
--- a/Changes
+++ b/Changes
@@ -1,60 +1,40 @@
-_______________________________________________________________________________
-2014-04-18 LWP-Protocol-https 6.06
-
-Mike Schilli (3):
-      Merge pull request #12 from drieux/subjectAltName
-      Merge pull request #9 from chorny/master
-      Updated libwww requirement to 6.06 to fix failing t/proxy.t test cases.
-
-Gisle Aas (2):
-      Getopt::Long isn't actually used
-      Merge pull request #7 from noxxi/master
-
-Alexandr Ciornii (1):
-      better diagnostics in case of failures in apache.t
-
-Karen Etheridge (1):
-      Merge pull request #8 from cpansprout/patch-1
-
-Steffen Ullrich (1):
-      correct behavior for https_proxy, this goes together with change to 
-      libwww-perl cb80c2ddb7, new method _upgrade_sock in LWP::Protocol::https
-
-cpansprout (1):
-      Typo fix: envirionment =~ s/io/o/
-
-drieux (1):
-      support for subjectAltName
-
-
-_______________________________________________________________________________
-2013-04-29 LWP-Protocol-https 6.04
-
-Fix IO::Socket::SSL warnings when not verifying hostname.
-
-Doc spelling fix.
-
-
-
-_______________________________________________________________________________
-2012-02-18 LWP-Protocol-https 6.03
-
-Skip test if offline [RT#74163]
-
-Typo fixes
-
-Restore perl-5.8.1 compatibility.
-
-
-
-_______________________________________________________________________________
-2011-03-27 LWP-Protocol-https 6.02
-
-Initial release of LWP-Protocol-https as a separate distribution. There are no code
-changes besides setting the version number since libwww-perl-6.01.
-
-The LWP::Protocol::https module used to be bundled with the libwww-perl
-distribution, but it was unbundled in v6.02 in order to be able to declare its
-dependencies properly for the CPAN tool chain.  Applications that need https
-support can just declare their dependency on LWP::Protocol::https and will no
-longer need to know what underlying modules to install.
+Release history for LWP-Protocol-https
+
+6.07      2017-02-19
+    - Cleaned up the Changes log
+    - Explicitly add hostname for SNI to start_SSL (GH PR#17)
+    - Fix the license name
+    - Update some documentation on SSL args
+    - Fix bug when checking for Mozilla::CA (GH PR#29)
+
+6.06      2014-04-18
+    - Merge pull request #12 from drieux/subjectAltName
+    - Merge pull request #9 from chorny/master
+    - Updated libwww requirement to 6.06 to fix failing t/proxy.t test cases.
+    - Getopt::Long isn't actually used
+    - Merge pull request #7 from noxxi/master
+    - better diagnostics in case of failures in apache.t
+    - Merge pull request #8 from cpansprout/patch-1
+    - correct behavior for https_proxy, this goes together with change to
+    - libwww-perl cb80c2ddb7, new method _upgrade_sock in LWP::Protocol::https
+    - Typo fix: envirionment =~ s/io/o/
+    - support for subjectAltName
+
+6.04      2013-04-29
+    - Fix IO::Socket::SSL warnings when not verifying hostname.
+    - Doc spelling fix.
+
+6.03      2012-02-18
+    - Skip test if offline [RT#74163]
+    - Typo fixes
+    - Restore perl-5.8.1 compatibility.
+
+6.02      2011-03-27
+    - Initial release of LWP-Protocol-https as a separate distribution. There
+      are no code changes besides setting the version number since
+      libwww-perl-6.01.
+    - The LWP::Protocol::https module used to be bundled with the libwww-perl
+      distribution, but it was unbundled in v6.02 in order to be able to declare
+      its dependencies properly for the CPAN tool chain.  Applications that need
+      https support can just declare their dependency on LWP::Protocol::https
+      and will no longer need to know what underlying modules to install.
diff --git a/MANIFEST b/MANIFEST
index 8a698ce..9941b2a 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -5,4 +5,5 @@ README
 lib/LWP/Protocol/https.pm	Access with HTTP/1.1 protocol over SSL
 t/apache.t
 t/https_proxy.t
-META.yml                                 Module meta-data (added by MakeMaker)
+META.yml                                 Module YAML meta-data (added by MakeMaker)
+META.json                                Module JSON meta-data (added by MakeMaker)
diff --git a/META.json b/META.json
new file mode 100644
index 0000000..21fff4f
--- /dev/null
+++ b/META.json
@@ -0,0 +1,56 @@
+{
+   "abstract" : "Provide https support for LWP::UserAgent",
+   "author" : [
+      "Gisle Aas <gisle at activestate.com>"
+   ],
+   "dynamic_config" : 1,
+   "generated_by" : "ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150005",
+   "license" : [
+      "perl_5"
+   ],
+   "meta-spec" : {
+      "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+      "version" : "2"
+   },
+   "name" : "LWP-Protocol-https",
+   "no_index" : {
+      "directory" : [
+         "t",
+         "inc"
+      ]
+   },
+   "prereqs" : {
+      "build" : {
+         "requires" : {}
+      },
+      "configure" : {
+         "requires" : {
+            "ExtUtils::MakeMaker" : "0"
+         }
+      },
+      "runtime" : {
+         "requires" : {
+            "IO::Socket::SSL" : "1.54",
+            "LWP::UserAgent" : "6.06",
+            "Mozilla::CA" : "20110101",
+            "Net::HTTPS" : "6",
+            "perl" : "5.008001"
+         }
+      },
+      "test" : {
+         "requires" : {
+            "Test::More" : "0",
+            "Test::RequiresInternet" : "0"
+         }
+      }
+   },
+   "release_status" : "stable",
+   "resources" : {
+      "repository" : {
+         "url" : "http://github.com/libwww-perl/lwp-protocol-https"
+      },
+      "x_MailingList" : "mailto:libwww at perl.org"
+   },
+   "version" : "6.07",
+   "x_serialization_backend" : "JSON::PP version 2.27300"
+}
diff --git a/META.yml b/META.yml
index eb09c86..a994351 100644
--- a/META.yml
+++ b/META.yml
@@ -1,29 +1,31 @@
---- #YAML:1.0
-name:               LWP-Protocol-https
-version:            6.06
-abstract:           Provide https support for LWP::UserAgent
+---
+abstract: 'Provide https support for LWP::UserAgent'
 author:
-    - Gisle Aas <gisle at activestate.com>
-license:            perl
-distribution_type:  module
-configure_requires:
-    ExtUtils::MakeMaker:  0
+  - 'Gisle Aas <gisle at activestate.com>'
 build_requires:
-    ExtUtils::MakeMaker:  0
+  Test::More: '0'
+  Test::RequiresInternet: '0'
+configure_requires:
+  ExtUtils::MakeMaker: '0'
+dynamic_config: 1
+generated_by: 'ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150005'
+license: perl
+meta-spec:
+  url: http://module-build.sourceforge.net/META-spec-v1.4.html
+  version: '1.4'
+name: LWP-Protocol-https
+no_index:
+  directory:
+    - t
+    - inc
 requires:
-    IO::Socket::SSL:  1.54
-    LWP::UserAgent:   6.06
-    Mozilla::CA:      20110101
-    Net::HTTPS:       6
-    perl:             5.008001
+  IO::Socket::SSL: '1.54'
+  LWP::UserAgent: '6.06'
+  Mozilla::CA: '20110101'
+  Net::HTTPS: '6'
+  perl: '5.008001'
 resources:
-    MailingList:  mailto:libwww at perl.org
-    repository:   http://github.com/libwww-perl/lwp-protocol-https
-no_index:
-    directory:
-        - t
-        - inc
-generated_by:       ExtUtils::MakeMaker version 6.56
-meta-spec:
-    url:      http://module-build.sourceforge.net/META-spec-v1.4.html
-    version:  1.4
+  MailingList: mailto:libwww at perl.org
+  repository: http://github.com/libwww-perl/lwp-protocol-https
+version: '6.07'
+x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff --git a/Makefile.PL b/Makefile.PL
index e0de828..fc8ef4a 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -4,19 +4,41 @@ require 5.008001;
 use strict;
 use ExtUtils::MakeMaker;
 
-WriteMakefile(
+my $developer = -f '.gitignore';
+ExtUtils::MakeMaker->VERSION(6.98) if $developer;
+
+my %WriteMakefileArgs = (
     NAME => 'LWP::Protocol::https',
     VERSION_FROM => 'lib/LWP/Protocol/https.pm',
     ABSTRACT_FROM => 'lib/LWP/Protocol/https.pm',
     AUTHOR => 'Gisle Aas <gisle at activestate.com>',
-    LICENSE => "perl",
-    MIN_PERL_VERSION => 5.008001,
-    PREREQ_PM => {
-	'LWP::UserAgent' => '6.06',
-	'Net::HTTPS' => 6,
-	'IO::Socket::SSL' => "1.54",
-	'Mozilla::CA' => "20110101",
+    LICENSE => 'perl_5',
+
+    META_ADD => {
+        prereqs => {
+            configure => {
+                requires => {
+                    'ExtUtils::MakeMaker' => '0',
+                },
+            },
+            runtime => {
+                requires => {
+                    'LWP::UserAgent' => '6.06',
+                    'Net::HTTPS' => 6,
+                    'IO::Socket::SSL' => "1.54",
+                    'Mozilla::CA' => "20110101",
+                    'perl' => '5.008001',
+                },
+            },
+            test => {
+                requires => {
+                    'Test::More' => '0',
+                    'Test::RequiresInternet' => 0,
+                },
+            },
+        },
     },
+
     META_MERGE => {
 	resources => {
             repository => 'http://github.com/libwww-perl/lwp-protocol-https',
@@ -25,24 +47,46 @@ WriteMakefile(
     },
 );
 
-BEGIN {
-    # compatibility with older versions of MakeMaker
-    my $developer = -f ".gitignore";
-    my %mm_req = (
-        LICENCE => 6.31,
-        META_MERGE => 6.45,
-        META_ADD => 6.45,
-        MIN_PERL_VERSION => 6.48,
-    );
-    undef(*WriteMakefile);
-    *WriteMakefile = sub {
-        my %arg = @_;
-        for (keys %mm_req) {
-            unless (eval { ExtUtils::MakeMaker->VERSION($mm_req{$_}) }) {
-                warn "$_ $@" if $developer;
-                delete $arg{$_};
-            }
-        }
-        ExtUtils::MakeMaker::WriteMakefile(%arg);
+my $eumm_version  = eval $ExtUtils::MakeMaker::VERSION;
+
+for (qw(configure build test runtime)) {
+    my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES';
+    next unless exists $WriteMakefileArgs{META_ADD}{prereqs}{$_}
+             or exists $WriteMakefileArgs{$key};
+    my $r = $WriteMakefileArgs{$key} = {
+        %{$WriteMakefileArgs{META_ADD}{prereqs}{$_}{requires} || {}},
+        %{delete $WriteMakefileArgs{$key} || {}},
     };
+    defined $r->{$_} or delete $r->{$_} for keys %$r;
 }
+
+# dynamic prereqs get added here.
+
+$WriteMakefileArgs{MIN_PERL_VERSION} = delete $WriteMakefileArgs{PREREQ_PM}{perl} || 0;
+
+die 'attention developer: you need to do a sane meta merge here!'
+    if keys %{$WriteMakefileArgs{BUILD_REQUIRES}};
+
+$WriteMakefileArgs{BUILD_REQUIRES} = {
+    %{$WriteMakefileArgs{BUILD_REQUIRES} || {}},
+    %{delete $WriteMakefileArgs{TEST_REQUIRES}}
+} if $eumm_version < 6.63_03;
+
+$WriteMakefileArgs{PREREQ_PM} = {
+    %{$WriteMakefileArgs{PREREQ_PM}},
+    %{delete $WriteMakefileArgs{BUILD_REQUIRES}}
+} if $eumm_version < 6.55_01;
+
+delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
+    if $eumm_version < 6.51_03;
+
+delete $WriteMakefileArgs{MIN_PERL_VERSION}
+    if $eumm_version < 6.48;
+
+delete @WriteMakefileArgs{qw(META_ADD META_MERGE)}
+    if $eumm_version < 6.46;
+
+delete $WriteMakefileArgs{LICENSE}
+    if $eumm_version < 6.31;
+
+WriteMakefile(%WriteMakefileArgs);
diff --git a/lib/LWP/Protocol/https.pm b/lib/LWP/Protocol/https.pm
index a707917..ed4d832 100644
--- a/lib/LWP/Protocol/https.pm
+++ b/lib/LWP/Protocol/https.pm
@@ -1,7 +1,7 @@
 package LWP::Protocol::https;
 
 use strict;
-our $VERSION = "6.06";
+our $VERSION = "6.07";
 
 require LWP::Protocol::http;
 our @ISA = qw(LWP::Protocol::http);
@@ -29,7 +29,7 @@ sub _extra_sock_opts
 		require Mozilla::CA;
 	    };
 	    if ($@) {
-		if ($@ =! /^Can't locate Mozilla\/CA\.pm/) {
+		if ($@ =~ /^Can't locate Mozilla\/CA\.pm/) {
 		    $@ = <<'EOT';
 Can't verify SSL peers without knowing which Certificate Authorities to trust
 
@@ -51,11 +51,11 @@ EOT
 }
 
 #------------------------------------------------------------
-# _cn_match($common_name, $san_name) 
+# _cn_match($common_name, $san_name)
 #  common_name: an IA5String
 #  san_name: subjectAltName
 # initially we were only concerned with the dNSName
-# and the 'left-most' only wildcard as noted in 
+# and the 'left-most' only wildcard as noted in
 #   https://tools.ietf.org/html/rfc6125#section-6.4.3
 # this method does not match any wildcarding in the
 # domain name as listed in section-6.4.3.3
@@ -66,7 +66,7 @@ sub _cn_match {
     # /CN has a '*.' prefix
     # MUST be an FQDN -- fishing?
     return 0 if( $common_name =~ /^\*\./ );
-    
+
     my $re = q{}; # empty string
 
      # turn a leading "*." into a regex
@@ -93,13 +93,13 @@ sub _cn_match {
 sub _in_san
 {
     my($me, $cn, $cert) = @_;
-	
+
 	  # we can return early if there are no SAN options.
 	my @sans = $cert->peer_certificate('subjectAltNames');
-	return unless scalar @sans; 
-	
+	return unless scalar @sans;
+
 	(my $common_name = $cn) =~ s/.*=//; # strip off the prefix.
-   
+
       # get the ( type-id, value ) pairwise
       # currently only the basic CN to san_name check
     while( my ( $type_id, $value ) = splice( @sans, 0, 2 ) ) {
@@ -153,6 +153,7 @@ if ( $Net::HTTPS::SSL_SOCKET_CLASS->can('start_SSL')) {
 	my ($self,$sock,$url) = @_;
 	$sock = LWP::Protocol::https::Socket->start_SSL( $sock,
 	    SSL_verifycn_name => $url->host,
+	    SSL_hostname => $url->host,
 	    $self->_extra_sock_opts,
 	);
 	$@ = LWP::Protocol::https::Socket->errstr if ! $sock;
@@ -180,6 +181,14 @@ LWP::Protocol::https - Provide https support for LWP::UserAgent
   $ua = LWP::UserAgent->new(ssl_opts => { verify_hostname => 1 });
   $res = $ua->get("https://www.example.com");
 
+  # specify a CA path
+  $ua = LWP::UserAgent->new(
+      ssl_opts => {
+          SSL_ca_path     => '/etc/ssl/certs',
+          verify_hostname => 1,
+      }
+  );
+
 =head1 DESCRIPTION
 
 The LWP::Protocol::https module provides support for using https schemed
diff --git a/t/apache.t b/t/apache.t
index 13da2c6..9cf0538 100644
--- a/t/apache.t
+++ b/t/apache.t
@@ -2,11 +2,11 @@
 
 use strict;
 use Test::More;
+use Test::RequiresInternet 'www.apache.org' => 443;
 
 use LWP::UserAgent;
 
-my $ua = LWP::UserAgent->new();
-plan skip_all => "Not online" unless $ua->is_online;
+my $ua = LWP::UserAgent->new( ssl_opts => {verify_hostname => 0} );
 
 plan tests => 5;
 
@@ -20,7 +20,6 @@ like($res->content, qr/Apache Software Foundation/);
 # test for RT #81948
 my $warn = '';
 $SIG{__WARN__} = sub { $warn = shift };
-$ua = LWP::UserAgent->new( ssl_opts => {verify_hostname => 0} );
 $res = $ua->simple_request(HTTP::Request->new(GET => "https://www.apache.org"));
 ok($res->is_success);
 is($warn, '', "no warning seen");

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/liblwp-protocol-https-perl.git



More information about the Pkg-perl-cvs-commits mailing list