Commit 1f9e56d8 authored by Reid Rankin's avatar Reid Rankin Committed by Timo Teräs

manifest: fix package file processing

This change ensures that apk_sign_ctx_process_file() and
apk_sign_ctx_parse_pkginfo_line() are called during archive
processing, allowing discovery of signatures and the data section

Fixes a bug uncovered by commit f123d77e.
parent 67696b2a
Pipeline #5977 passed with stage
in 1 minute and 9 seconds
......@@ -64,11 +64,14 @@ static int read_file_entry(void *ctx, const struct apk_file_info *ae,
struct manifest_file_ctx *mctx = ctx;
char csum_buf[(APK_CHECKSUM_SHA1 * 2) + 1];
apk_blob_t csum_blob = APK_BLOB_BUF(csum_buf);
int r;
if (ae->name[0] == '.') {
if (!strncmp(ae->name, ".PKGINFO", 8) || !strncmp(ae->name, ".SIGN.", 6))
return 0;
r = apk_sign_ctx_verify_tar(mctx->sctx, ae, is);
if (r != 0)
return r;
if (!mctx->sctx->data_started)
return 0;
if ((ae->mode & S_IFMT) != S_IFREG)
return 0;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment