Home | History | Annotate | Download | only in tests

Lines Matching defs:sig

48 	VbSignature *sig;
51 sig = CalculateSignature(test_data, test_size, private_key);
52 TEST_PTR_NEQ(sig, 0, "VerifyData() calculate signature");
57 if (!sig || !rsa)
60 TEST_EQ(VerifyData(test_data, test_size, sig, rsa), 0,
63 sig->sig_size -= 16;
64 TEST_EQ(VerifyData(test_data, test_size, sig, rsa), 1,
65 "VerifyData() wrong sig size");
66 sig->sig_size += 16;
68 TEST_EQ(VerifyData(test_data, test_size - 1, sig, rsa), 1,
71 GetSignatureData(sig)[0] ^= 0x5A;
72 TEST_EQ(VerifyData(test_data, test_size, sig, rsa), 1,
73 "VerifyData() wrong sig");
76 free(sig);
83 VbSignature *sig;
87 sig = CalculateSignature(test_data, sizeof(test_data), private_key);
91 TEST_NEQ(sig && rsa && digest, 0, "VerifyData() prerequisites");
92 if (!sig || !rsa || !digest)
95 TEST_EQ(VerifyDigest(digest, sig, rsa), 0, "VerifyDigest() ok");
97 GetSignatureData(sig)[0] ^= 0x5A;
98 TEST_EQ(VerifyDigest(digest, sig, rsa), 1, "VerifyDigest() wrong sig");
100 sig->sig_size = 1;
101 TEST_EQ(VerifyDigest(digest, sig, rsa), 1, "VerifyDigest() sig size");
104 free(sig);
111 VbSignature *sig = CalculateSignature((const uint8_t *)h,
114 SignatureCopy(&h->preamble_signature, sig);
115 free(sig);
177 "VerifyKernelPreamble() sig off end");
183 "VerifyKernelPreamble() sig too small");
188 "VerifyKernelPreamble() sig mismatch");
190 /* Check that we signed header and body sig */
203 "VerifyKernelPreamble() body sig off end");