summaryrefslogtreecommitdiffstats
path: root/verifier_test.cpp
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2012-11-02 23:04:05 +0100
committerDoug Zongker <dougz@android.com>2012-11-02 23:09:57 +0100
commit6c249f7ae890694f061bfde7a3ab52bf367be110 (patch)
tree15652db30bd69d6ee35210f48e65943767958003 /verifier_test.cpp
parentreduce some recovery logging (diff)
downloadandroid_bootable_recovery-6c249f7ae890694f061bfde7a3ab52bf367be110.tar
android_bootable_recovery-6c249f7ae890694f061bfde7a3ab52bf367be110.tar.gz
android_bootable_recovery-6c249f7ae890694f061bfde7a3ab52bf367be110.tar.bz2
android_bootable_recovery-6c249f7ae890694f061bfde7a3ab52bf367be110.tar.lz
android_bootable_recovery-6c249f7ae890694f061bfde7a3ab52bf367be110.tar.xz
android_bootable_recovery-6c249f7ae890694f061bfde7a3ab52bf367be110.tar.zst
android_bootable_recovery-6c249f7ae890694f061bfde7a3ab52bf367be110.zip
Diffstat (limited to '')
-rw-r--r--verifier_test.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/verifier_test.cpp b/verifier_test.cpp
index 01d092680..79c55783d 100644
--- a/verifier_test.cpp
+++ b/verifier_test.cpp
@@ -129,21 +129,26 @@ class FakeUI : public RecoveryUI {
};
int main(int argc, char **argv) {
- if (argc != 2 && argc != 3) {
- fprintf(stderr, "Usage: %s [-f4] <package>\n", argv[0]);
+ if (argc < 2 || argc > 4) {
+ fprintf(stderr, "Usage: %s [-f4 | -file <keys>] <package>\n", argv[0]);
return 2;
}
RSAPublicKey* key = &test_key;
+ int num_keys = 1;
++argv;
if (strcmp(argv[0], "-f4") == 0) {
++argv;
key = &test_f4_key;
+ } else if (strcmp(argv[0], "-file") == 0) {
+ ++argv;
+ key = load_keys(argv[0], &num_keys);
+ ++argv;
}
ui = new FakeUI();
- int result = verify_file(*argv, key, 1);
+ int result = verify_file(*argv, key, num_keys);
if (result == VERIFY_SUCCESS) {
printf("SUCCESS\n");
return 0;