Lines Matching refs:expected

229 	tpm_rs256_pubarea_t		 expected;  in check_rs256_pubarea()  local
238 memset(&expected, 0, sizeof(expected)); in check_rs256_pubarea()
239 expected.alg = TPM_ALG_RSA; in check_rs256_pubarea()
240 expected.hash = TPM_ALG_SHA256; in check_rs256_pubarea()
241 expected.attr = be32toh(actual->attr); in check_rs256_pubarea()
242 expected.attr &= ~(TPMA_RESERVED|TPMA_CLEAR); in check_rs256_pubarea()
243 expected.attr |= (TPMA_FIXED|TPMA_FIXED_P|TPMA_SENSITIVE|TPMA_SIGN); in check_rs256_pubarea()
244 expected.policy = actual->policy; in check_rs256_pubarea()
245 expected.policy.size = sizeof(expected.policy.body); in check_rs256_pubarea()
246 expected.param.symmetric = TPM_ALG_NULL; in check_rs256_pubarea()
247 expected.param.scheme = TPM_ALG_NULL; in check_rs256_pubarea()
248 expected.param.keybits = 2048; in check_rs256_pubarea()
249 expected.param.exponent = 0; /* meaning 2^16+1 */ in check_rs256_pubarea()
250 expected.key.size = sizeof(expected.key.body); in check_rs256_pubarea()
251 memcpy(&expected.key.body, &pk->n, sizeof(expected.key.body)); in check_rs256_pubarea()
252 bswap_rs256_pubarea(&expected); in check_rs256_pubarea()
254 ok = timingsafe_bcmp(&expected, actual, sizeof(expected)); in check_rs256_pubarea()
255 explicit_bzero(&expected, sizeof(expected)); in check_rs256_pubarea()
264 tpm_es256_pubarea_t expected; in check_es256_pubarea() local
273 memset(&expected, 0, sizeof(expected)); in check_es256_pubarea()
274 expected.alg = TPM_ALG_ECC; in check_es256_pubarea()
275 expected.hash = TPM_ALG_SHA256; in check_es256_pubarea()
276 expected.attr = be32toh(actual->attr); in check_es256_pubarea()
277 expected.attr &= ~(TPMA_RESERVED|TPMA_CLEAR); in check_es256_pubarea()
278 expected.attr |= (TPMA_FIXED|TPMA_FIXED_P|TPMA_SENSITIVE|TPMA_SIGN); in check_es256_pubarea()
279 expected.policy = actual->policy; in check_es256_pubarea()
280 expected.policy.size = sizeof(expected.policy.body); in check_es256_pubarea()
281 expected.param.symmetric = TPM_ALG_NULL; in check_es256_pubarea()
282 expected.param.scheme = TPM_ALG_NULL; /* TCG Alg. Registry, 5.2.4 */ in check_es256_pubarea()
283 expected.param.curve_id = TPM_ECC_P256; in check_es256_pubarea()
284 expected.param.kdf = TPM_ALG_NULL; in check_es256_pubarea()
285 expected.point.x.size = sizeof(expected.point.x.body); in check_es256_pubarea()
286 expected.point.y.size = sizeof(expected.point.y.body); in check_es256_pubarea()
287 memcpy(&expected.point.x.body, &pk->x, sizeof(expected.point.x.body)); in check_es256_pubarea()
288 memcpy(&expected.point.y.body, &pk->y, sizeof(expected.point.y.body)); in check_es256_pubarea()
289 bswap_es256_pubarea(&expected); in check_es256_pubarea()
291 ok = timingsafe_bcmp(&expected, actual, sizeof(expected)); in check_es256_pubarea()
292 explicit_bzero(&expected, sizeof(expected)); in check_es256_pubarea()
302 tpm_sha1_attest_t expected; in check_sha1_certinfo() local
321 memset(&expected, 0, sizeof(expected)); in check_sha1_certinfo()
322 expected.magic = TPM_MAGIC; in check_sha1_certinfo()
323 expected.type = TPM_ST_CERTIFY; in check_sha1_certinfo()
324 expected.signer = actual->signer; in check_sha1_certinfo()
325 expected.signer.size = sizeof(expected.signer.alg) + in check_sha1_certinfo()
326 sizeof(expected.signer.body); in check_sha1_certinfo()
327 expected.data = signed_data; in check_sha1_certinfo()
328 expected.clock = actual->clock; in check_sha1_certinfo()
329 expected.clock.safe = 1; in check_sha1_certinfo()
330 expected.fwversion = actual->fwversion; in check_sha1_certinfo()
331 expected.name = signed_name; in check_sha1_certinfo()
332 expected.qual_name = actual->qual_name; in check_sha1_certinfo()
333 bswap_sha1_certinfo(&expected); in check_sha1_certinfo()
335 ok = timingsafe_bcmp(&expected, actual, sizeof(expected)); in check_sha1_certinfo()
337 explicit_bzero(&expected, sizeof(expected)); in check_sha1_certinfo()