Skip to content

Commit fd2aa33

Browse files
JuergenReppSITAndreasFuchsTPM
authored andcommitted
tpm2_encode: Fix setting emptyAuth in generated pem file.
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 <juergen_repp@web.de>
1 parent 9c071fe commit fd2aa33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/misc/tpm2_encodeobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ static int encode(ESYS_CONTEXT *ectx) {
165165
goto error;
166166
}
167167

168-
tpk->emptyAuth = ctx.object.needs_auth;
168+
tpk->emptyAuth = !ctx.object.needs_auth;
169169

170170
bn_parent = BN_new();
171171
if (!bn_parent) {

0 commit comments

Comments
 (0)