From e3cca288ad5851b4f4860c0bdecd746a4b94c1f8 Mon Sep 17 00:00:00 2001 From: Steven Chamberlain Date: Fri, 31 Jul 2015 19:44:59 +0100 Subject: [PATCH] Require https for f-droid.org prebuilt downloads When fetching prebuilt binaries from f-droid.org, we were using http, but are now redirected to a https URI - unless a MITM attacker gets there first... Change to unconditionally use https to fetch prebuilt binaries. While here, set -e so that failure to download any file is not ignored. --- get-prebuilts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/get-prebuilts b/get-prebuilts index d18730b1..df87fa6b 100755 --- a/get-prebuilts +++ b/get-prebuilts @@ -1,12 +1,13 @@ #!/bin/sh +set -e BASEDIR=$( dirname $0 ) mkdir -p $BASEDIR/prebuilt/common/apps/ # F-Droid -curl -L -o $BASEDIR/prebuilt/common/apps/FDroid.apk -O -L http://f-droid.org/FDroid.apk +curl -L -o $BASEDIR/prebuilt/common/apps/FDroid.apk -O -L https://f-droid.org/FDroid.apk # Terminal Emulator -curl -L -o $BASEDIR/prebuilt/common/apps/TerminalEmulator.apk -O -L http://f-droid.org/repo/jackpal.androidterm_71.apk +curl -L -o $BASEDIR/prebuilt/common/apps/TerminalEmulator.apk -O -L https://f-droid.org/repo/jackpal.androidterm_71.apk unzip -o -d $BASEDIR/prebuilt/common/apps/ $BASEDIR/prebuilt/common/apps/TerminalEmulator.apk lib/armeabi/libjackpal-termexec2.so lib/armeabi/libjackpal-androidterm5.so