LWP-Protocol-https-6.14/0000775000175000017500000000000014573454623013510 5ustar olafolafLWP-Protocol-https-6.14/perlcriticrc0000644000175000017500000000440514573454623016121 0ustar olafolafseverity = 3 verbose = 11 theme = core + pbp + bugs + maintenance + cosmetic + complexity + security + tests + moose exclude = Subroutines::ProhibitCallsToUndeclaredSubs [BuiltinFunctions::ProhibitStringySplit] severity = 3 [CodeLayout::RequireTrailingCommas] severity = 3 [ControlStructures::ProhibitCStyleForLoops] severity = 3 [InputOutput::RequireCheckedSyscalls] functions = :builtins exclude_functions = sleep severity = 3 [Moose::RequireCleanNamespace] modules = Moose Moose::Role MooseX::Role::Parameterized Moose::Util::TypeConstraints cleaners = namespace::autoclean [NamingConventions::Capitalization] package_exemptions = [A-Z]\w+|minFraud file_lexical_variables = [A-Z]\w+|[^A-Z]+ global_variables = :starts_with_upper scoped_lexical_variables = [A-Z]\w+|[^A-Z]+ severity = 3 # Given our code base, leaving this at 5 would be a huge pain [Subroutines::ProhibitManyArgs] max_arguments = 10 [RegularExpressions::ProhibitComplexRegexes] max_characters = 200 [RegularExpressions::ProhibitUnusualDelimiters] severity = 3 [Subroutines::ProhibitUnusedPrivateSubroutines] private_name_regex = _(?!build)\w+ skip_when_using = Moo::Role Moose::Role MooseX::Role::Parameterized Role::Tiny Test::Class::Moose::Role [TestingAndDebugging::ProhibitNoWarnings] allow = redefine [ValuesAndExpressions::ProhibitEmptyQuotes] severity = 3 [ValuesAndExpressions::ProhibitInterpolationOfLiterals] severity = 3 [ValuesAndExpressions::RequireUpperCaseHeredocTerminator] severity = 3 [Variables::ProhibitPackageVars] add_packages = Test::Builder [TestingAndDebugging::RequireUseStrict] [TestingAndDebugging::RequireUseWarnings] [-ControlStructures::ProhibitCascadingIfElse] [-ErrorHandling::RequireCarping] [-InputOutput::RequireBriefOpen] [-ValuesAndExpressions::ProhibitConstantPragma] # No need for /xsm everywhere [-RegularExpressions::RequireDotMatchAnything] [-RegularExpressions::RequireExtendedFormatting] [-RegularExpressions::RequireLineBoundaryMatching] [-Subroutines::ProhibitExplicitReturnUndef] # http://stackoverflow.com/questions/2275317/why-does-perlcritic-dislike-using-shift-to-populate-subroutine-variables [-Subroutines::RequireArgUnpacking] [-Subroutines::RequireFinalReturn] # "use v5.14" is more readable than "use 5.014" [-ValuesAndExpressions::ProhibitVersionStrings] LWP-Protocol-https-6.14/tidyall.ini0000644000175000017500000000110614573454623015647 0ustar olafolaf[PerlTidy] select = **/*.{pl,pm,t,psgi} ignore = t/00-* ignore = t/author-* ignore = t/release-* ignore = blib/**/* ignore = .build/**/* ignore = LWP-Protocol-https-*/**/* argv = --profile=$ROOT/perltidyrc ;[PerlCritic] ;select = **/*.{pl,pm,t,psgi} ;ignore = t/00-* ;ignore = t/author-* ;ignore = t/release-* ;ignore = blib/**/* ;ignore = .build/**/* ;ignore = LWP-Protocol-https-*/**/* ;argv = --profile $ROOT/perlcriticrc --program-extensions .pl --program-extensions .t --program-extensions .psgi [SortLines::Naturally] select = .gitignore [UniqueLines] select = .gitignore LWP-Protocol-https-6.14/t/0000775000175000017500000000000014573454623013753 5ustar olafolafLWP-Protocol-https-6.14/t/diag.t0000644000175000017500000000271114573454623015043 0ustar olafolaf#!perl use strict; use warnings; use IO::Select (); use IO::Socket::INET (); use IO::Socket::SSL (); use IO::Socket::SSL::Utils (); use Socket (); use Test::More import => [qw( diag done_testing pass subtest )]; use Test::Needs; use Try::Tiny qw( try ); subtest 'openssl' => sub { test_needs 'Capture::Tiny'; test_needs 'File::Which'; my $openssl = File::Which::which('openssl'); diag "path to openssl: $openssl"; ## no critic (InputOutput::RequireCheckedSyscalls) my ( $stdout, $stderr ) = Capture::Tiny::capture( sub { system( $openssl, 'version' ) } ); diag "stdout: $stdout" if $stdout; diag "stderr: $stderr" if $stderr; pass('openssl version'); }; subtest 'net_ssleay' => sub { test_needs 'Net::SSLeay'; try { diag( sprintf 'Net::SSLeay::OPENSSL_VERSION_NUMBER() 0x%08x', Net::SSLeay::OPENSSL_VERSION_NUMBER() ); }; try { diag( sprintf 'Net::SSLeay::LIBRESSL_VERSION_NUMBER() 0x%08x', Net::SSLeay::LIBRESSL_VERSION_NUMBER() ); }; pass('Net::SSLeay'); }; subtest 'modules' => sub { diag "IO::Select $IO::Select::VERSION"; diag "IO::Socket::INET $IO::Socket::INET::VERSION"; diag "IO::Socket::SSL $IO::Socket::SSL::VERSION"; diag "IO::Socket::SSL::Utils $IO::Socket::SSL::Utils::VERSION"; diag "Socket $Socket::VERSION"; pass('modules'); }; done_testing(); LWP-Protocol-https-6.14/t/https_proxy.t0000644000175000017500000002400114573454623016536 0ustar olafolaf#!/usr/bin/perl # to run test with Net::SSL as backend set environment # PERL_NET_HTTPS_SSL_SOCKET_CLASS=Net::SSL use strict; use warnings; use Test::More; use File::Temp 'tempfile'; use IO::Socket::INET; use IO::Select; use Socket 'MSG_PEEK'; use LWP::UserAgent; use LWP::Protocol::https; plan skip_all => "fork not implemented on this platform" if grep { $^O =~m{$_} } qw( MacOS VOS vmesa riscos amigaos ); eval { require IO::Socket::SSL } and $IO::Socket::SSL::VERSION >= 1.953 and eval { require IO::Socket::SSL::Utils } or plan skip_all => "no recent version of IO::Socket::SSL::Utils"; IO::Socket::SSL::Utils->import; # create CA ------------------------------------------------------------- my ($cacert,$cakey) = CERT_create( CA => 1 ); my $cafile = do { my ($fh,$fname) = tempfile( CLEANUP => 1 ); print $fh PEM_cert2string($cacert); $fname }; # create two web servers ------------------------------------------------ my (@server,@saddr); for my $i (0,1) { my $server = IO::Socket::INET->new( LocalAddr => '127.0.0.1', LocalPort => 0, # let system pick port Listen => 10 ) or die "failed to create INET listener"; my $saddr = $server->sockhost.':'.$server->sockport; $server[$i] = $server; $saddr[$i] = $saddr; } my @childs; END { kill 9,@childs if @childs }; defined( my $pid = fork()) or die "fork failed: $!"; # child process runs _server and exits if ( ! $pid ) { @childs = (); exit( _server()); } # parent continues with closed server sockets push @childs,$pid; @server = (); # check which SSL implementation Net::HTTPS uses # Net::SSL behaves different than the default IO::Socket::SSL my $netssl = $Net::HTTPS::SSL_SOCKET_CLASS eq 'Net::SSL'; # do some tests ---------------------------------------------------------- my %ua; $ua{noproxy} = LWP::UserAgent->new( keep_alive => 10, # size of connection cache # server does not know the expected name and returns generic certificate ssl_opts => { verify_hostname => 0, SSL_ca_file => $cafile, } ); $ua{proxy} = LWP::UserAgent->new( keep_alive => 10, # size of connection cache ssl_opts => { # Net::SSL cannot verify hostnames :( verify_hostname => $netssl ? 0: 1, SSL_ca_file => $cafile } ); $ua{proxy_nokeepalive} = LWP::UserAgent->new( keep_alive => 0, ssl_opts => { # Net::SSL cannot verify hostnames :( verify_hostname => $netssl ? 0: 1, SSL_ca_file => $cafile } ); # both lower- and upper-case versions are accepted by `env_proxy`, and # the user may have any of them set: override them all $ENV{HTTP_PROXY} = $ENV{HTTPS_PROXY} = $ENV{http_proxy} = $ENV{https_proxy} = "http://foo:bar\@$saddr[0]"; $ua{proxy}->env_proxy; $ua{proxy_nokeepalive}->env_proxy; if ($netssl) { # Net::SSL cannot get user/pass from proxy url $ENV{HTTPS_PROXY_USERNAME} = 'foo'; $ENV{HTTPS_PROXY_PASSWORD} = 'bar'; } my @tests = ( # the expected ids are connid.reqid[tunnel_auth][req_auth]@sslhost # because we run different sets of test depending on the SSL class # used by Net::HTTPS we replace connid with a letter and later # match it to a number # keep-alive for non-proxy http # requests to same target use same connection, even if intermixed [ 'noproxy', "http://$saddr[0]/foo",'A.1@nossl' ], [ 'noproxy', "http://$saddr[0]/bar",'A.2@nossl' ], # reuse conn#1 [ 'noproxy', "http://$saddr[1]/foo",'B.1@nossl' ], [ 'noproxy', "http://$saddr[1]/bar",'B.2@nossl' ], # reuse conn#2 [ 'noproxy', "http://$saddr[0]/tor",'A.3@nossl' ], # reuse conn#1 again [ 'noproxy', "http://$saddr[1]/tor",'B.3@nossl' ], # reuse conn#2 again # keep-alive for proxy http # use the same proxy connection for all even if the target host differs [ 'proxy', "http://foo/foo",'C.1.auth@nossl' ], [ 'proxy', "http://foo/bar",'C.2.auth@nossl' ], [ 'proxy', "http://bar/foo",'C.3.auth@nossl' ], [ 'proxy', "http://bar/bar",'C.4.auth@nossl' ], [ 'proxy', "http://foo/tor",'C.5.auth@nossl' ], [ 'proxy', "http://bar/tor",'C.6.auth@nossl' ], # keep-alive for non-proxy https # requests to same target use same connection, even if intermixed [ 'noproxy', "https://$saddr[0]/foo",'D.1@direct.ssl.access' ], [ 'noproxy', "https://$saddr[0]/bar",'D.2@direct.ssl.access' ], [ 'noproxy', "https://$saddr[1]/foo",'E.1@direct.ssl.access' ], [ 'noproxy', "https://$saddr[1]/bar",'E.2@direct.ssl.access' ], [ 'noproxy', "https://$saddr[0]/tor",'D.3@direct.ssl.access' ], [ 'noproxy', "https://$saddr[1]/tor",'E.3@direct.ssl.access' ], # keep-alive for proxy https ! $netssl ? ( # note that we reuse proxy conn#C in first request. Although the last id # from this conn was C.6 the new one is C.8, because request C.7 was the # socket upgrade via CONNECT request [ 'proxy', "https://foo/foo",'C.8.Tauth@foo' ], [ 'proxy', "https://foo/bar",'C.9.Tauth@foo' ], # if the target of the tunnel is different we need another connection # note that it starts with F.2, because F.1 is the CONNECT request which # established the tunnel [ 'proxy', "https://bar/foo",'F.2.Tauth@bar' ], [ 'proxy', "https://bar/bar",'F.3.Tauth@bar' ], [ 'proxy', "https://foo/tor",'C.10.Tauth@foo' ], [ 'proxy', "https://bar/tor",'F.4.Tauth@bar' ], ):( # Net::SSL will cannot reuse socket for CONNECT, but once inside tunnel # keep-alive is possible [ 'proxy', "https://foo/foo",'G.2.Tauth@foo' ], [ 'proxy', "https://foo/bar",'G.3.Tauth@foo' ], [ 'proxy', "https://bar/foo",'F.2.Tauth@bar' ], [ 'proxy', "https://bar/bar",'F.3.Tauth@bar' ], [ 'proxy', "https://foo/tor",'G.4.Tauth@foo' ], [ 'proxy', "https://bar/tor",'F.4.Tauth@bar' ], ), # non-keep alive for proxy https [ 'proxy_nokeepalive', "https://foo/foo",'H.2.Tauth@foo' ], [ 'proxy_nokeepalive', "https://foo/bar",'I.2.Tauth@foo' ], [ 'proxy_nokeepalive', "https://bar/foo",'J.2.Tauth@bar' ], [ 'proxy_nokeepalive', "https://bar/bar",'K.2.Tauth@bar' ], ); plan tests => 2*@tests; my (%conn2id,%id2conn); for my $test (@tests) { my ($uatype,$url,$expect_id) = @$test; my $ua = $ua{$uatype} or die "no such ua: $uatype"; # Net::SSL uses only the environment to decide about proxy, so we need the # proxy/non-proxy environment for each request if ( $netssl && $url =~m{^https://} ) { $ENV{https_proxy} = $uatype =~m{^proxy} ? "http://$saddr[0]":"" } my $response = $ua->get($url) or die "no response"; if ( $response->is_success and ( my $body = $response->content()) =~m{^ID: *(\d+)\.(\S+)}m ) { my $id = [ $1,$2 ]; my $xid = [ $expect_id =~m{(\w+)\.(\S+)} ]; if ( my $x = $id2conn{$id->[0]} ) { $id->[0] = $x; } elsif ( ! $conn2id{$xid->[0]} ) { $conn2id{ $xid->[0] } = $id->[0]; $id2conn{ $id->[0] } = $xid->[0]; $id->[0] = $xid->[0]; } is("$id->[0].$id->[1]",$expect_id,"$uatype $url -> $expect_id") or diag($response->as_string); # inside proxy tunnel and for non-proxy there should be only absolute # URI in request w/o scheme my $expect_rqurl = $url; $expect_rqurl =~s{^\w+://[^/]+}{} if $uatype eq 'noproxy' or $url =~m{^https://}; my ($rqurl) = $body =~m{^GET (\S+) HTTP/}m; is($rqurl,$expect_rqurl,"URL in request -> $expect_rqurl"); } else { die "unexpected response: ".$response->as_string } } # ------------------------------------------------------------------------ # simple web server with keep alive and SSL, which can also simulate proxy # ------------------------------------------------------------------------ sub _server { my $connid = 0; my %certs; # generated certificates ACCEPT: my ($server) = IO::Select->new(@server)->can_read(); my $cl = $server->accept or goto ACCEPT; # peek into socket to determine if this is direct SSL or not # minimal request is "GET / HTTP/1.1\n\n" my $buf = ''; while (length($buf)<15) { my $lbuf; if ( ! IO::Select->new($cl)->can_read(30) or ! defined recv($cl,$lbuf,20,MSG_PEEK)) { warn "not enough data for request ($buf): $!"; goto ACCEPT; } $buf .= $lbuf; } my $ssl_host = ''; if ( $buf !~m{\A[A-Z]{3,} } ) { # does not look like HTTP, assume direct SSL $ssl_host = "direct.ssl.access"; } $connid++; defined( my $pid = fork()) or die "failed to fork: $!"; if ( $pid ) { push @childs,$pid; goto ACCEPT; # wait for next connection } # child handles requests @server = (); my $reqid = 0; my $tunnel_auth = ''; SSL_UPGRADE: if ( $ssl_host ) { my ($cert,$key) = @{ $certs{$ssl_host} ||= do { note("creating cert for $ssl_host"); my ($c,$k) = CERT_create( subject => { commonName => $ssl_host }, issuer_cert => $cacert, issuer_key => $cakey, # just reuse cakey as key for certificate key => $cakey, ); [ $c,$k ]; }; }; IO::Socket::SSL->start_SSL( $cl, SSL_server => 1, SSL_cert => $cert, SSL_key => $key, ) or do { diag("SSL handshake failed: ".IO::Socket::SSL->errstr); exit(1); }; } REQUEST: # read header my $req = ''; while (<$cl>) { $_ eq "\r\n" and last; $req .= $_; } $reqid++; my $req_auth = $req =~m{^Proxy-Authorization:}mi ? '.auth':''; if ( $req =~m{\ACONNECT ([^\s:]+)} ) { if ( $ssl_host ) { diag("CONNECT inside SSL tunnel"); exit(1); } $ssl_host = $1; $tunnel_auth = $req_auth ? '.Tauth':''; #diag($req); # simulate proxy and establish SSL tunnel print $cl "HTTP/1.0 200 ok\r\n\r\n"; goto SSL_UPGRADE; } if ( $req =~m{^Content-length: *(\d+)}mi ) { read($cl,my $buf,$1) or die "eof while reading request body"; } my $keep_alive = $req =~m{^(?:Proxy-)?Connection: *(?:(keep-alive)|close)}mi ? $1 : $req =~m{\A.*HTTP/1\.1} ? 1 : 0; # just echo request back, including connid and reqid my $body = "ID: $connid.$reqid$tunnel_auth$req_auth\@" . ( $ssl_host || 'nossl' )."\n" . "---------\n$req"; print $cl "HTTP/1.1 200 ok\r\nContent-type: text/plain\r\n" . "Connection: ".( $keep_alive ? 'keep-alive':'close' )."\r\n" . "Content-length: ".length($body)."\r\n" . "\r\n" . $body; goto REQUEST if $keep_alive; exit(0); # done handling requests } LWP-Protocol-https-6.14/t/00-report-prereqs.dd0000644000175000017500000000717614573454623017504 0ustar olafolafdo { my $x = { 'configure' => { 'requires' => { 'ExtUtils::MakeMaker' => '0', 'perl' => '5.008001' }, 'suggests' => { 'JSON::PP' => '2.27300' } }, 'develop' => { 'recommends' => { 'Dist::Zilla::PluginBundle::Git::VersionManager' => '0.007' }, 'requires' => { 'Capture::Tiny' => '0.48', 'File::Spec' => '0', 'IO::Handle' => '0', 'IPC::Open3' => '0', 'Pod::Coverage::TrustPod' => '0', 'Test::CPAN::Changes' => '0.19', 'Test::CPAN::Meta' => '0', 'Test::CheckManifest' => '1.29', 'Test::CleanNamespaces' => '0.15', 'Test::EOL' => '0', 'Test::Kwalitee' => '1.22', 'Test::MinimumVersion' => '0', 'Test::Mojibake' => '0', 'Test::More' => '0.94', 'Test::Pod' => '1.41', 'Test::Pod::Coverage' => '1.08', 'Test::Pod::Spelling::CommonMistakes' => '1.000', 'Test::Portability::Files' => '0', 'Test::Spelling' => '0.12', 'Test::Version' => '1' } }, 'runtime' => { 'requires' => { 'IO::Socket::SSL' => '1.970', 'LWP::Protocol::http' => '0', 'LWP::UserAgent' => '6.06', 'Net::HTTPS' => '6', 'base' => '0', 'perl' => '5.008001', 'strict' => '0' } }, 'test' => { 'recommends' => { 'CPAN::Meta' => '2.120900' }, 'requires' => { 'ExtUtils::MakeMaker' => '0', 'File::Spec' => '0', 'File::Temp' => '0', 'IO::Select' => '0', 'IO::Socket::INET' => '0', 'IO::Socket::SSL' => '1.970', 'IO::Socket::SSL::Utils' => '0', 'LWP::UserAgent' => '6.06', 'Socket' => '0', 'Test::More' => '0.96', 'Test::Needs' => '0.002010', 'Test::RequiresInternet' => '0', 'perl' => '5.008001', 'warnings' => '0' } } }; $x; }LWP-Protocol-https-6.14/t/00-report-prereqs.t0000644000175000017500000001361614573454623017354 0ustar olafolaf#!perl use strict; use warnings; # This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.029 use Test::More tests => 1; use ExtUtils::MakeMaker; use File::Spec; # from $version::LAX my $lax_version_re = qr/(?: undef | (?: (?:[0-9]+) (?: \. | (?:\.[0-9]+) (?:_[0-9]+)? )? | (?:\.[0-9]+) (?:_[0-9]+)? ) | (?: v (?:[0-9]+) (?: (?:\.[0-9]+)+ (?:_[0-9]+)? )? | (?:[0-9]+)? (?:\.[0-9]+){2,} (?:_[0-9]+)? ) )/x; # hide optional CPAN::Meta modules from prereq scanner # and check if they are available my $cpan_meta = "CPAN::Meta"; my $cpan_meta_pre = "CPAN::Meta::Prereqs"; my $HAS_CPAN_META = eval "require $cpan_meta; $cpan_meta->VERSION('2.120900')" && eval "require $cpan_meta_pre"; ## no critic # Verify requirements? my $DO_VERIFY_PREREQS = 1; sub _max { my $max = shift; $max = ( $_ > $max ) ? $_ : $max for @_; return $max; } sub _merge_prereqs { my ($collector, $prereqs) = @_; # CPAN::Meta::Prereqs object if (ref $collector eq $cpan_meta_pre) { return $collector->with_merged_prereqs( CPAN::Meta::Prereqs->new( $prereqs ) ); } # Raw hashrefs for my $phase ( keys %$prereqs ) { for my $type ( keys %{ $prereqs->{$phase} } ) { for my $module ( keys %{ $prereqs->{$phase}{$type} } ) { $collector->{$phase}{$type}{$module} = $prereqs->{$phase}{$type}{$module}; } } } return $collector; } my @include = qw( Net::SSLeay ); my @exclude = qw( ); # Add static prereqs to the included modules list my $static_prereqs = do './t/00-report-prereqs.dd'; # Merge all prereqs (either with ::Prereqs or a hashref) my $full_prereqs = _merge_prereqs( ( $HAS_CPAN_META ? $cpan_meta_pre->new : {} ), $static_prereqs ); # Add dynamic prereqs to the included modules list (if we can) my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; my $cpan_meta_error; if ( $source && $HAS_CPAN_META && (my $meta = eval { CPAN::Meta->load_file($source) } ) ) { $full_prereqs = _merge_prereqs($full_prereqs, $meta->prereqs); } else { $cpan_meta_error = $@; # capture error from CPAN::Meta->load_file($source) $source = 'static metadata'; } my @full_reports; my @dep_errors; my $req_hash = $HAS_CPAN_META ? $full_prereqs->as_string_hash : $full_prereqs; # Add static includes into a fake section for my $mod (@include) { $req_hash->{other}{modules}{$mod} = 0; } for my $phase ( qw(configure build test runtime develop other) ) { next unless $req_hash->{$phase}; next if ($phase eq 'develop' and not $ENV{AUTHOR_TESTING}); for my $type ( qw(requires recommends suggests conflicts modules) ) { next unless $req_hash->{$phase}{$type}; my $title = ucfirst($phase).' '.ucfirst($type); my @reports = [qw/Module Want Have/]; for my $mod ( sort keys %{ $req_hash->{$phase}{$type} } ) { next if grep { $_ eq $mod } @exclude; my $want = $req_hash->{$phase}{$type}{$mod}; $want = "undef" unless defined $want; $want = "any" if !$want && $want == 0; if ($mod eq 'perl') { push @reports, ['perl', $want, $]]; next; } my $req_string = $want eq 'any' ? 'any version required' : "version '$want' required"; my $file = $mod; $file =~ s{::}{/}g; $file .= ".pm"; my ($prefix) = grep { -e File::Spec->catfile($_, $file) } @INC; if ($prefix) { my $have = MM->parse_version( File::Spec->catfile($prefix, $file) ); $have = "undef" unless defined $have; push @reports, [$mod, $want, $have]; if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META && $type eq 'requires' ) { if ( $have !~ /\A$lax_version_re\z/ ) { push @dep_errors, "$mod version '$have' cannot be parsed ($req_string)"; } elsif ( ! $full_prereqs->requirements_for( $phase, $type )->accepts_module( $mod => $have ) ) { push @dep_errors, "$mod version '$have' is not in required range '$want'"; } } } else { push @reports, [$mod, $want, "missing"]; if ( $DO_VERIFY_PREREQS && $type eq 'requires' ) { push @dep_errors, "$mod is not installed ($req_string)"; } } } if ( @reports ) { push @full_reports, "=== $title ===\n\n"; my $ml = _max( map { length $_->[0] } @reports ); my $wl = _max( map { length $_->[1] } @reports ); my $hl = _max( map { length $_->[2] } @reports ); if ($type eq 'modules') { splice @reports, 1, 0, ["-" x $ml, "", "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s\n", -$ml, $_->[0], $hl, $_->[2]) } @reports; } else { splice @reports, 1, 0, ["-" x $ml, "-" x $wl, "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s %*s\n", -$ml, $_->[0], $wl, $_->[1], $hl, $_->[2]) } @reports; } push @full_reports, "\n"; } } } if ( @full_reports ) { diag "\nVersions for all modules listed in $source (including optional ones):\n\n", @full_reports; } if ( $cpan_meta_error || @dep_errors ) { diag "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n"; } if ( $cpan_meta_error ) { my ($orig_source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; diag "\nCPAN::Meta->load_file('$orig_source') failed with: $cpan_meta_error\n"; } if ( @dep_errors ) { diag join("\n", "\nThe following REQUIRED prerequisites were not satisfied:\n", @dep_errors, "\n" ); } pass('Reported prereqs'); # vim: ts=4 sts=4 sw=4 et: LWP-Protocol-https-6.14/t/example.t0000644000175000017500000000304414573454623015572 0ustar olafolaf#!perl -w use strict; use Test::More; use Test::RequiresInternet 'www.example.com' => 443; use LWP::UserAgent (); my $ua = LWP::UserAgent->new( ssl_opts => { verify_hostname => 0 } ); plan tests => 2; my $url = 'https://www.example.com'; subtest "Request GET $url" => sub { plan tests => 6; my $res = $ua->simple_request(HTTP::Request->new(GET => $url)); ok($res->is_success, "success status"); my $h; $h = 'X-Died'; my $x_died = $res->header($h); is($x_died, undef, "no $h header"); $h = 'Client-SSL-Socket-Class'; my $socket_class = $res->header($h) || ''; ok($socket_class =~ /\S/, "have header $h"); SKIP: { $h = 'Client-SSL-Version'; my $ssl_version = $res->header($h) || ''; my $h_test = $ssl_version =~ /^(SSL|TLS)v\d/i; my $want_class = 'IO::Socket::SSL'; $h_test or $socket_class eq $want_class or skip "header $h only guaranteed when using $want_class", 1; ok($h_test, "have header $h"); } $h = 'Client-SSL-Cipher'; my $ssl_cipher = $res->header($h) || ''; ok($ssl_cipher =~ /\S/, "have header $h"); like($res->content, qr/Example Domain/, "found expected document content"); }; subtest "Check for warnings from GET $url (RT #81948)" => sub { plan tests => 2; my $warn = ''; $SIG{__WARN__} = sub { $warn = shift }; my $res = $ua->simple_request(HTTP::Request->new(GET => $url)); ok($res->is_success, "success status"); is($warn, '', "no warning seen"); $res->dump(prefix => "# "); }; LWP-Protocol-https-6.14/LICENSE0000644000175000017500000004641614573454623014526 0ustar olafolafThis software is copyright (c) 1997 by Gisle Aas. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 1997 by Gisle Aas. This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Perl Artistic License 1.0 --- This software is Copyright (c) 1997 by Gisle Aas. This is free software, licensed under: The Perl Artistic License 1.0 The "Artistic License" Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder as specified below. "Copyright Holder" is whoever is named in the copyright or copyrights for the package. "You" is you, if you're thinking about copying or distributing this Package. "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as uunet.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) give non-standard executables non-standard names, and clearly document the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. You may embed this Package's interpreter within an executable of yours (by linking); this shall be construed as a mere form of aggregation, provided that the complete Standard Version of the interpreter is so embedded. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whoever generated them, and may be sold commercially, and may be aggregated with this Package. If such scripts or library files are aggregated with this Package via the so-called "undump" or "unexec" methods of producing a binary executable image, then distribution of such an image shall neither be construed as a distribution of this Package nor shall it fall under the restrictions of Paragraphs 3 and 4, provided that you do not represent such an executable image as a Standard Version of this Package. 7. C subroutines (or comparably compiled subroutines in other languages) supplied by you and linked into this Package in order to emulate subroutines and variables of the language defined by this Package shall not be considered part of this Package, but are the equivalent of input as in Paragraph 6, provided these subroutines do not change the language in any way that would cause it to fail the regression tests for the language. 8. Aggregation of this Package with a commercial distribution is always permitted provided that the use of this Package is embedded; that is, when no overt attempt is made to make this Package's interfaces visible to the end user of the commercial distribution. Such use shall not be construed as a distribution of this Package. 9. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End LWP-Protocol-https-6.14/MANIFEST0000644000175000017500000000113114573454623014633 0ustar olafolaf# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.031. CONTRIBUTING.md Changes Install LICENSE MANIFEST META.json META.yml Makefile.PL cpanfile dist.ini lib/LWP/Protocol/https.pm perlcriticrc perltidyrc t/00-report-prereqs.dd t/00-report-prereqs.t t/diag.t t/example.t t/https_proxy.t tidyall.ini xt/author/00-compile.t xt/author/clean-namespaces.t xt/author/distmeta.t xt/author/eol.t xt/author/kwalitee.t xt/author/minimum-version.t xt/author/mojibake.t xt/author/pod-coverage.t xt/author/pod-spell.t xt/author/pod-syntax.t xt/author/portability.t xt/author/test-version.t LWP-Protocol-https-6.14/perltidyrc0000644000175000017500000000033014573454623015606 0ustar olafolaf--blank-lines-before-packages=0 --iterations=2 --no-outdent-long-comments -b -bar -boc -ci=4 -i=4 -l=78 -nolq -se -wbb="% + - * / x != == >= <= =~ !~ < > | & >= < = **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x=" LWP-Protocol-https-6.14/Makefile.PL0000644000175000017500000000373514573454623015470 0ustar olafolaf# This Makefile.PL for LWP-Protocol-https was generated by # Dist::Zilla::Plugin::MakeMaker::Awesome 0.49. # Don't edit it but the dist.ini and plugins used to construct it. use strict; use warnings; use 5.008001; use ExtUtils::MakeMaker; my %WriteMakefileArgs = ( "ABSTRACT" => "Provide https support for LWP::UserAgent", "AUTHOR" => "Gisle Aas ", "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => 0 }, "DISTNAME" => "LWP-Protocol-https", "LICENSE" => "perl", "MIN_PERL_VERSION" => "5.008001", "NAME" => "LWP::Protocol::https", "PREREQ_PM" => { "IO::Socket::SSL" => "1.970", "LWP::Protocol::http" => 0, "LWP::UserAgent" => "6.06", "Net::HTTPS" => 6, "base" => 0, "strict" => 0 }, "TEST_REQUIRES" => { "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "File::Temp" => 0, "IO::Select" => 0, "IO::Socket::INET" => 0, "IO::Socket::SSL" => "1.970", "IO::Socket::SSL::Utils" => 0, "LWP::UserAgent" => "6.06", "Socket" => 0, "Test::More" => "0.96", "Test::Needs" => "0.002010", "Test::RequiresInternet" => 0, "warnings" => 0 }, "VERSION" => "6.14", "test" => { "TESTS" => "t/*.t" } ); my %FallbackPrereqs = ( "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "File::Temp" => 0, "IO::Select" => 0, "IO::Socket::INET" => 0, "IO::Socket::SSL" => "1.970", "IO::Socket::SSL::Utils" => 0, "LWP::Protocol::http" => 0, "LWP::UserAgent" => "6.06", "Net::HTTPS" => 6, "Socket" => 0, "Test::More" => "0.96", "Test::Needs" => "0.002010", "Test::RequiresInternet" => 0, "base" => 0, "strict" => 0, "warnings" => 0 ); unless ( eval { ExtUtils::MakeMaker->VERSION('6.63_03') } ) { delete $WriteMakefileArgs{TEST_REQUIRES}; delete $WriteMakefileArgs{BUILD_REQUIRES}; $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); LWP-Protocol-https-6.14/dist.ini0000644000175000017500000000400114573454623015145 0ustar olafolafname = LWP-Protocol-https author = Gisle Aas license = Perl_5 main_module = lib/LWP/Protocol/https.pm copyright_holder = Gisle Aas copyright_year = 1997 ; Gather stuff in [Git::GatherDir] exclude_filename = Makefile.PL exclude_filename = META.json exclude_filename = README.md exclude_filename = LICENSE [PruneCruft] ; Handle the META resources [MetaConfig] [MetaProvides::Package] [MetaNoIndex] directory = t directory = xt [MetaYAML] [MetaJSON] [MetaResources] x_IRC = irc://irc.perl.org/#lwp x_MailingList = mailto:libwww@perl.org [Git::Check] allow_dirty = Makefile.PL allow_dirty = META.json allow_dirty = README.md allow_dirty = LICENSE [Git::Contributors] [GithubMeta] issues = 1 user = libwww-perl [Manifest] [License] ; Create Readme [ReadmeAnyFromPod / Markdown_Readme] source_filename = lib/LWP/Protocol/https.pm type = markdown filename = README.md location = root ; make the bin dir executables ; [ExecDir] ; [ShareDir] ; Handle Versioning [@Git::VersionManager] commit_files_after_release = LICENSE commit_files_after_release = Makefile.PL commit_files_after_release = META.json RewriteVersion::Transitional.fallback_version_provider = Git::NextVersion [Prereqs::FromCPANfile] [MakeMaker::Awesome] [CheckChangeLog] [CheckChangesHasContent] ; TODO strict and warnings to quiet the kwalitee tests [Test::Kwalitee] filename = xt/author/kwalitee.t skiptest = has_readme [MojibakeTests] [Test::Version] [Test::ReportPrereqs] include = Net::SSLeay [Test::Compile] bail_out_on_fail = 1 xt_mode = 1 [Test::Portability] ; TODO perltidy for NoTabs [Test::CleanNamespaces] ; [Test::NoTabs] [Test::EOL] [MetaTests] [Test::MinimumVersion] [PodSyntaxTests] [Test::Pod::Coverage::Configurable] trustme = LWP::Protocol::https => qr/^(?:socket_type)$/ [Test::PodSpelling] wordlist = Pod::Wordlist spell_cmd = aspell list [RunExtraTests] [CheckStrictVersion] decimal_only = 1 [CopyFilesFromBuild] copy = Makefile.PL copy = META.json copy = LICENSE [TestRelease] [ConfirmRelease] [UploadToCPAN] [Git::Push] LWP-Protocol-https-6.14/CONTRIBUTING.md0000644000175000017500000001020414573454623015734 0ustar olafolaf# HOW TO CONTRIBUTE Thank you for considering contributing to this distribution. This file contains instructions that will help you work with the source code. The distribution is managed with [Dist::Zilla](https://metacpan.org/pod/Dist::Zilla). This means that many of the usual files you might expect are not in the repository, but are generated at release time. Some generated files are kept in the repository as a convenience (e.g. Build.PL/Makefile.PL and META.json). Generally, **you do not need Dist::Zilla to contribute patches**. You may need Dist::Zilla to create a tarball. See below for guidance. ## Getting dependencies If you have App::cpanminus 1.6 or later installed, you can use [cpanm](https://metacpan.org/pod/cpanm) to satisfy dependencies like this: $ cpanm --installdeps --with-develop . You can also run this command (or any other cpanm command) without installing App::cpanminus first, using the fatpacked `cpanm` script via curl or wget: $ curl -L https://cpanmin.us | perl - --installdeps --with-develop . $ wget -qO - https://cpanmin.us | perl - --installdeps --with-develop . Otherwise, look for either a `cpanfile` or `META.json` file for a list of dependencies to satisfy. ## Running tests You can run tests directly using the `prove` tool: $ prove -l $ prove -lv t/some_test_file.t For most of my distributions, `prove` is entirely sufficient for you to test any patches you have. I use `prove` for 99% of my testing during development. ## Code style and tidying Please try to match any existing coding style. If there is a `.perltidyrc` file, please install Perl::Tidy and use perltidy before submitting patches. ## Installing and using Dist::Zilla [Dist::Zilla](https://metacpan.org/pod/Dist::Zilla) is a very powerful authoring tool, optimized for maintaining a large number of distributions with a high degree of automation, but it has a large dependency chain, a bit of a learning curve and requires a number of author-specific plugins. To install it from CPAN, I recommend one of the following approaches for the quickest installation: # using CPAN.pm, but bypassing non-functional pod tests $ cpan TAP::Harness::Restricted $ PERL_MM_USE_DEFAULT=1 HARNESS_CLASS=TAP::Harness::Restricted cpan Dist::Zilla # using cpanm, bypassing *all* tests $ cpanm -n Dist::Zilla In either case, it's probably going to take about 10 minutes. Go for a walk, go get a cup of your favorite beverage, take a bathroom break, or whatever. When you get back, Dist::Zilla should be ready for you. Then you need to install any plugins specific to this distribution: $ dzil authordeps --missing | cpanm You can use Dist::Zilla to install the distribution's dependencies if you haven't already installed them with cpanm: $ dzil listdeps --missing --develop | cpanm Once everything is installed, here are some dzil commands you might try: $ dzil build $ dzil test $ dzil regenerate You can learn more about Dist::Zilla at http://dzil.org/ ## Other notes This distribution maintains the generated `META.json` and either `Makefile.PL` or `Build.PL` in the repository. This allows two things: [Travis CI](https://travis-ci.org/) can build and test the distribution without requiring Dist::Zilla, and the distribution can be installed directly from Github or a local git repository using `cpanm` for testing (again, not requiring Dist::Zilla). $ cpanm git://github.com/Author/Distribution-Name.git $ cd Distribution-Name; cpanm . Contributions are preferred in the form of a Github pull request. See [Using pull requests](https://help.github.com/articles/using-pull-requests/) for further information. You can use the Github issue tracker to report issues without an accompanying patch. # CREDITS This file was adapted from an initial `CONTRIBUTING.mkdn` file from David Golden under the terms of the Apache 2 license, with inspiration from the contributing documents from [Dist::Zilla::Plugin::Author::KENTNL::CONTRIBUTING](https://metacpan.org/pod/Dist::Zilla::Plugin::Author::KENTNL::CONTRIBUTING) and [Dist::Zilla::PluginBundle::Author::ETHER](https://metacpan.org/pod/Dist::Zilla::PluginBundle::Author::ETHER). LWP-Protocol-https-6.14/cpanfile0000644000175000017500000000232414573454623015213 0ustar olafolafon 'configure' => sub { requires "ExtUtils::MakeMaker" => "0"; requires "perl" => "5.008001"; }; on 'runtime' => sub { requires "base" => "0"; requires "IO::Socket::SSL" => "1.970"; requires "LWP::Protocol::http" => "0"; requires "LWP::UserAgent" => "6.06"; requires "Net::HTTPS" => "6"; requires "perl" => "5.008001"; requires "strict" => "0"; }; on 'test' => sub { requires "File::Temp" => "0"; requires "IO::Select" => "0"; requires "IO::Socket::INET" => "0"; requires "IO::Socket::SSL" => "1.54"; requires "IO::Socket::SSL::Utils" => "0"; requires "LWP::UserAgent" => "6.06"; requires "perl" => "5.008001"; requires "Socket" => "0"; requires "Test::More" => "0.96"; requires "Test::Needs" => "0.002010"; requires "Test::RequiresInternet" => "0"; requires "warnings" => "0"; }; on 'develop' => sub { requires 'Capture::Tiny' => '0.48'; requires 'Test::CheckManifest' => '1.29'; requires 'Test::CleanNamespaces'; requires "Test::CPAN::Changes" => "0.19"; requires 'Test::CPAN::Meta'; requires 'Test::Kwalitee'; requires 'Test::Kwalitee' => '1.22'; requires 'Test::Pod::Spelling::CommonMistakes' => '1.000'; }; LWP-Protocol-https-6.14/META.json0000644000175000017500000006162714573454623015143 0ustar olafolaf{ "abstract" : "Provide https support for LWP::UserAgent", "author" : [ "Gisle Aas " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 6.031, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "LWP-Protocol-https", "no_index" : { "directory" : [ "t", "xt" ] }, "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0", "perl" : "5.008001" }, "suggests" : { "JSON::PP" : "2.27300" } }, "develop" : { "recommends" : { "Dist::Zilla::PluginBundle::Git::VersionManager" : "0.007" }, "requires" : { "Capture::Tiny" : "0.48", "File::Spec" : "0", "IO::Handle" : "0", "IPC::Open3" : "0", "Pod::Coverage::TrustPod" : "0", "Test::CPAN::Changes" : "0.19", "Test::CPAN::Meta" : "0", "Test::CheckManifest" : "1.29", "Test::CleanNamespaces" : "0.15", "Test::EOL" : "0", "Test::Kwalitee" : "1.22", "Test::MinimumVersion" : "0", "Test::Mojibake" : "0", "Test::More" : "0.94", "Test::Pod" : "1.41", "Test::Pod::Coverage" : "1.08", "Test::Pod::Spelling::CommonMistakes" : "1.000", "Test::Portability::Files" : "0", "Test::Spelling" : "0.12", "Test::Version" : "1" } }, "runtime" : { "requires" : { "IO::Socket::SSL" : "1.970", "LWP::Protocol::http" : "0", "LWP::UserAgent" : "6.06", "Net::HTTPS" : "6", "base" : "0", "perl" : "5.008001", "strict" : "0" } }, "test" : { "recommends" : { "CPAN::Meta" : "2.120900" }, "requires" : { "ExtUtils::MakeMaker" : "0", "File::Spec" : "0", "File::Temp" : "0", "IO::Select" : "0", "IO::Socket::INET" : "0", "IO::Socket::SSL" : "1.970", "IO::Socket::SSL::Utils" : "0", "LWP::UserAgent" : "6.06", "Socket" : "0", "Test::More" : "0.96", "Test::Needs" : "0.002010", "Test::RequiresInternet" : "0", "perl" : "5.008001", "warnings" : "0" } } }, "provides" : { "LWP::Protocol::https" : { "file" : "lib/LWP/Protocol/https.pm", "version" : "6.14" }, "LWP::Protocol::https::Socket" : { "file" : "lib/LWP/Protocol/https.pm", "version" : "6.14" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/libwww-perl/LWP-Protocol-https/issues" }, "homepage" : "https://github.com/libwww-perl/LWP-Protocol-https", "repository" : { "type" : "git", "url" : "https://github.com/libwww-perl/LWP-Protocol-https.git", "web" : "https://github.com/libwww-perl/LWP-Protocol-https" }, "x_IRC" : "irc://irc.perl.org/#lwp", "x_MailingList" : "mailto:libwww@perl.org" }, "version" : "6.14", "x_Dist_Zilla" : { "perl" : { "version" : "5.034000" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::Git::GatherDir", "config" : { "Dist::Zilla::Plugin::GatherDir" : { "exclude_filename" : [ "LICENSE", "META.json", "Makefile.PL", "README.md" ], "exclude_match" : [], "include_dotfiles" : 0, "prefix" : "", "prune_directory" : [], "root" : "." }, "Dist::Zilla::Plugin::Git::GatherDir" : { "include_untracked" : 0 } }, "name" : "Git::GatherDir", "version" : "2.049" }, { "class" : "Dist::Zilla::Plugin::PruneCruft", "name" : "PruneCruft", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "MetaConfig", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::MetaProvides::Package", "config" : { "Dist::Zilla::Plugin::MetaProvides::Package" : { "finder_objects" : [ { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : "MetaProvides::Package/AUTOVIV/:InstallModulesPM", "version" : "6.031" } ], "include_underscores" : 0 }, "Dist::Zilla::Role::MetaProvider::Provider" : { "$Dist::Zilla::Role::MetaProvider::Provider::VERSION" : "2.002004", "inherit_missing" : 1, "inherit_version" : 1, "meta_noindex" : 1 }, "Dist::Zilla::Role::ModuleMetadata" : { "Module::Metadata" : "1.000037", "version" : "0.006" } }, "name" : "MetaProvides::Package", "version" : "2.004003" }, { "class" : "Dist::Zilla::Plugin::MetaNoIndex", "name" : "MetaNoIndex", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "MetaYAML", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "MetaJSON", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::MetaResources", "name" : "MetaResources", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "config" : { "Dist::Zilla::Plugin::Git::Check" : { "untracked_files" : "die" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "LICENSE", "META.json", "Makefile.PL", "README.md" ], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.34.1", "repo_root" : "." } }, "name" : "Git::Check", "version" : "2.049" }, { "class" : "Dist::Zilla::Plugin::Git::Contributors", "config" : { "Dist::Zilla::Plugin::Git::Contributors" : { "git_version" : "2.34.1", "include_authors" : 0, "include_releaser" : 1, "order_by" : "name", "paths" : [] } }, "name" : "Git::Contributors", "version" : "0.036" }, { "class" : "Dist::Zilla::Plugin::GithubMeta", "name" : "GithubMeta", "version" : "0.58" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "Manifest", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "License", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", "config" : { "Dist::Zilla::Role::FileWatcher" : { "version" : "0.006" } }, "name" : "Markdown_Readme", "version" : "0.163250" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "recommends" } }, "name" : "@Git::VersionManager/pluginbundle version", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::RewriteVersion::Transitional", "config" : { "Dist::Zilla::Plugin::RewriteVersion" : { "add_tarball_name" : 0, "finders" : [ ":ExecFiles", ":InstallModules" ], "global" : 0, "skip_version_provider" : 0 }, "Dist::Zilla::Plugin::RewriteVersion::Transitional" : {} }, "name" : "@Git::VersionManager/RewriteVersion::Transitional", "version" : "0.009" }, { "class" : "Dist::Zilla::Plugin::MetaProvides::Update", "name" : "@Git::VersionManager/MetaProvides::Update", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::CopyFilesFromRelease", "config" : { "Dist::Zilla::Plugin::CopyFilesFromRelease" : { "filename" : [ "Changes" ], "match" : [] } }, "name" : "@Git::VersionManager/CopyFilesFromRelease", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "config" : { "Dist::Zilla::Plugin::Git::Commit" : { "add_files_in" : [], "commit_msg" : "v%V%n%n%c", "signoff" : 0 }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "Changes", "LICENSE", "META.json", "Makefile.PL" ], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.34.1", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@Git::VersionManager/release snapshot", "version" : "2.049" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "config" : { "Dist::Zilla::Plugin::Git::Tag" : { "branch" : null, "changelog" : "Changes", "signed" : 0, "tag" : "v6.14", "tag_format" : "v%V", "tag_message" : "v%V" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.34.1", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@Git::VersionManager/Git::Tag", "version" : "2.049" }, { "class" : "Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional", "config" : { "Dist::Zilla::Plugin::BumpVersionAfterRelease" : { "finders" : [ ":ExecFiles", ":InstallModules" ], "global" : 0, "munge_makefile_pl" : 1 }, "Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional" : {} }, "name" : "@Git::VersionManager/BumpVersionAfterRelease::Transitional", "version" : "0.009" }, { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "@Git::VersionManager/NextRelease", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "config" : { "Dist::Zilla::Plugin::Git::Commit" : { "add_files_in" : [], "commit_msg" : "increment $VERSION after %v release", "signoff" : 0 }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "Build.PL", "Changes", "Makefile.PL" ], "allow_dirty_match" : [ "(?^:^lib/.*\\.pm$)" ], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.34.1", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@Git::VersionManager/post-release commit", "version" : "2.049" }, { "class" : "Dist::Zilla::Plugin::Prereqs::FromCPANfile", "name" : "Prereqs::FromCPANfile", "version" : "0.08" }, { "class" : "Dist::Zilla::Plugin::MakeMaker::Awesome", "config" : { "Dist::Zilla::Plugin::MakeMaker" : { "make_path" : "make", "version" : "6.031" }, "Dist::Zilla::Role::TestRunner" : { "default_jobs" : "8", "version" : "6.031" } }, "name" : "MakeMaker::Awesome", "version" : "0.49" }, { "class" : "Dist::Zilla::Plugin::CheckChangeLog", "name" : "CheckChangeLog", "version" : "0.05" }, { "class" : "Dist::Zilla::Plugin::CheckChangesHasContent", "name" : "CheckChangesHasContent", "version" : "0.011" }, { "class" : "Dist::Zilla::Plugin::Test::Kwalitee", "config" : { "Dist::Zilla::Plugin::Test::Kwalitee" : { "filename" : "xt/author/kwalitee.t", "skiptest" : [ "has_readme" ] } }, "name" : "Test::Kwalitee", "version" : "2.12" }, { "class" : "Dist::Zilla::Plugin::MojibakeTests", "name" : "MojibakeTests", "version" : "0.8" }, { "class" : "Dist::Zilla::Plugin::Test::Version", "name" : "Test::Version", "version" : "1.09" }, { "class" : "Dist::Zilla::Plugin::Test::ReportPrereqs", "name" : "Test::ReportPrereqs", "version" : "0.029" }, { "class" : "Dist::Zilla::Plugin::Test::Compile", "config" : { "Dist::Zilla::Plugin::Test::Compile" : { "bail_out_on_fail" : "1", "fail_on_warning" : "author", "fake_home" : 0, "filename" : "xt/author/00-compile.t", "module_finder" : [ ":InstallModules" ], "needs_display" : 0, "phase" : "develop", "script_finder" : [ ":PerlExecFiles" ], "skips" : [], "switch" : [] } }, "name" : "Test::Compile", "version" : "2.058" }, { "class" : "Dist::Zilla::Plugin::Test::Portability", "config" : { "Dist::Zilla::Plugin::Test::Portability" : { "options" : "" } }, "name" : "Test::Portability", "version" : "2.001001" }, { "class" : "Dist::Zilla::Plugin::Test::CleanNamespaces", "config" : { "Dist::Zilla::Plugin::Test::CleanNamespaces" : { "filename" : "xt/author/clean-namespaces.t", "skips" : [] } }, "name" : "Test::CleanNamespaces", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::Test::EOL", "config" : { "Dist::Zilla::Plugin::Test::EOL" : { "filename" : "xt/author/eol.t", "finder" : [ ":ExecFiles", ":InstallModules", ":TestFiles" ], "trailing_whitespace" : 1 } }, "name" : "Test::EOL", "version" : "0.19" }, { "class" : "Dist::Zilla::Plugin::MetaTests", "name" : "MetaTests", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::Test::MinimumVersion", "config" : { "Dist::Zilla::Plugin::Test::MinimumVersion" : { "max_target_perl" : null } }, "name" : "Test::MinimumVersion", "version" : "2.000010" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "PodSyntaxTests", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::Test::Pod::Coverage::Configurable", "name" : "Test::Pod::Coverage::Configurable", "version" : "0.07" }, { "class" : "Dist::Zilla::Plugin::Test::PodSpelling", "config" : { "Dist::Zilla::Plugin::Test::PodSpelling" : { "directories" : [ "bin", "lib" ], "spell_cmd" : "aspell list", "stopwords" : [], "wordlist" : "Pod::Wordlist" } }, "name" : "Test::PodSpelling", "version" : "2.007005" }, { "class" : "Dist::Zilla::Plugin::RunExtraTests", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : "8" } }, "name" : "RunExtraTests", "version" : "0.029" }, { "class" : "Dist::Zilla::Plugin::CheckStrictVersion", "name" : "CheckStrictVersion", "version" : "0.001" }, { "class" : "Dist::Zilla::Plugin::CopyFilesFromBuild", "name" : "CopyFilesFromBuild", "version" : "0.170880" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "TestRelease", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "ConfirmRelease", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "UploadToCPAN", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::Git::Push", "config" : { "Dist::Zilla::Plugin::Git::Push" : { "push_to" : [ "origin" ], "remotes_must_exist" : 1 }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.34.1", "repo_root" : "." } }, "name" : "Git::Push", "version" : "2.049" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExtraTestFiles", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":PerlExecFiles", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":AllFiles", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":NoFiles", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : "MetaProvides::Package/AUTOVIV/:InstallModulesPM", "version" : "6.031" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : 0 }, "version" : "6.031" } }, "x_contributors" : [ "Adam Kennedy ", "Adam Sjogren ", "Alexandr Ciornii ", "Alexey Tourbin ", "Alex Kapranoff ", "amire80 ", "Andreas J. Koenig ", "Axel Burri ", "Bill Mann ", "Bron Gondwana ", "Chase Whitener ", "Christopher J. Madsen ", "cpansprout ", "Dan Book ", "Daniel Hedlund ", "David E. Wheeler ", "David Golden ", "DAVIDRW ", "dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>", "Dmitriy Shamatrin ", "drieux ", "Father Chrysostomos ", "FWILES ", "Gavin Peters ", "Gianni Ceccarelli ", "Gisle Aas ", "Graeme Thompson ", "Hans-H. Froehlich ", "Ian Kilgore ", "Jacob J ", "Jakub Wilk ", "jefflee ", "JJ Merelo ", "john9art ", "Jon Jensen ", "Karen Etheridge ", "Leo Lapworth ", "Marin Tsanov ", "Mark Stosberg ", "Michael G. Schwern ", "Mike Schilli ", "Mohammad S Anwar ", "murphy ", "Nicolas R ", "Olaf Alders ", "Ondrej Hanak ", "openstrike ", "Peter Rabbitson ", "phrstbrn ", "Randy Stauner ", "Robert Stone ", "Rolf Grossmann ", "ruff ", "sasao ", "Sean M. Burke ", "Shoichi Kaji ", "Slaven Rezic ", "Spiros Denaxas ", "Steffen Ullrich ", "Steve Hay ", "Tim Couzins ", "Todd Lipcon ", "Tom Hukins ", "Tony Finch ", "Toru Yamaguchi ", "uid39246 ", "Ville Skytt\u00e4 ", "Yuri Karaban ", "Yury Zavarin ", "Zefram " ], "x_generated_by_perl" : "v5.34.0", "x_serialization_backend" : "Cpanel::JSON::XS version 4.37", "x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later" } LWP-Protocol-https-6.14/Install0000644000175000017500000000174714573454623015050 0ustar olafolafThis is the Perl distribution LWP-Protocol-https. Installing LWP-Protocol-https is straightforward. ## Installation with cpanm If you have cpanm, you only need one line: % cpanm LWP::Protocol::https If you are installing into a system-wide directory, you may need to pass the "-S" flag to cpanm, which uses sudo to install the module: % cpanm -S LWP::Protocol::https ## Installing with the CPAN shell Alternatively, if your CPAN shell is set up, you should just be able to do: % cpan LWP::Protocol::https ## Manual installation As a last resort, you can manually install it. Download the tarball, untar it, then build it: % perl Makefile.PL % make && make test Then install it: % make install If you are installing into a system-wide directory, you may need to run: % sudo make install ## Documentation LWP-Protocol-https documentation is available as POD. You can run perldoc from a shell to read the documentation: % perldoc LWP::Protocol::https LWP-Protocol-https-6.14/xt/0000775000175000017500000000000014573454623014143 5ustar olafolafLWP-Protocol-https-6.14/xt/author/0000775000175000017500000000000014573454623015445 5ustar olafolafLWP-Protocol-https-6.14/xt/author/portability.t0000644000175000017500000000013014573454623020164 0ustar olafolafuse strict; use warnings; use Test::More; use Test::Portability::Files; run_tests(); LWP-Protocol-https-6.14/xt/author/minimum-version.t0000644000175000017500000000015414573454623020766 0ustar olafolafuse strict; use warnings; use Test::More; use Test::MinimumVersion; all_minimum_version_from_metayml_ok(); LWP-Protocol-https-6.14/xt/author/distmeta.t0000644000175000017500000000022314573454623017437 0ustar olafolaf#!perl # This file was automatically generated by Dist::Zilla::Plugin::MetaTests. use strict; use warnings; use Test::CPAN::Meta; meta_yaml_ok(); LWP-Protocol-https-6.14/xt/author/kwalitee.t0000644000175000017500000000032014573454623017430 0ustar olafolaf# this test was generated with Dist::Zilla::Plugin::Test::Kwalitee 2.12 use strict; use warnings; use Test::More 0.88; use Test::Kwalitee 1.21 'kwalitee_ok'; kwalitee_ok( qw( -has_readme ) ); done_testing; LWP-Protocol-https-6.14/xt/author/00-compile.t0000644000175000017500000000255314573454623017502 0ustar olafolafuse 5.006; use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::Compile 2.058 use Test::More 0.94; plan tests => 2; my @module_files = ( 'LWP/Protocol/https.pm' ); # no fake home requested my @switches = ( -d 'blib' ? '-Mblib' : '-Ilib', ); use File::Spec; use IPC::Open3; use IO::Handle; open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; my @warnings; for my $lib (@module_files) { # see L my $stderr = IO::Handle->new; diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} } $^X, @switches, '-e', "require q[$lib]")) if $ENV{PERL_COMPILE_TEST_DEBUG}; my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]"); binmode $stderr, ':crlf' if $^O eq 'MSWin32'; my @_warnings = <$stderr>; waitpid($pid, 0); is($?, 0, "$lib loaded ok"); shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/ and not eval { +require blib; blib->VERSION('1.01') }; if (@_warnings) { warn @_warnings; push @warnings, @_warnings; } } is(scalar(@warnings), 0, 'no warnings found') or diag 'got warnings: ', explain(\@warnings); BAIL_OUT("Compilation problems") if !Test::More->builder->is_passing; LWP-Protocol-https-6.14/xt/author/pod-coverage.t0000644000175000017500000000215514573454623020206 0ustar olafolaf#!perl # This file was automatically generated by Dist::Zilla::Plugin::Test::Pod::Coverage::Configurable 0.07. use Test::Pod::Coverage 1.08; use Test::More 0.88; BEGIN { if ( $] <= 5.008008 ) { plan skip_all => 'These tests require Pod::Coverage::TrustPod, which only works with Perl 5.8.9+'; } } use Pod::Coverage::TrustPod; my %skip = map { $_ => 1 } qw( ); my @modules; for my $module ( all_modules() ) { next if $skip{$module}; push @modules, $module; } plan skip_all => 'All the modules we found were excluded from POD coverage test.' unless @modules; plan tests => scalar @modules; my %trustme = ( 'LWP::Protocol::https' => [ qr/^(?:socket_type)$/ ] ); my @also_private; for my $module ( sort @modules ) { pod_coverage_ok( $module, { coverage_class => 'Pod::Coverage::TrustPod', also_private => \@also_private, trustme => $trustme{$module} || [], }, "pod coverage for $module" ); } done_testing(); LWP-Protocol-https-6.14/xt/author/pod-spell.t0000644000175000017500000000276214573454623017536 0ustar olafolafuse strict; use warnings; use Test::More; # generated by Dist::Zilla::Plugin::Test::PodSpelling 2.007005 use Test::Spelling 0.12; use Pod::Wordlist; set_spell_cmd('aspell list'); add_stopwords(); all_pod_files_spelling_ok( qw( bin lib ) ); __DATA__ 49699333 Aas Adam Alders Alex Alexandr Alexey Andreas Anwar Axel Bill Book Bron Burke Burri Ceccarelli Chase Christopher Chrysostomos Ciornii Couzins DAVIDRW Dan Daniel David Denaxas Dmitriy Etheridge FWILES Father Finch Froehlich Gavin Gianni Gisle Golden Gondwana Graeme Grossmann Hanak Hans Hay Hedlund Hukins Ian JJ Jacob Jakub Jensen Jon Kaji Kapranoff Karaban Karen Kennedy Kilgore Koenig LWP Lapworth Leo Lipcon Madsen Mann Marin Mark Merelo Michael Mike Mohammad Nicolas Olaf Ondrej Peter Peters Protocol Rabbitson Randy Rezic Robert Rolf Schilli Schwern Sean Shamatrin Shoichi Sjogren Skyttä Slaven Spiros Stauner Steffen Steffen_Ullrich Steve SteveHay Stone Stosberg Thompson Tim Todd Tom Tony Toru Tourbin Tsanov Ullrich Ville Wheeler Whitener Wilk Yamaguchi Yuri Yury Zavarin Zefram adamk alexchorny amir amire80 andreas asjo at axel brong btg capoeirab cjm cpansprout dagolden david davidrw denaxas dependabot dot drieux dshamatrin ether gianni gisle git github gpeters grinnz hfroehlich https iank jefflee jjmerelo john9art jon jwilk ka leo lib mark mohammad murphy nicolas olaf ondrej openstrike phrstbrn randy rg ribasushi ruff sasao sburke schwern shaohua skaji slaven sprout talby tech tim todd tom uid39246 ville waif wfmann yury zefram zigorou LWP-Protocol-https-6.14/xt/author/pod-syntax.t0000644000175000017500000000025214573454623017735 0ustar olafolaf#!perl # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. use strict; use warnings; use Test::More; use Test::Pod 1.41; all_pod_files_ok(); LWP-Protocol-https-6.14/xt/author/clean-namespaces.t0000644000175000017500000000036114573454623021027 0ustar olafolafuse strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::CleanNamespaces 0.006 use Test::More 0.94; use Test::CleanNamespaces 0.15; subtest all_namespaces_clean => sub { all_namespaces_clean() }; done_testing; LWP-Protocol-https-6.14/xt/author/mojibake.t0000644000175000017500000000015114573454623017406 0ustar olafolaf#!perl use strict; use warnings qw(all); use Test::More; use Test::Mojibake; all_files_encoding_ok(); LWP-Protocol-https-6.14/xt/author/test-version.t0000644000175000017500000000063714573454623020300 0ustar olafolafuse strict; use warnings; use Test::More; # generated by Dist::Zilla::Plugin::Test::Version 1.09 use Test::Version; my @imports = qw( version_all_ok ); my $params = { is_strict => 0, has_version => 1, multiple => 0, }; push @imports, $params if version->parse( $Test::Version::VERSION ) >= version->parse('1.002'); Test::Version->import(@imports); version_all_ok; done_testing; LWP-Protocol-https-6.14/xt/author/eol.t0000644000175000017500000000056714573454623016417 0ustar olafolafuse strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::EOL 0.19 use Test::More 0.88; use Test::EOL; my @files = ( 'lib/LWP/Protocol/https.pm', 't/00-report-prereqs.dd', 't/00-report-prereqs.t', 't/diag.t', 't/example.t', 't/https_proxy.t' ); eol_unix_ok($_, { trailing_whitespace => 1 }) foreach @files; done_testing; LWP-Protocol-https-6.14/META.yml0000644000175000017500000004037114573454623014764 0ustar olafolaf--- abstract: 'Provide https support for LWP::UserAgent' author: - 'Gisle Aas ' build_requires: ExtUtils::MakeMaker: '0' File::Spec: '0' File::Temp: '0' IO::Select: '0' IO::Socket::INET: '0' IO::Socket::SSL: '1.970' IO::Socket::SSL::Utils: '0' LWP::UserAgent: '6.06' Socket: '0' Test::More: '0.96' Test::Needs: '0.002010' Test::RequiresInternet: '0' perl: '5.008001' warnings: '0' configure_requires: ExtUtils::MakeMaker: '0' perl: '5.008001' dynamic_config: 0 generated_by: 'Dist::Zilla version 6.031, CPAN::Meta::Converter version 2.150010' 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 - xt provides: LWP::Protocol::https: file: lib/LWP/Protocol/https.pm version: '6.14' LWP::Protocol::https::Socket: file: lib/LWP/Protocol/https.pm version: '6.14' requires: IO::Socket::SSL: '1.970' LWP::Protocol::http: '0' LWP::UserAgent: '6.06' Net::HTTPS: '6' base: '0' perl: '5.008001' strict: '0' resources: IRC: irc://irc.perl.org/#lwp MailingList: mailto:libwww@perl.org bugtracker: https://github.com/libwww-perl/LWP-Protocol-https/issues homepage: https://github.com/libwww-perl/LWP-Protocol-https repository: https://github.com/libwww-perl/LWP-Protocol-https.git version: '6.14' x_Dist_Zilla: perl: version: '5.034000' plugins: - class: Dist::Zilla::Plugin::Git::GatherDir config: Dist::Zilla::Plugin::GatherDir: exclude_filename: - LICENSE - META.json - Makefile.PL - README.md exclude_match: [] include_dotfiles: 0 prefix: '' prune_directory: [] root: . Dist::Zilla::Plugin::Git::GatherDir: include_untracked: 0 name: Git::GatherDir version: '2.049' - class: Dist::Zilla::Plugin::PruneCruft name: PruneCruft version: '6.031' - class: Dist::Zilla::Plugin::MetaConfig name: MetaConfig version: '6.031' - class: Dist::Zilla::Plugin::MetaProvides::Package config: Dist::Zilla::Plugin::MetaProvides::Package: finder_objects: - class: Dist::Zilla::Plugin::FinderCode name: MetaProvides::Package/AUTOVIV/:InstallModulesPM version: '6.031' include_underscores: 0 Dist::Zilla::Role::MetaProvider::Provider: $Dist::Zilla::Role::MetaProvider::Provider::VERSION: '2.002004' inherit_missing: '1' inherit_version: '1' meta_noindex: '1' Dist::Zilla::Role::ModuleMetadata: Module::Metadata: '1.000037' version: '0.006' name: MetaProvides::Package version: '2.004003' - class: Dist::Zilla::Plugin::MetaNoIndex name: MetaNoIndex version: '6.031' - class: Dist::Zilla::Plugin::MetaYAML name: MetaYAML version: '6.031' - class: Dist::Zilla::Plugin::MetaJSON name: MetaJSON version: '6.031' - class: Dist::Zilla::Plugin::MetaResources name: MetaResources version: '6.031' - class: Dist::Zilla::Plugin::Git::Check config: Dist::Zilla::Plugin::Git::Check: untracked_files: die Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - LICENSE - META.json - Makefile.PL - README.md allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: git_version: 2.34.1 repo_root: . name: Git::Check version: '2.049' - class: Dist::Zilla::Plugin::Git::Contributors config: Dist::Zilla::Plugin::Git::Contributors: git_version: 2.34.1 include_authors: 0 include_releaser: 1 order_by: name paths: [] name: Git::Contributors version: '0.036' - class: Dist::Zilla::Plugin::GithubMeta name: GithubMeta version: '0.58' - class: Dist::Zilla::Plugin::Manifest name: Manifest version: '6.031' - class: Dist::Zilla::Plugin::License name: License version: '6.031' - class: Dist::Zilla::Plugin::ReadmeAnyFromPod config: Dist::Zilla::Role::FileWatcher: version: '0.006' name: Markdown_Readme version: '0.163250' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: recommends name: '@Git::VersionManager/pluginbundle version' version: '6.031' - class: Dist::Zilla::Plugin::RewriteVersion::Transitional config: Dist::Zilla::Plugin::RewriteVersion: add_tarball_name: 0 finders: - ':ExecFiles' - ':InstallModules' global: 0 skip_version_provider: 0 Dist::Zilla::Plugin::RewriteVersion::Transitional: {} name: '@Git::VersionManager/RewriteVersion::Transitional' version: '0.009' - class: Dist::Zilla::Plugin::MetaProvides::Update name: '@Git::VersionManager/MetaProvides::Update' version: '0.007' - class: Dist::Zilla::Plugin::CopyFilesFromRelease config: Dist::Zilla::Plugin::CopyFilesFromRelease: filename: - Changes match: [] name: '@Git::VersionManager/CopyFilesFromRelease' version: '0.007' - class: Dist::Zilla::Plugin::Git::Commit config: Dist::Zilla::Plugin::Git::Commit: add_files_in: [] commit_msg: v%V%n%n%c signoff: '0' Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - Changes - LICENSE - META.json - Makefile.PL allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: git_version: 2.34.1 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@Git::VersionManager/release snapshot' version: '2.049' - class: Dist::Zilla::Plugin::Git::Tag config: Dist::Zilla::Plugin::Git::Tag: branch: ~ changelog: Changes signed: 0 tag: v6.14 tag_format: v%V tag_message: v%V Dist::Zilla::Role::Git::Repo: git_version: 2.34.1 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@Git::VersionManager/Git::Tag' version: '2.049' - class: Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional config: Dist::Zilla::Plugin::BumpVersionAfterRelease: finders: - ':ExecFiles' - ':InstallModules' global: 0 munge_makefile_pl: 1 Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional: {} name: '@Git::VersionManager/BumpVersionAfterRelease::Transitional' version: '0.009' - class: Dist::Zilla::Plugin::NextRelease name: '@Git::VersionManager/NextRelease' version: '6.031' - class: Dist::Zilla::Plugin::Git::Commit config: Dist::Zilla::Plugin::Git::Commit: add_files_in: [] commit_msg: 'increment $VERSION after %v release' signoff: '0' Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - Build.PL - Changes - Makefile.PL allow_dirty_match: - (?^:^lib/.*\.pm$) changelog: Changes Dist::Zilla::Role::Git::Repo: git_version: 2.34.1 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@Git::VersionManager/post-release commit' version: '2.049' - class: Dist::Zilla::Plugin::Prereqs::FromCPANfile name: Prereqs::FromCPANfile version: '0.08' - class: Dist::Zilla::Plugin::MakeMaker::Awesome config: Dist::Zilla::Plugin::MakeMaker: make_path: make version: '6.031' Dist::Zilla::Role::TestRunner: default_jobs: '8' version: '6.031' name: MakeMaker::Awesome version: '0.49' - class: Dist::Zilla::Plugin::CheckChangeLog name: CheckChangeLog version: '0.05' - class: Dist::Zilla::Plugin::CheckChangesHasContent name: CheckChangesHasContent version: '0.011' - class: Dist::Zilla::Plugin::Test::Kwalitee config: Dist::Zilla::Plugin::Test::Kwalitee: filename: xt/author/kwalitee.t skiptest: - has_readme name: Test::Kwalitee version: '2.12' - class: Dist::Zilla::Plugin::MojibakeTests name: MojibakeTests version: '0.8' - class: Dist::Zilla::Plugin::Test::Version name: Test::Version version: '1.09' - class: Dist::Zilla::Plugin::Test::ReportPrereqs name: Test::ReportPrereqs version: '0.029' - class: Dist::Zilla::Plugin::Test::Compile config: Dist::Zilla::Plugin::Test::Compile: bail_out_on_fail: '1' fail_on_warning: author fake_home: 0 filename: xt/author/00-compile.t module_finder: - ':InstallModules' needs_display: 0 phase: develop script_finder: - ':PerlExecFiles' skips: [] switch: [] name: Test::Compile version: '2.058' - class: Dist::Zilla::Plugin::Test::Portability config: Dist::Zilla::Plugin::Test::Portability: options: '' name: Test::Portability version: '2.001001' - class: Dist::Zilla::Plugin::Test::CleanNamespaces config: Dist::Zilla::Plugin::Test::CleanNamespaces: filename: xt/author/clean-namespaces.t skips: [] name: Test::CleanNamespaces version: '0.006' - class: Dist::Zilla::Plugin::Test::EOL config: Dist::Zilla::Plugin::Test::EOL: filename: xt/author/eol.t finder: - ':ExecFiles' - ':InstallModules' - ':TestFiles' trailing_whitespace: 1 name: Test::EOL version: '0.19' - class: Dist::Zilla::Plugin::MetaTests name: MetaTests version: '6.031' - class: Dist::Zilla::Plugin::Test::MinimumVersion config: Dist::Zilla::Plugin::Test::MinimumVersion: max_target_perl: ~ name: Test::MinimumVersion version: '2.000010' - class: Dist::Zilla::Plugin::PodSyntaxTests name: PodSyntaxTests version: '6.031' - class: Dist::Zilla::Plugin::Test::Pod::Coverage::Configurable name: Test::Pod::Coverage::Configurable version: '0.07' - class: Dist::Zilla::Plugin::Test::PodSpelling config: Dist::Zilla::Plugin::Test::PodSpelling: directories: - bin - lib spell_cmd: 'aspell list' stopwords: [] wordlist: Pod::Wordlist name: Test::PodSpelling version: '2.007005' - class: Dist::Zilla::Plugin::RunExtraTests config: Dist::Zilla::Role::TestRunner: default_jobs: '8' name: RunExtraTests version: '0.029' - class: Dist::Zilla::Plugin::CheckStrictVersion name: CheckStrictVersion version: '0.001' - class: Dist::Zilla::Plugin::CopyFilesFromBuild name: CopyFilesFromBuild version: '0.170880' - class: Dist::Zilla::Plugin::TestRelease name: TestRelease version: '6.031' - class: Dist::Zilla::Plugin::ConfirmRelease name: ConfirmRelease version: '6.031' - class: Dist::Zilla::Plugin::UploadToCPAN name: UploadToCPAN version: '6.031' - class: Dist::Zilla::Plugin::Git::Push config: Dist::Zilla::Plugin::Git::Push: push_to: - origin remotes_must_exist: 1 Dist::Zilla::Role::Git::Repo: git_version: 2.34.1 repo_root: . name: Git::Push version: '2.049' - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: '6.031' - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: '6.031' - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: '6.031' - class: Dist::Zilla::Plugin::FinderCode name: ':ExtraTestFiles' version: '6.031' - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: '6.031' - class: Dist::Zilla::Plugin::FinderCode name: ':PerlExecFiles' version: '6.031' - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: '6.031' - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: '6.031' - class: Dist::Zilla::Plugin::FinderCode name: ':AllFiles' version: '6.031' - class: Dist::Zilla::Plugin::FinderCode name: ':NoFiles' version: '6.031' - class: Dist::Zilla::Plugin::FinderCode name: MetaProvides::Package/AUTOVIV/:InstallModulesPM version: '6.031' zilla: class: Dist::Zilla::Dist::Builder config: is_trial: '0' version: '6.031' x_contributors: - 'Adam Kennedy ' - 'Adam Sjogren ' - 'Alexandr Ciornii ' - 'Alexey Tourbin ' - 'Alex Kapranoff ' - 'amire80 ' - 'Andreas J. Koenig ' - 'Axel Burri ' - 'Bill Mann ' - 'Bron Gondwana ' - 'Chase Whitener ' - 'Christopher J. Madsen ' - 'cpansprout ' - 'Dan Book ' - 'Daniel Hedlund ' - 'David E. Wheeler ' - 'David Golden ' - 'DAVIDRW ' - 'dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>' - 'Dmitriy Shamatrin ' - 'drieux ' - 'Father Chrysostomos ' - 'FWILES ' - 'Gavin Peters ' - 'Gianni Ceccarelli ' - 'Gisle Aas ' - 'Graeme Thompson ' - 'Hans-H. Froehlich ' - 'Ian Kilgore ' - 'Jacob J ' - 'Jakub Wilk ' - 'jefflee ' - 'JJ Merelo ' - 'john9art ' - 'Jon Jensen ' - 'Karen Etheridge ' - 'Leo Lapworth ' - 'Marin Tsanov ' - 'Mark Stosberg ' - 'Michael G. Schwern ' - 'Mike Schilli ' - 'Mohammad S Anwar ' - 'murphy ' - 'Nicolas R ' - 'Olaf Alders ' - 'Ondrej Hanak ' - 'openstrike ' - 'Peter Rabbitson ' - 'phrstbrn ' - 'Randy Stauner ' - 'Robert Stone ' - 'Rolf Grossmann ' - 'ruff ' - 'sasao ' - 'Sean M. Burke ' - 'Shoichi Kaji ' - 'Slaven Rezic ' - 'Spiros Denaxas ' - 'Steffen Ullrich ' - 'Steve Hay ' - 'Tim Couzins ' - 'Todd Lipcon ' - 'Tom Hukins ' - 'Tony Finch ' - 'Toru Yamaguchi ' - 'uid39246 ' - 'Ville Skyttä ' - 'Yuri Karaban ' - 'Yury Zavarin ' - 'Zefram ' x_generated_by_perl: v5.34.0 x_serialization_backend: 'YAML::Tiny version 1.74' x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later' LWP-Protocol-https-6.14/lib/0000775000175000017500000000000014573454623014256 5ustar olafolafLWP-Protocol-https-6.14/lib/LWP/0000775000175000017500000000000014573454623014720 5ustar olafolafLWP-Protocol-https-6.14/lib/LWP/Protocol/0000775000175000017500000000000014573454623016521 5ustar olafolafLWP-Protocol-https-6.14/lib/LWP/Protocol/https.pm0000644000175000017500000001264514573454623020227 0ustar olafolafpackage LWP::Protocol::https; use strict; use warnings; our $VERSION = '6.14'; use parent qw(LWP::Protocol::http); require Net::HTTPS; sub socket_type { return "https"; } sub _extra_sock_opts { my $self = shift; my %ssl_opts = %{$self->{ua}{ssl_opts} || {}}; if (delete $ssl_opts{verify_hostname}) { $ssl_opts{SSL_verify_mode} ||= 1; $ssl_opts{SSL_verifycn_scheme} = 'www'; } else { if ( $Net::HTTPS::SSL_SOCKET_CLASS eq 'Net::SSL' ) { $ssl_opts{SSL_verifycn_scheme} = ''; } else { $ssl_opts{SSL_verifycn_scheme} = 'none'; } } if ($ssl_opts{SSL_verify_mode}) { unless (exists $ssl_opts{SSL_ca_file} || exists $ssl_opts{SSL_ca_path}) { if ($Net::HTTPS::SSL_SOCKET_CLASS eq 'IO::Socket::SSL' && defined &IO::Socket::SSL::default_ca && IO::Socket::SSL::default_ca() ) { # IO::Socket::SSL has a usable default CA } elsif ( my $cafile = eval { require Mozilla::CA; Mozilla::CA::SSL_ca_file() }) { # use Mozilla::CA $ssl_opts{SSL_ca_file} = $cafile; } else { die <<'EOT'; Can't verify SSL peers without knowing which Certificate Authorities to trust. This problem can be fixed by either setting the PERL_LWP_SSL_CA_FILE environment variable to the file where your trusted CA are, or by installing the Mozilla::CA module for set of commonly trusted CAs. To completely disable the verification that you talk to the correct SSL peer you can set SSL_verify_mode to 0 within ssl_opts. But, if you do this you can't be sure that you communicate with the expected peer. EOT } } } $self->{ssl_opts} = \%ssl_opts; return (%ssl_opts, MultiHomed => 1, $self->SUPER::_extra_sock_opts); } # This is a subclass of LWP::Protocol::http. # That parent class calls ->_check_sock() during the # request method. This allows us to hook in and run checks # sub _check_sock # { # my($self, $req, $sock) = @_; # } sub _get_sock_info { my $self = shift; $self->SUPER::_get_sock_info(@_); my($res, $sock) = @_; if ($sock->can('get_sslversion') and my $sslversion = $sock->get_sslversion) { $res->header("Client-SSL-Version" => $sslversion); } $res->header("Client-SSL-Cipher" => $sock->get_cipher); my $cert = $sock->get_peer_certificate; if ($cert) { $res->header("Client-SSL-Cert-Subject" => $cert->subject_name); $res->header("Client-SSL-Cert-Issuer" => $cert->issuer_name); } if (!$self->{ssl_opts}{SSL_verify_mode}) { $res->push_header("Client-SSL-Warning" => "Peer certificate not verified"); } elsif (!$self->{ssl_opts}{SSL_verifycn_scheme}) { $res->push_header("Client-SSL-Warning" => "Peer hostname match with certificate not verified"); } $res->header("Client-SSL-Socket-Class" => $Net::HTTPS::SSL_SOCKET_CLASS); } # upgrade plain socket to SSL, used for CONNECT tunnel when proxying https # will only work if the underlying socket class of Net::HTTPS is # IO::Socket::SSL, but code will only be called in this case if ( $Net::HTTPS::SSL_SOCKET_CLASS->can('start_SSL')) { *_upgrade_sock = sub { my ($self,$sock,$url) = @_; # SNI should be passed there only if it is not an IP address. # Details: https://github.com/libwww-perl/libwww-perl/issues/449#issuecomment-1896175509 my $host = $url->host() =~ m/:|^[\d.]+$/s ? undef : $url->host(); $sock = LWP::Protocol::https::Socket->start_SSL( $sock, SSL_verifycn_name => $url->host, SSL_hostname => $host, $self->_extra_sock_opts, ); $@ = LWP::Protocol::https::Socket->errstr if ! $sock; return $sock; } } #----------------------------------------------------------- package LWP::Protocol::https::Socket; use parent -norequire, qw(Net::HTTPS LWP::Protocol::http::SocketMethods); 1; __END__ =head1 NAME LWP::Protocol::https - Provide https support for LWP::UserAgent =head1 SYNOPSIS use 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 URLs with LWP. This module is a plug-in to the LWP protocol handling, so you don't use it directly. Once the module is installed LWP is able to access sites using HTTP over SSL/TLS. If hostname verification is requested by LWP::UserAgent's C, and neither C nor C is set, then C is implied to be the one provided by L. If the Mozilla::CA module isn't available SSL requests will fail. Either install this module, set up an alternative C or disable hostname verification. This module used to be bundled with the libwww-perl, 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. =head1 SEE ALSO L, L, L =head1 COPYRIGHT & LICENSE Copyright (c) 1997-2011 Gisle Aas. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut LWP-Protocol-https-6.14/Changes0000644000175000017500000000665414573454623015014 0ustar olafolafRelease history for LWP-Protocol-https 6.14 2024-03-11 01:08:33Z - Inherit with 'use parent' instead of 'use base' (GH#78) (Marin Tsanov) 6.13 2024-02-06 01:00:50Z - Fix ssl upgrade for regular host names (GH#77) (Axel Burri) 6.12 2024-01-22 17:51:31Z - Enable MultiHomed for IO::Socket::SSL (GH#61) (ℕicolas ℝ.) - Making it possible to use IPv6 in https call through https proxy environment (in case of using CONNECT method to create a tunnel) (GH#74) (Dmitriy Shamatrin) 6.11 2023-07-09 15:10:30Z - Remove Authority section from dist.ini (GH#64) (Olaf Alders) - Add very basic diagnostic information via test (GH#73) (Olaf Alders) - CVE-2014-3230 - don't disable verification if only hostnames should not (GH#14) (Steffen Ullrich) - Make explicit requirement of Mozilla::CA obsolete (GH#72) (Steffen Ullrich and Olaf Alders) - Remove _in_san and _cn_match. Empty out the _check_sock hook (GH#71) (Chase Whitener) - Use warnings (GH#69) (Pete Houston) 6.10 2020-12-17 15:42:06Z - Fix #39 - prevent user env from breaking the test (GH#63) (Gianni Ceccarelli) - Include Net::SSLeay in reported prereqs (GH#60) (Olaf Alders) - Use GitHub as a bug tracker (GH#59) (Olaf Alders) 6.09 2020-07-16 13:33:05Z - Make available the version of SSL/TLS protocol used in the connection (GH#56) (Jon Jensen) 6.08 2020-03-23 20:19:22Z (TRIAL RELEASE) - Add defined check (GH#53) (Mohammad S Anwar) - Fix copyright year (GH#55) (Olaf Alders) - Upgrade Mozilla::CA dependency; originally #26 by dolmen (GH#54) (Shoichi Kaji) - Adds coverage tests (GH#51) (Juan Julin Merelo Guervs) - Migrated to DZil (GH PR#30) - Moved bug tracking from RT to GitHub (GH#48) (Olaf Alders) 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.