Lines Matching refs:rsa
21 RSAPublicKey *rsa; in VerifyPublicKeyToRSA() local
34 rsa = PublicKeyToRSA(orig_key); in VerifyPublicKeyToRSA()
35 TEST_NEQ((size_t)rsa, 0, "PublicKeyToRSA() ok"); in VerifyPublicKeyToRSA()
36 if (rsa) { in VerifyPublicKeyToRSA()
37 TEST_EQ((int)rsa->algorithm, (int)key->algorithm, in VerifyPublicKeyToRSA()
39 RSAPublicKeyFree(rsa); in VerifyPublicKeyToRSA()
49 RSAPublicKey *rsa; in VerifyDataTest() local
54 rsa = PublicKeyToRSA(public_key); in VerifyDataTest()
55 TEST_PTR_NEQ(rsa, 0, "VerifyData() calculate rsa"); in VerifyDataTest()
57 if (!sig || !rsa) in VerifyDataTest()
60 TEST_EQ(VerifyData(test_data, test_size, sig, rsa), 0, in VerifyDataTest()
64 TEST_EQ(VerifyData(test_data, test_size, sig, rsa), 1, in VerifyDataTest()
68 TEST_EQ(VerifyData(test_data, test_size - 1, sig, rsa), 1, in VerifyDataTest()
72 TEST_EQ(VerifyData(test_data, test_size, sig, rsa), 1, in VerifyDataTest()
75 RSAPublicKeyFree(rsa); in VerifyDataTest()
84 RSAPublicKey *rsa; in VerifyDigestTest() local
88 rsa = PublicKeyToRSA(public_key); in VerifyDigestTest()
91 TEST_NEQ(sig && rsa && digest, 0, "VerifyData() prerequisites"); in VerifyDigestTest()
92 if (!sig || !rsa || !digest) in VerifyDigestTest()
95 TEST_EQ(VerifyDigest(digest, sig, rsa), 0, "VerifyDigest() ok"); in VerifyDigestTest()
98 TEST_EQ(VerifyDigest(digest, sig, rsa), 1, "VerifyDigest() wrong sig"); in VerifyDigestTest()
101 TEST_EQ(VerifyDigest(digest, sig, rsa), 1, "VerifyDigest() sig size"); in VerifyDigestTest()
103 RSAPublicKeyFree(rsa); in VerifyDigestTest()
123 RSAPublicKey *rsa; in VerifyKernelPreambleTest() local
129 rsa = PublicKeyToRSA(public_key); in VerifyKernelPreambleTest()
132 TEST_NEQ(hdr && rsa, 0, "VerifyKernelPreamble() prerequisites"); in VerifyKernelPreambleTest()
138 TEST_EQ(VerifyKernelPreamble(hdr, hsize, rsa), 0, in VerifyKernelPreambleTest()
140 TEST_NEQ(VerifyKernelPreamble(hdr, hsize - 1, rsa), 0, in VerifyKernelPreambleTest()
142 TEST_NEQ(VerifyKernelPreamble(hdr, 4, rsa), 0, in VerifyKernelPreambleTest()
144 TEST_EQ(VerifyKernelPreamble(hdr, hsize + 1, rsa), 0, in VerifyKernelPreambleTest()
151 TEST_NEQ(VerifyKernelPreamble(h, hsize, rsa), 0, in VerifyKernelPreambleTest()
157 TEST_NEQ(VerifyKernelPreamble(h, hsize, rsa), 0, in VerifyKernelPreambleTest()
163 TEST_EQ(VerifyKernelPreamble(h, hsize, rsa), 0, in VerifyKernelPreambleTest()
169 TEST_EQ(VerifyKernelPreamble(h, hsize, rsa), 0, in VerifyKernelPreambleTest()
176 TEST_NEQ(VerifyKernelPreamble(h, hsize, rsa), 0, in VerifyKernelPreambleTest()
182 TEST_NEQ(VerifyKernelPreamble(h, hsize, rsa), 0, in VerifyKernelPreambleTest()
187 TEST_NEQ(VerifyKernelPreamble(h, hsize, rsa), 0, in VerifyKernelPreambleTest()
196 TEST_NEQ(VerifyKernelPreamble(h, hsize, rsa), 0, in VerifyKernelPreambleTest()
202 TEST_NEQ(VerifyKernelPreamble(h, hsize, rsa), 0, in VerifyKernelPreambleTest()
208 RSAPublicKeyFree(rsa); in VerifyKernelPreambleTest()