Blame SOURCES/0006-db-fix-upgrade-to-version-4.patch

ad10f4
From 1d28d6eee8c1b02a900810e6f1e4582e1c4381a5 Mon Sep 17 00:00:00 2001
ad10f4
From: =?UTF-8?q?=C5=A0t=C4=9Bp=C3=A1n=20Hor=C3=A1=C4=8Dek?=
ad10f4
 <shoracek@redhat.com>
ad10f4
Date: Wed, 12 Oct 2022 15:50:33 +0200
ad10f4
Subject: [PATCH 6/6] db: fix upgrade to version 4
ad10f4
MIME-Version: 1.0
ad10f4
Content-Type: text/plain; charset=UTF-8
ad10f4
Content-Transfer-Encoding: 8bit
ad10f4
ad10f4
During upgrade of the database from version 3 to version 4, parameter
ad10f4
'persistent' was used, although everywhere else the opposite 'transient'
ad10f4
is used. This causes KeyError: 'transient' when using the upgraded
ad10f4
database.
ad10f4
ad10f4
This commit fixes this by adding 'transient' during upgrade instead.
ad10f4
ad10f4
Signed-off-by: Štěpán Horáček <shoracek@redhat.com>
ad10f4
---
ad10f4
 tools/tpm2_pkcs11/db.py | 2 +-
ad10f4
 1 file changed, 1 insertion(+), 1 deletion(-)
ad10f4
ad10f4
diff --git a/tools/tpm2_pkcs11/db.py b/tools/tpm2_pkcs11/db.py
ad10f4
index d0a526b..01ab298 100644
ad10f4
--- a/tools/tpm2_pkcs11/db.py
ad10f4
+++ b/tools/tpm2_pkcs11/db.py
ad10f4
@@ -380,7 +380,7 @@ class Db(object):
ad10f4
             hexblob = bytes.hex(blob)
ad10f4
 
ad10f4
             config = {
ad10f4
-                'persistent' : True,
ad10f4
+                'transient': False,
ad10f4
                 'esys-tr': hexblob
ad10f4
             }
ad10f4
 
ad10f4
-- 
ad10f4
2.38.1
ad10f4