Lines Matching refs:sig
220 struct vb2_signature *sig; in test_verify_hash() local
235 TEST_SUCC(vb2_sign_data(&sig, test_data, sizeof(test_data), prik, NULL), in test_verify_hash()
239 sig, &pubk, &wb), in test_verify_hash()
242 *((uint8_t *)sig + sig->sig_offset) ^= 0xab; in test_verify_hash()
243 TEST_EQ(vb2_verify_data(test_data, sizeof(test_data), sig, &pubk, &wb), in test_verify_hash()
246 free(sig); in test_verify_hash()
257 struct vb2_signature *sig; in test_verify_keyblock() local
325 vb2_sign_data(&sig, buf, kbuf->sig_offset, prik[0], NULL); in test_verify_keyblock()
326 memcpy(buf + kbuf->sig_offset, sig, sig->c.total_size); in test_verify_keyblock()
327 free(sig); in test_verify_keyblock()
345 sig = (struct vb2_signature *)(buf + kbuf->sig_offset); in test_verify_keyblock()
346 sig->data_size--; in test_verify_keyblock()
352 sig = (struct vb2_signature *)(buf + kbuf->sig_offset); in test_verify_keyblock()
353 sig->c.total_size = kbuf->c.total_size - 4; in test_verify_keyblock()
359 sig = (struct vb2_signature *)(buf + kbuf->sig_offset); in test_verify_keyblock()
360 sig->c.struct_version_major++; in test_verify_keyblock()
384 struct vb2_signature *sig; in test_verify_fw_preamble() local
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()
458 free(sig); 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()
477 sig = (struct vb2_signature *)(buf + pre->hash_offset); in test_verify_fw_preamble()
478 sig->sig_size /= 2; in test_verify_fw_preamble()
490 sig = (struct vb2_signature *)(buf + pre->sig_offset); in test_verify_fw_preamble()
491 sig->c.total_size += 4; 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()