diff options
author | Jay Satiro <raysatiro@yahoo.com> | 2017-06-16 01:58:23 -0400 |
---|---|---|
committer | Jay Satiro <raysatiro@yahoo.com> | 2017-06-16 01:58:23 -0400 |
commit | ec92afc3f4b2ecdd26b01b6a59e8fbddd5783e67 (patch) | |
tree | 0c35df40f6594380e8336460246388fb38dc3505 /lib/mk-ca-bundle.pl | |
parent | 615326fd99b40607ab2bc28e2274e5f61e9928e9 (diff) | |
download | curl-ec92afc3f4b2ecdd26b01b6a59e8fbddd5783e67.tar.gz |
mk-ca-bundle.pl: Check curl's exit code after certdata download
- No longer allow partial downloads of certdata.
Prior to this change partial downloads were (erroneously?) allowed since
only the server code was checked to be 200.
Bug: https://github.com/curl/curl/pull/1577
Reported-by: Matteo B.
Diffstat (limited to 'lib/mk-ca-bundle.pl')
-rwxr-xr-x | lib/mk-ca-bundle.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/mk-ca-bundle.pl b/lib/mk-ca-bundle.pl index 9574f1dbf..cc36c7680 100755 --- a/lib/mk-ca-bundle.pl +++ b/lib/mk-ca-bundle.pl @@ -310,7 +310,7 @@ if(!$opt_n) { my $proto = !$opt_k ? "--proto =https" : ""; my $quiet = $opt_q ? "-s" : ""; my @out = `curl -w %{response_code} $proto $quiet -o "$txt" "$url"`; - if(@out && $out[0] == 200) { + if(!$? && @out && $out[0] == 200) { $fetched = 1; report "Downloaded $txt"; } |