Lines Matching refs:pubk
26 struct vb2_public_key pubk; in test_unpack_key() local
37 TEST_SUCC(vb2_unpack_key(&pubk, buf, size), "vb2_unpack_key() ok"); in test_unpack_key()
39 TEST_EQ(pubk.sig_alg, vb2_crypto_to_signature(key->algorithm), in test_unpack_key()
41 TEST_EQ(pubk.hash_alg, vb2_crypto_to_hash(key->algorithm), in test_unpack_key()
47 TEST_EQ(vb2_unpack_key(&pubk, buf, size), in test_unpack_key()
53 TEST_EQ(vb2_unpack_key(&pubk, buf, size), in test_unpack_key()
59 TEST_EQ(vb2_unpack_key(&pubk, buf, size + 1), in test_unpack_key()
65 TEST_EQ(vb2_unpack_key(&pubk, buf, size), in test_unpack_key()
70 TEST_EQ(vb2_unpack_key(&pubk, buf, size - 1), in test_unpack_key()
85 struct vb2_public_key pubk, pubk_orig; in test_verify_data() local
94 TEST_EQ(vb2_unpack_key(&pubk, (uint8_t *)key1, pubkey_size), in test_verify_data()
96 pubk_orig = pubk; in test_verify_data()
99 pubk.sig_alg = VB2_SIG_INVALID; in test_verify_data()
100 TEST_NEQ(vb2_verify_data(test_data, test_size, sig2, &pubk, &wb), in test_verify_data()
102 pubk.sig_alg = pubk_orig.sig_alg; in test_verify_data()
105 pubk.hash_alg = VB2_HASH_INVALID; in test_verify_data()
106 TEST_NEQ(vb2_verify_data(test_data, test_size, sig2, &pubk, &wb), in test_verify_data()
108 pubk.hash_alg = pubk_orig.hash_alg; in test_verify_data()
112 TEST_NEQ(vb2_verify_data(test_data, test_size, sig2, &pubk, &wb), in test_verify_data()
117 TEST_EQ(vb2_verify_data(test_data, test_size, sig2, &pubk, &wb), in test_verify_data()
122 TEST_NEQ(vb2_verify_data(test_data, test_size, sig2, &pubk, &wb), in test_verify_data()
126 TEST_NEQ(vb2_verify_data(test_data, test_size - 1, sig2, &pubk, &wb), in test_verify_data()
131 TEST_NEQ(vb2_verify_data(test_data, test_size, sig2, &pubk, &wb), in test_verify_data()