Skip to content
Snippets Groups Projects
Commit de281f0f authored by Timo Teräs's avatar Timo Teräs
Browse files

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.
parent 25c152e6
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment