Lines Matching defs:sig
46 struct vb2_signature *sig, *sig2;
82 TEST_SUCC(vb2_sign_data(&sig, test_data, test_size, prik, NULL),
84 TEST_PTR_NEQ(sig, NULL, " sig_ptr");
85 TEST_EQ(0, strcmp(vb2_common_desc(sig), test_desc), " desc");
86 TEST_EQ(0, memcmp(&sig->guid, &test_guid, sizeof(test_guid)), " guid");
87 TEST_EQ(sig->data_size, test_size, " data_size");
88 TEST_SUCC(vb2_sig_size_for_key(&size, prik, NULL), "Sig size");
89 TEST_EQ(size, sig->c.total_size, " size");
90 TEST_SUCC(vb2_verify_data(test_data, test_size, sig, pubk, &wb),
92 free(sig);
94 TEST_SUCC(vb2_sign_data(&sig, test_data, test_size, prik,
97 TEST_EQ(0, strcmp(vb2_common_desc(sig), test_sig_desc), " desc");
98 free(sig);
100 TEST_SUCC(vb2_sign_data(&sig, test_data, test_size, prik, ""),
102 TEST_EQ(sig->c.desc_size, 0, " desc");
103 TEST_SUCC(vb2_sig_size_for_key(&size, prik, ""), "Sig size");
104 TEST_EQ(size, sig->c.total_size, " size");
105 free(sig);
107 TEST_SUCC(vb2_sign_data(&sig, test_data, test_size, prihash, NULL),
109 TEST_SUCC(vb2_verify_data(test_data, test_size, sig, &pubhash, &wb),
111 free(sig);
115 TEST_EQ(vb2_sign_data(&sig, test_data, test_size, &prik2, NULL),
116 VB2_SIGN_DATA_SIG_SIZE, "Sign bad sig alg");
120 TEST_SUCC(vb2_sig_size_for_key(&size, prik, NULL), "Sig size");
128 sig = (struct vb2_signature *)(buf + c_sig_offs);
129 TEST_SUCC(vb2_verify_data(buf, c_sig_offs, sig, pubk, &wb),
146 sig = (struct vb2_signature *)(buf + c_sig_offs);
147 TEST_SUCC(vb2_verify_data(buf, c_sig_offs, sig, pubk, &wb),
148 "Verify object with sig 1");
149 sig2 = (struct vb2_signature *)(buf + c_sig_offs + sig->c.total_size);
151 "Verify object with sig 2");
157 TEST_EQ(size, sig->c.total_size + sig2->c.total_size,