31 lines
977 B
Diff
31 lines
977 B
Diff
From e20f7a0bb6febb61d9f82430e27a4ce4aed64399 Mon Sep 17 00:00:00 2001
|
|
From: Juergen Repp <juergen_repp@web.de>
|
|
Date: Mon, 17 Feb 2025 18:04:49 +0100
|
|
Subject: [PATCH 8/8] 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>
|
|
---
|
|
tools/misc/tpm2_encodeobject.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/tools/misc/tpm2_encodeobject.c b/tools/misc/tpm2_encodeobject.c
|
|
index 80de14f5..74675b06 100644
|
|
--- a/tools/misc/tpm2_encodeobject.c
|
|
+++ b/tools/misc/tpm2_encodeobject.c
|
|
@@ -195,7 +195,7 @@ encode(void)
|
|
goto error;
|
|
}
|
|
|
|
- tpk->emptyAuth = ctx.object.needs_auth;
|
|
+ tpk->emptyAuth = !ctx.object.needs_auth;
|
|
|
|
if ((ctx.parent.object.handle >> TPM2_HR_SHIFT) == TPM2_HT_PERSISTENT) {
|
|
ASN1_INTEGER_set(tpk->parent, ctx.parent.object.handle);
|
|
--
|
|
2.49.0
|
|
|