From 9b77c053e8fd03348ed04ba09ceaaf7ba99ca6f6 Mon Sep 17 00:00:00 2001 From: Timo Teras Date: Wed, 22 Jul 2009 19:56:13 +0300 Subject: pkg: cleanup the signing code smaller callback and less cases to check. also reintroduce the oneshot digest flag, hopefully correct this time. --- src/verify.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/verify.c') diff --git a/src/verify.c b/src/verify.c index 1edf4e7..05ded17 100644 --- a/src/verify.c +++ b/src/verify.c @@ -20,6 +20,7 @@ static int verify_main(void *ctx, int argc, char **argv) struct apk_istream *is; int i, r, ok, rc = 0; + apk_flags |= APK_ALLOW_UNTRUSTED; for (i = 0; i < argc; i++) { apk_sign_ctx_init(&sctx, APK_SIGN_VERIFY, NULL); is = apk_bstream_gunzip_mpart(apk_bstream_from_file(argv[i]), @@ -28,7 +29,7 @@ static int verify_main(void *ctx, int argc, char **argv) is->close(is); ok = sctx.control_verified && sctx.data_verified; if (apk_verbosity >= 1) - apk_message("%s: %s", argv[i], + apk_message("%s: %d - %s", argv[i], r, ok ? "OK" : sctx.data_verified ? "UNTRUSTED" : "FAILED"); if (!ok) -- cgit v1.2.3-60-g2f50