Lines Matching refs:tpm

85   Tpm2CtxObj tpm(&Prng::Generate, &my_prng, &f, epid2params);  in TEST_F()  local
86 THROW_ON_EPIDERR(Tpm2SetHashAlg(tpm, kSha256)); in TEST_F()
88 EXPECT_EQ(kEpidNoErr, Tpm2LoadExternal(tpm, &f)); in TEST_F()
98 Tpm2Commit(tpm, p2, this->kS2Sha256.data(), this->kS2Sha256.size(), in TEST_F()
105 Tpm2Sign(tpm, this->kDigestSha256, sizeof(this->kDigestSha256), in TEST_F()
119 Tpm2CtxObj tpm(&Prng::Generate, &my_prng, &f, epid2params); in TEST_F() local
120 THROW_ON_EPIDERR(Tpm2SetHashAlg(tpm, kSha256)); in TEST_F()
122 EXPECT_EQ(kEpidNoErr, Tpm2LoadExternal(tpm, &f)); in TEST_F()
133 Tpm2Commit(tpm, p2, this->kS2Sha256.data(), this->kS2Sha256.size(), in TEST_F()
136 Tpm2Commit(tpm, p2, this->kS2Sha256.data(), this->kS2Sha256.size(), in TEST_F()
144 Tpm2Sign(tpm, this->kDigestSha256, sizeof(this->kDigestSha256), in TEST_F()
147 Tpm2Sign(tpm, this->kDigestSha256, sizeof(this->kDigestSha256), in TEST_F()
164 Tpm2CtxObj tpm(&Prng::Generate, &my_prng, &this->kMemberFValue, epid2params); in TEST_F() local
165 THROW_ON_EPIDERR(Tpm2SetHashAlg(tpm, kSha256)); in TEST_F()
166 THROW_ON_EPIDERR(Tpm2LoadExternal(tpm, &this->kMemberFValue)); in TEST_F()
168 Tpm2Commit(tpm, nullptr, nullptr, 0, nullptr, k, l, e, &counter)); in TEST_F()
173 EXPECT_EQ(kEpidBadArgErr, Tpm2Sign(tpm, nullptr, sizeof(this->kDigestSha256), in TEST_F()
176 Tpm2Sign(tpm, this->kDigestSha256, sizeof(this->kDigestSha256), in TEST_F()
188 Tpm2CtxObj tpm(&Prng::Generate, &my_prng, &this->kMemberFValue, epid2params); in TEST_F() local
189 THROW_ON_EPIDERR(Tpm2SetHashAlg(tpm, kSha256)); in TEST_F()
190 THROW_ON_EPIDERR(Tpm2LoadExternal(tpm, &this->kMemberFValue)); in TEST_F()
192 Tpm2Commit(tpm, nullptr, nullptr, 0, nullptr, k, l, e, &counter)); in TEST_F()
195 EXPECT_EQ(kEpidBadArgErr, Tpm2Sign(tpm, digest, 0, counter, sig_k, sig_s)); in TEST_F()
197 Tpm2Sign(tpm, digest, EPID_SHA256_DIGEST_BITSIZE / CHAR_BIT + 1, in TEST_F()
200 Tpm2Sign(tpm, digest, EPID_SHA256_DIGEST_BITSIZE / CHAR_BIT - 1, in TEST_F()
215 Tpm2CtxObj tpm(&Prng::Generate, &my_prng, &this->kMemberFValue, epid2params); in TEST_F() local
216 THROW_ON_EPIDERR(Tpm2SetHashAlg(tpm, kSha256)); in TEST_F()
217 THROW_ON_EPIDERR(Tpm2LoadExternal(tpm, &this->kMemberFValue)); in TEST_F()
220 Tpm2Sign(tpm, this->kDigestSha256, sizeof(this->kDigestSha256), in TEST_F()
223 Tpm2Sign(tpm, this->kDigestSha256, sizeof(this->kDigestSha256), one, in TEST_F()
226 Tpm2Sign(tpm, this->kDigestSha256, sizeof(this->kDigestSha256), in TEST_F()
230 Tpm2Commit(tpm, nullptr, nullptr, 0, nullptr, k, l, e, &counter)); in TEST_F()
234 Tpm2Sign(tpm, this->kDigestSha256, sizeof(this->kDigestSha256), in TEST_F()
236 THROW_ON_EPIDERR(Tpm2ReleaseCounter(tpm, counter)); in TEST_F()
247 Tpm2CtxObj tpm(&Prng::Generate, &my_prng, &this->kMemberFValue, epid2params); in TEST_F() local
248 THROW_ON_EPIDERR(Tpm2SetHashAlg(tpm, kSha256)); in TEST_F()
249 THROW_ON_EPIDERR(Tpm2LoadExternal(tpm, &this->kMemberFValue)); in TEST_F()
251 Tpm2Commit(tpm, nullptr, nullptr, 0, nullptr, k, l, e, &counter)); in TEST_F()
254 Tpm2Sign(tpm, this->kDigestSha256, sizeof(this->kDigestSha256), in TEST_F()
257 Tpm2Sign(tpm, this->kDigestSha256, sizeof(this->kDigestSha256), in TEST_F()
269 Tpm2CtxObj tpm(&Prng::Generate, &my_prng, nullptr, epid2params); in TEST_F() local
272 Tpm2Sign(tpm, this->kDigestSha256, sizeof(this->kDigestSha256), in TEST_F()
283 Tpm2CtxObj tpm(&Prng::Generate, &my_prng, &f, epid2params); in TEST_F() local
295 Tpm2CtxObj tpm(&Prng::Generate, &my_prng, &f, epid2params); in TEST_F() local
296 THROW_ON_EPIDERR(Tpm2SetHashAlg(tpm, kSha256)); in TEST_F()
298 EXPECT_EQ(kEpidNoErr, Tpm2LoadExternal(tpm, &f)); in TEST_F()
308 Tpm2Commit(tpm, p2, this->kS2Sha256.data(), this->kS2Sha256.size(), in TEST_F()
310 EXPECT_EQ(kEpidNoErr, Tpm2ReleaseCounter(tpm, counter)); in TEST_F()
316 Tpm2Sign(tpm, this->kDigestSha256, sizeof(this->kDigestSha256), in TEST_F()