Skip avb 1,0 verify if tail contains avb 2.0 header

This way, magiskboot will not print "unexpected ASN.1 DER tag: expected SEQUENCE, got APPLICATION [1] (primitive)".
This commit is contained in:
5ec1cff 2025-07-20 16:02:11 +08:00 committed by John Wu
parent cd9851a1fe
commit a54bdb54e4

View File

@ -523,10 +523,8 @@ bool boot_img::parse_image(const uint8_t *p, FileFormat type) {
} else if (tail.sz() >= 16 && BUFFER_MATCH(tail.buf(), LG_BUMP_MAGIC)) {
fprintf(stderr, "LG_BUMP_IMAGE\n");
flags[LG_BUMP_FLAG] = true;
}
// Check if the image is signed
if (verify()) {
} else if (!(tail.sz() >= 4 && BUFFER_MATCH(tail.buf(), AVB_MAGIC)) && verify()) {
// Check if the image is avb 1.0 signed
fprintf(stderr, "AVB1_SIGNED\n");
flags[AVB1_SIGNED_FLAG] = true;
}