Lines Matching refs:options
32 struct trusted_key_options *options, in tpm2_key_encode() argument
56 if (options->blobauth_len == 0) { in tpm2_key_encode()
75 work = asn1_encode_integer(work, end_work, options->keyhandle); in tpm2_key_encode()
97 struct trusted_key_options *options, in tpm2_key_decode() argument
119 options->keyhandle = ctx.parent; in tpm2_key_decode()
229 struct trusted_key_options *options) in tpm2_seal_trusted() argument
239 if (options->hash == tpm2_hash_map[i].crypto_id) { in tpm2_seal_trusted()
248 if (!options->keyhandle) in tpm2_seal_trusted()
261 tpm_buf_append_u32(&buf, options->keyhandle); in tpm2_seal_trusted()
265 options->keyauth /* hmac */, in tpm2_seal_trusted()
269 tpm_buf_append_u16(&buf, 4 + options->blobauth_len + payload->key_len); in tpm2_seal_trusted()
271 tpm_buf_append_u16(&buf, options->blobauth_len); in tpm2_seal_trusted()
272 if (options->blobauth_len) in tpm2_seal_trusted()
273 tpm_buf_append(&buf, options->blobauth, options->blobauth_len); in tpm2_seal_trusted()
279 tpm_buf_append_u16(&buf, 14 + options->policydigest_len); in tpm2_seal_trusted()
285 flags |= options->policydigest_len ? 0 : TPM2_OA_USER_WITH_AUTH; in tpm2_seal_trusted()
291 tpm_buf_append_u16(&buf, options->policydigest_len); in tpm2_seal_trusted()
292 if (options->policydigest_len) in tpm2_seal_trusted()
293 tpm_buf_append(&buf, options->policydigest, in tpm2_seal_trusted()
294 options->policydigest_len); in tpm2_seal_trusted()
325 blob_len = tpm2_key_encode(payload, options, in tpm2_seal_trusted()
362 struct trusted_key_options *options, in tpm2_load_cmd() argument
373 rc = tpm2_key_decode(payload, options, &blob); in tpm2_load_cmd()
381 if (!options->keyhandle) in tpm2_load_cmd()
416 tpm_buf_append_u32(&buf, options->keyhandle); in tpm2_load_cmd()
420 options->keyauth /* hmac */, in tpm2_load_cmd()
460 struct trusted_key_options *options, in tpm2_unseal_cmd() argument
474 options->policyhandle ? in tpm2_unseal_cmd()
475 options->policyhandle : TPM2_RS_PW, in tpm2_unseal_cmd()
478 options->blobauth /* hmac */, in tpm2_unseal_cmd()
479 options->blobauth_len); in tpm2_unseal_cmd()
530 struct trusted_key_options *options) in tpm2_unseal_trusted() argument
539 rc = tpm2_load_cmd(chip, payload, options, &blob_handle); in tpm2_unseal_trusted()
543 rc = tpm2_unseal_cmd(chip, payload, options, blob_handle); in tpm2_unseal_trusted()