Skip to content

Commit

Permalink
tpm2_encode: Fix setting emptyAuth in generated pem file.
Browse files Browse the repository at this point in the history
emptyAuth was set to 1 if an auth value for the input key was
used  and to 0 if an auth value was used.
Fixes: #3458

Signed-off-by: Juergen Repp <[email protected]>
  • Loading branch information
JuergenReppSIT committed Feb 17, 2025
1 parent ff457e2 commit 6e9fc6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/misc/tpm2_encodeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ static int encode(ESYS_CONTEXT *ectx) {
goto error;
}

tpk->emptyAuth = ctx.object.needs_auth;
tpk->emptyAuth = !ctx.object.needs_auth;

bn_parent = BN_new();
if (!bn_parent) {
Expand Down

0 comments on commit 6e9fc6c

Please sign in to comment.