summaryrefslogtreecommitdiffstats
path: root/verifier_test.cpp
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2013-05-14 20:03:02 +0200
committerDoug Zongker <dougz@android.com>2013-05-16 19:47:02 +0200
commit596b342a0476629badb41b840494254a19c57dae (patch)
tree3aab0c59d51a4a5bef461a476f635ee51bbf3495 /verifier_test.cpp
parentMerge "verifier: update to support certificates using SHA-256" (diff)
downloadandroid_bootable_recovery-596b342a0476629badb41b840494254a19c57dae.tar
android_bootable_recovery-596b342a0476629badb41b840494254a19c57dae.tar.gz
android_bootable_recovery-596b342a0476629badb41b840494254a19c57dae.tar.bz2
android_bootable_recovery-596b342a0476629badb41b840494254a19c57dae.tar.lz
android_bootable_recovery-596b342a0476629badb41b840494254a19c57dae.tar.xz
android_bootable_recovery-596b342a0476629badb41b840494254a19c57dae.tar.zst
android_bootable_recovery-596b342a0476629badb41b840494254a19c57dae.zip
Diffstat (limited to 'verifier_test.cpp')
-rw-r--r--verifier_test.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/verifier_test.cpp b/verifier_test.cpp
index 7fab54748..1063cbae5 100644
--- a/verifier_test.cpp
+++ b/verifier_test.cpp
@@ -18,6 +18,7 @@
#include <stdlib.h>
#include <stdarg.h>
+#include "common.h"
#include "verifier.h"
#include "ui.h"
#include "mincrypt/sha.h"
@@ -115,13 +116,10 @@ class FakeUI : public RecoveryUI {
bool IsTextVisible() { return false; }
bool WasTextEverVisible() { return false; }
void Print(const char* fmt, ...) {
- char buf[256];
va_list ap;
va_start(ap, fmt);
- vsnprintf(buf, 256, fmt, ap);
+ vfprintf(stderr, fmt, ap);
va_end(ap);
-
- fputs(buf, stderr);
}
void StartMenu(const char* const * headers, const char* const * items,
@@ -130,6 +128,14 @@ class FakeUI : public RecoveryUI {
void EndMenu() { }
};
+void
+ui_print(const char* format, ...) {
+ va_list ap;
+ va_start(ap, format);
+ vfprintf(stdout, format, ap);
+ va_end(ap);
+}
+
int main(int argc, char **argv) {
if (argc < 2 || argc > 4) {
fprintf(stderr, "Usage: %s [-sha256] [-f4 | -file <keys>] <package>\n", argv[0]);