Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tools/gen_ota_zip.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,15 +337,16 @@ def gen_full_sh(path_list, bin_list, args, tmp_folder):
for i in range(len(verify_list)):
str = \
'''
avb_verify -U /ota/%s %s /etc/key.avb
echo "verify %s"%s
time "avb_verify -U /ota/%s %s /etc/key.avb"
if [ $? -ne 0 ]
then
echo "Check %s version failed!"%s
setprop ota.progress.current -1
reboot
fi
setprop ota.progress.current %d
''' % (verify_list[i], verify_path[i], verify_list[i], args.otalog, verify_progress_list[i])
''' % (verify_list[i], args.otalog, verify_list[i], verify_path[i], verify_list[i], args.otalog, verify_progress_list[i])
str += 'setprop ota.progress.next %d\n' % ( verify_progress_list[i + 1] if i + 1 < len(verify_list) else ota_progress_list[0])
fd.write(str)

Expand Down
3 changes: 2 additions & 1 deletion verify/zip_verify.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ static int verify_signature(data_block_t* pubkey, data_block_t* raw_data, data_b
avb_sha256_update(
&sha256_ctx, raw_data->data, raw_data->length);
computed_hash = avb_sha256_final(&sha256_ctx);
assert_res(computed_hash != NULL, "Calculating MD failed!");

res = !avb_rsa_verify(pubkey->data, pubkey->length,
signature->data, signature->length,
Expand Down Expand Up @@ -414,7 +415,7 @@ static int verify_app(const char* app_path, const char* cert_path, size_t commen
res = verify_signature(&avbkey, &signature_info.signed_data,
&signature_info.signatures_content);
free(avbkey.data);
assert_res(res == 0);
assert_res(res == 0, "Verify signature failed!");

// Compare whether the app summary is consistent with the signature block summary
res = verify_digest(app_path, app_block, &signature_info.one_digest);
Expand Down
Loading