diff options
author | Timo Teräs <timo.teras@iki.fi> | 2021-11-15 15:39:38 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2021-11-15 15:41:59 +0200 |
commit | de281f0f8379f1a22306ceb44c54b97a04254c1e (patch) | |
tree | 300a8a325614824c0bad4f6b176126b31674abe9 /src/extract_v2.c | |
parent | 25c152e653018d487aa7c79cef2538e3980a5544 (diff) | |
download | apk-tools-de281f0f8379f1a22306ceb44c54b97a04254c1e.tar.gz apk-tools-de281f0f8379f1a22306ceb44c54b97a04254c1e.tar.bz2 apk-tools-de281f0f8379f1a22306ceb44c54b97a04254c1e.tar.xz apk-tools-de281f0f8379f1a22306ceb44c54b97a04254c1e.zip |
extract_v2: handle "untrusted package" as normal error
The "untrusted" error is higher priority than malformed package.
But given that we expect valid .apk or index as argument, the
untrusted error is likely more accurate than having malformed
package.
Diffstat (limited to 'src/extract_v2.c')
-rw-r--r-- | src/extract_v2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/extract_v2.c b/src/extract_v2.c index e3229de..f75c553 100644 --- a/src/extract_v2.c +++ b/src/extract_v2.c @@ -356,7 +356,7 @@ int apk_extract_v2(struct apk_extract_ctx *ectx, struct apk_istream *is) apk_istream_gunzip_mpart(is, apk_sign_ctx_mpart_cb, &sctx), apk_extract_v2_entry, ectx, apk_ctx_get_id_cache(ac)); if (r == -ECANCELED) r = 0; - if ((r == 0 || r == -APKE_SIGNATURE_UNTRUSTED || r == -APKE_EOF) && !ectx->is_package && !ectx->is_index) + if ((r == 0 || r == -APKE_EOF) && !ectx->is_package && !ectx->is_index) r = ectx->ops->v2index ? -APKE_V2NDX_FORMAT : -APKE_V2PKG_FORMAT; if (ectx->generate_identity) *ectx->identity = sctx.identity; apk_sign_ctx_free(&sctx); |