summaryrefslogtreecommitdiff
path: root/src/verify.c
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-07-22 19:56:13 +0300
committerTimo Teras <timo.teras@iki.fi>2009-07-22 19:56:13 +0300
commit9b77c053e8fd03348ed04ba09ceaaf7ba99ca6f6 (patch)
tree8c10909550b31d026626879bf644ac346f194056 /src/verify.c
parent9b63730d848677672aaa4606a28de4fc17da1dcb (diff)
downloadapk-tools-9b77c053e8fd03348ed04ba09ceaaf7ba99ca6f6.tar.gz
apk-tools-9b77c053e8fd03348ed04ba09ceaaf7ba99ca6f6.tar.bz2
apk-tools-9b77c053e8fd03348ed04ba09ceaaf7ba99ca6f6.tar.xz
apk-tools-9b77c053e8fd03348ed04ba09ceaaf7ba99ca6f6.zip
pkg: cleanup the signing code
smaller callback and less cases to check. also reintroduce the oneshot digest flag, hopefully correct this time.
Diffstat (limited to 'src/verify.c')
-rw-r--r--src/verify.c3
1 files changed, 2 insertions, 1 deletions
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)