aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Satiro <raysatiro@yahoo.com>2017-06-16 01:58:23 -0400
committerJay Satiro <raysatiro@yahoo.com>2017-06-16 01:58:23 -0400
commitec92afc3f4b2ecdd26b01b6a59e8fbddd5783e67 (patch)
tree0c35df40f6594380e8336460246388fb38dc3505
parent615326fd99b40607ab2bc28e2274e5f61e9928e9 (diff)
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.
-rwxr-xr-xlib/mk-ca-bundle.pl2
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";
}