Commit ec92afc3 authored by Jay Satiro's avatar Jay Satiro
Browse files

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.
parent 615326fd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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";
        }