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

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