tpm2-tss/0010-FAPI-Fix-Fapi_ChangeAuth-for-keys.patch
Štěpán Horáček 0721d13235 Backport upstream fixes
Resolves: RHEL-94936

Signed-off-by: Štěpán Horáček <shoracek@redhat.com>
2026-02-11 00:08:09 +01:00

40 lines
1.4 KiB
Diff

From 236c9c61cecf478cf4ae86606495a9f93535a27a Mon Sep 17 00:00:00 2001
From: Juergen Repp <juergen_repp@web.de>
Date: Wed, 21 Aug 2024 18:56:02 +0200
Subject: [PATCH 10/22] FAPI: Fix Fapi_ChangeAuth for keys.
The keystore has to be updated after Fapi_ChangeAuth for key
objects because the private field is changed.
If not an HMAC error is produced when this key is used.
Fixes: #2890
Signed-off-by: Juergen Repp <juergen_repp@web.de>
---
src/tss2-fapi/api/Fapi_ChangeAuth.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/src/tss2-fapi/api/Fapi_ChangeAuth.c b/src/tss2-fapi/api/Fapi_ChangeAuth.c
index 9aaf2d39..d9003920 100644
--- a/src/tss2-fapi/api/Fapi_ChangeAuth.c
+++ b/src/tss2-fapi/api/Fapi_ChangeAuth.c
@@ -414,16 +414,8 @@ Fapi_ChangeAuth_Finish(
object = command->key_object;
if (strlen(command->authValue) > 0) {
- if (object->misc.key.with_auth == TPM2_YES) {
- context->state = ENTITY_CHANGE_AUTH_CLEANUP;
- return TSS2_FAPI_RC_TRY_AGAIN;
- }
object->misc.key.with_auth = TPM2_YES;
} else {
- if (object->misc.key.with_auth == TPM2_NO) {
- context->state = ENTITY_CHANGE_AUTH_CLEANUP;
- return TSS2_FAPI_RC_TRY_AGAIN;
- }
object->misc.key.with_auth = TPM2_NO;
}
fallthrough;
--
2.51.0