Lines Matching refs:pre

385 	struct vb2_fw_preamble *pre;  in test_verify_fw_preamble()  local
417 TEST_SUCC(vb2_fw_preamble_create(&pre, prikhash, in test_verify_fw_preamble()
422 buf = (uint8_t *)pre; in test_verify_fw_preamble()
423 buf_size = pre->c.total_size; in test_verify_fw_preamble()
430 pre = (struct vb2_fw_preamble *)buf; in test_verify_fw_preamble()
432 TEST_SUCC(vb2_verify_fw_preamble(pre, buf_size, &pubk, &wb), in test_verify_fw_preamble()
436 pre->c.magic = VB2_MAGIC_PACKED_KEY; in test_verify_fw_preamble()
437 TEST_EQ(vb2_verify_fw_preamble(pre, buf_size, &pubk, &wb), in test_verify_fw_preamble()
442 pre->c.fixed_size++; in test_verify_fw_preamble()
443 TEST_EQ(vb2_verify_fw_preamble(pre, buf_size, &pubk, &wb), in test_verify_fw_preamble()
448 pre->c.struct_version_major++; in test_verify_fw_preamble()
449 TEST_EQ(vb2_verify_fw_preamble(pre, buf_size, &pubk, &wb), in test_verify_fw_preamble()
454 pre->c.struct_version_minor++; in test_verify_fw_preamble()
456 vb2_sign_data(&sig, buf, pre->sig_offset, prikhash, NULL); in test_verify_fw_preamble()
457 memcpy(buf + pre->sig_offset, sig, sig->c.total_size); in test_verify_fw_preamble()
459 TEST_SUCC(vb2_verify_fw_preamble(pre, buf_size, &pubk, &wb), in test_verify_fw_preamble()
463 pre->c.fixed_size -= 4; in test_verify_fw_preamble()
464 pre->c.desc_size += 4; in test_verify_fw_preamble()
465 TEST_EQ(vb2_verify_fw_preamble(pre, buf_size, &pubk, &wb), in test_verify_fw_preamble()
470 sig = (struct vb2_signature *)(buf + pre->hash_offset); in test_verify_fw_preamble()
471 sig->c.total_size += pre->c.total_size; in test_verify_fw_preamble()
472 TEST_EQ(vb2_verify_fw_preamble(pre, buf_size, &pubk, &wb), in test_verify_fw_preamble()
477 sig = (struct vb2_signature *)(buf + pre->hash_offset); in test_verify_fw_preamble()
479 TEST_EQ(vb2_verify_fw_preamble(pre, buf_size, &pubk, &wb), in test_verify_fw_preamble()
484 pre->hash_count++; in test_verify_fw_preamble()
485 TEST_EQ(vb2_verify_fw_preamble(pre, buf_size, &pubk, &wb), in test_verify_fw_preamble()
490 sig = (struct vb2_signature *)(buf + pre->sig_offset); in test_verify_fw_preamble()
492 TEST_EQ(vb2_verify_fw_preamble(pre, buf_size, &pubk, &wb), in test_verify_fw_preamble()
497 sig = (struct vb2_signature *)(buf + pre->sig_offset); in test_verify_fw_preamble()
498 buf[pre->sig_offset + sig->sig_offset]++; in test_verify_fw_preamble()
499 TEST_EQ(vb2_verify_fw_preamble(pre, buf_size, &pubk, &wb), in test_verify_fw_preamble()
504 pre->flags++; in test_verify_fw_preamble()
505 TEST_EQ(vb2_verify_fw_preamble(pre, buf_size, &pubk, &wb), in test_verify_fw_preamble()