Skip to content

Commit

Permalink
tpm2_create: Fix context save error.
Browse files Browse the repository at this point in the history
If the options --creation-hash,  --creation-ticket, or --creation-data
were used together with --key-context context save for the handle
ESYS_TR_NONE was called and did produce an error.
Now the object is loaded and context save is calles with the correct
handle. Fixes: #3379

Signed-off-by: Juergen Repp <juergen_repp@web.de>
  • Loading branch information
JuergenReppSIT authored and AndreasFuchsTPM committed Apr 22, 2024
1 parent f2adc76 commit 3d27ffc
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tools/tpm2_create.c
Expand Up @@ -405,9 +405,7 @@ static tool_rc process_inputs(ESYS_CONTEXT *ectx) {
}

/* Check command type */
if ((ctx.object.ctx_path || ctx.object.template_data_path) &&
(!ctx.object.creation_data_file && !ctx.object.creation_ticket_file &&
!ctx.object.creation_hash_file)) {
if ((ctx.object.ctx_path || ctx.object.template_data_path)) {
ctx.is_createloaded = true;
}

Expand Down

0 comments on commit 3d27ffc

Please sign in to comment.