aboutsummaryrefslogtreecommitdiffstats
path: root/verifier_test.sh
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2012-07-25 13:10:58 -0700
committerChirayu Desai <cdesai@cyanogenmod.org>2013-05-25 19:56:13 +0530
commitcc5591a83af14c5274065c219af54a995557ce5c (patch)
treebcdde214c061b32416253a18312605d02004de02 /verifier_test.sh
parent7efb8bde978b62d1f96b08c26bdffab86502ae63 (diff)
downloadbootable_recovery-cc5591a83af14c5274065c219af54a995557ce5c.zip
bootable_recovery-cc5591a83af14c5274065c219af54a995557ce5c.tar.gz
bootable_recovery-cc5591a83af14c5274065c219af54a995557ce5c.tar.bz2
support version 2 (2048-bit e=65537) keys in recovery
Signed-off-by: Chirayu Desai <cdesai@cyanogenmod.org> Change-Id: I9849c69777d513bb12926c8c622d1c12d2da568a
Diffstat (limited to 'verifier_test.sh')
-rwxr-xr-xverifier_test.sh23
1 files changed, 17 insertions, 6 deletions
diff --git a/verifier_test.sh b/verifier_test.sh
index 6350e80..378b0e5 100755
--- a/verifier_test.sh
+++ b/verifier_test.sh
@@ -1,11 +1,7 @@
#!/bin/bash
#
-# A test suite for applypatch. Run in a client where you have done
-# envsetup, choosecombo, etc.
-#
-# DO NOT RUN THIS ON A DEVICE YOU CARE ABOUT. It will mess up your
-# system partition.
-#
+# A test suite for recovery's package signature verifier. Run in a
+# client where you have done envsetup, lunch, etc.
#
# TODO: find some way to get this run regularly along with the rest of
# the tests.
@@ -77,9 +73,24 @@ expect_fail() {
run_command $WORK_DIR/verifier_test $WORK_DIR/package.zip && fail
}
+expect_succeed_f4() {
+ testname "$1 (should succeed)"
+ $ADB push $DATA_DIR/$1 $WORK_DIR/package.zip
+ run_command $WORK_DIR/verifier_test -f4 $WORK_DIR/package.zip || fail
+}
+
+expect_fail_f4() {
+ testname "$1 (should fail)"
+ $ADB push $DATA_DIR/$1 $WORK_DIR/package.zip
+ run_command $WORK_DIR/verifier_test -f4 $WORK_DIR/package.zip && fail
+}
+
expect_fail unsigned.zip
expect_fail jarsigned.zip
expect_succeed otasigned.zip
+expect_fail_f4 otasigned.zip
+expect_succeed_f4 otasigned_f4.zip
+expect_fail otasigned_f4.zip
expect_fail random.zip
expect_fail fake-eocd.zip
expect_fail alter-metadata.zip