Loading lib/mk-ca-bundle.pl +21 −30 Original line number Diff line number Diff line Loading @@ -234,9 +234,8 @@ sub sha1 { sub oldsha1 { my ($crt)=@_; my $sha1 = ""; open(C, "<$crt") || return 0; open(C, "<$_[0]") || return 0; while(<C>) { chomp; if($_ =~ /^\#\# SHA1: (.*)/) { Loading Loading @@ -286,21 +285,13 @@ print STDERR "Downloading '$txt' ...\n" if (!$opt_q); if($curl && !$opt_n) { my $https = $url; $https =~ s/^http:/https:/; printf "Get certdata over HTTPS with curl!\n", $https; print STDERR "Get certdata over HTTPS with curl!\n" if (!$opt_q); my $quiet = $opt_q ? "-s" : ""; my @out = `curl -w %{response_code} $quiet -O $https`; my $code = 0; if(@out) { $code = $out[0]; } if($code == 200) { if(@out && $out[0] == 200) { $fetched = 1; } else { print STDERR "Failed downloading HTTPS with curl, trying HTTP with LWP\n" unless $opt_q; } else { print STDERR "Failed downloading HTTPS with curl, trying HTTP with LWP\n" if (!$opt_q); } } Loading Loading
lib/mk-ca-bundle.pl +21 −30 Original line number Diff line number Diff line Loading @@ -234,9 +234,8 @@ sub sha1 { sub oldsha1 { my ($crt)=@_; my $sha1 = ""; open(C, "<$crt") || return 0; open(C, "<$_[0]") || return 0; while(<C>) { chomp; if($_ =~ /^\#\# SHA1: (.*)/) { Loading Loading @@ -286,21 +285,13 @@ print STDERR "Downloading '$txt' ...\n" if (!$opt_q); if($curl && !$opt_n) { my $https = $url; $https =~ s/^http:/https:/; printf "Get certdata over HTTPS with curl!\n", $https; print STDERR "Get certdata over HTTPS with curl!\n" if (!$opt_q); my $quiet = $opt_q ? "-s" : ""; my @out = `curl -w %{response_code} $quiet -O $https`; my $code = 0; if(@out) { $code = $out[0]; } if($code == 200) { if(@out && $out[0] == 200) { $fetched = 1; } else { print STDERR "Failed downloading HTTPS with curl, trying HTTP with LWP\n" unless $opt_q; } else { print STDERR "Failed downloading HTTPS with curl, trying HTTP with LWP\n" if (!$opt_q); } } Loading