cURL: install ca-bundle.crt, too
[msysgit/mtrensch.git] / src / curl / patches / 0001-Eat-own-dog-food-use-cURL-to-download-CAs.patch
blob4c4ce01ae8c6889cb9a7e3abc3dd9cf967ed569a
1 From d3c9aec4f963fb70e5d30f4498b76925d3c5b194 Mon Sep 17 00:00:00 2001
2 From: Johannes Schindelin <johannes.schindelin@gmx.de>
3 Date: Sat, 25 Jul 2009 17:36:51 +0200
4 Subject: [PATCH] Eat own dog food: use cURL to download CAs
6 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
7 ---
8 lib/mk-ca-bundle.pl | 14 +-------------
9 1 files changed, 1 insertions(+), 13 deletions(-)
11 diff --git a/lib/mk-ca-bundle.pl b/lib/mk-ca-bundle.pl
12 index c964efe..83fc5ef 100644
13 --- a/lib/mk-ca-bundle.pl
14 +++ b/lib/mk-ca-bundle.pl
15 @@ -33,7 +33,6 @@
17 use Getopt::Std;
18 use MIME::Base64;
19 -use LWP::UserAgent;
20 use strict;
21 use vars qw($opt_b $opt_h $opt_i $opt_l $opt_n $opt_q $opt_t $opt_u $opt_v);
23 @@ -52,8 +51,6 @@ if ($opt_i) {
24 print "Operating System Name : $^O\n";
25 print "Getopt::Std.pm Version : ${Getopt::Std::VERSION}\n";
26 print "MIME::Base64.pm Version : ${MIME::Base64::VERSION}\n";
27 - print "LWP::UserAgent.pm Version : ${LWP::UserAgent::VERSION}\n";
28 - print "LWP.pm Version : ${LWP::VERSION}\n";
29 print ("=" x 78 . "\n");
32 @@ -78,16 +75,7 @@ $txt =~ s/\?.*//;
34 if (!$opt_n || !-e $txt) {
35 print "Downloading '$txt' ...\n" if (!$opt_q);
36 - my $ua = new LWP::UserAgent(agent => "$0/$version");
37 - my $req = new HTTP::Request('GET', $url);
38 - my $res = $ua->request($req);
39 - if ($res->is_success) {
40 - open(TXT,">$txt") or die "Couldn't open $txt: $!";
41 - print TXT $res->content . "\n";
42 - close(TXT) or die "Couldn't close $txt: $!";
43 - } else {
44 - die $res->status_line;
45 - }
46 + `curl $url > $txt`;
49 if ($opt_b && -e $crt) {
50 --
51 1.6.3.2.1299.gee46c