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

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