various: fix installation of new style apks
parent
2345548e45
commit
772e4aa26a
|
@ -93,7 +93,7 @@ static size_t tar_entry_read(void *stream, void *ptr, size_t size)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
teis->bytes_left -= size;
|
teis->bytes_left -= size;
|
||||||
if (teis->csum != NULL)
|
if (teis->csum == NULL)
|
||||||
return size;
|
return size;
|
||||||
|
|
||||||
EVP_DigestUpdate(&teis->mdctx, ptr, size);
|
EVP_DigestUpdate(&teis->mdctx, ptr, size);
|
||||||
|
|
|
@ -1284,8 +1284,7 @@ static int apk_db_install_archive_entry(void *_ctx,
|
||||||
const char *p;
|
const char *p;
|
||||||
int r = 0, type = APK_SCRIPT_INVALID;
|
int r = 0, type = APK_SCRIPT_INVALID;
|
||||||
|
|
||||||
if (apk_sign_ctx_process_file(&ctx->sctx, ae, is) == 0)
|
apk_sign_ctx_verify_tar(&ctx->sctx, ae, is);
|
||||||
return 0;
|
|
||||||
|
|
||||||
/* Package metainfo and script processing */
|
/* Package metainfo and script processing */
|
||||||
if (ae->name[0] == '.') {
|
if (ae->name[0] == '.') {
|
||||||
|
|
|
@ -330,7 +330,8 @@ int apk_sign_ctx_process_file(struct apk_sign_ctx *ctx,
|
||||||
ctx->num_signatures++;
|
ctx->num_signatures++;
|
||||||
|
|
||||||
/* Found already a trusted key */
|
/* Found already a trusted key */
|
||||||
if (ctx->signature.pkey != NULL)
|
if (ctx->action != APK_SIGN_VERIFY ||
|
||||||
|
ctx->signature.pkey != NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (strncmp(&fi->name[6], "RSA.", 4) == 0 ||
|
if (strncmp(&fi->name[6], "RSA.", 4) == 0 ||
|
||||||
|
|
Loading…
Reference in New Issue