Home | History | Annotate | Download | only in tests

Lines Matching refs:sig

195 		"vb2_sig_size() sig invalid");
220 struct vb2_signature *sig;
235 TEST_SUCC(vb2_sign_data(&sig, test_data, sizeof(test_data), prik, NULL),
236 "create hash sig");
239 sig, &pubk, &wb),
242 *((uint8_t *)sig + sig->sig_offset) ^= 0xab;
243 TEST_EQ(vb2_verify_data(test_data, sizeof(test_data), sig, &pubk, &wb),
246 free(sig);
257 struct vb2_signature *sig;
325 vb2_sign_data(&sig, buf, kbuf->sig_offset, prik[0], NULL);
326 memcpy(buf + kbuf->sig_offset, sig, sig->c.total_size);
327 free(sig);
345 sig = (struct vb2_signature *)(buf + kbuf->sig_offset);
346 sig->data_size--;
352 sig = (struct vb2_signature *)(buf + kbuf->sig_offset);
353 sig->c.total_size = kbuf->c.total_size - 4;
359 sig = (struct vb2_signature *)(buf + kbuf->sig_offset);
360 sig->c.struct_version_major++;
384 struct vb2_signature *sig;
456 vb2_sign_data(&sig, buf, pre->sig_offset, prikhash, NULL);
457 memcpy(buf + pre->sig_offset, sig, sig->c.total_size);
458 free(sig);
470 sig = (struct vb2_signature *)(buf + pre->hash_offset);
471 sig->c.total_size += pre->c.total_size;
477 sig = (struct vb2_signature *)(buf + pre->hash_offset);
478 sig->sig_size /= 2;
490 sig = (struct vb2_signature *)(buf + pre->sig_offset);
491 sig->c.total_size += 4;
494 "vb2_verify_fw_preamble() sig inside");
497 sig = (struct vb2_signature *)(buf + pre->sig_offset);
498 buf[pre->sig_offset + sig->sig_offset]++;
501 "vb2_verify_fw_preamble() sig corrupt");