diff -Nru opencryptoki-3.9.0+dfsg/debian/changelog opencryptoki-3.9.0+dfsg/debian/changelog --- opencryptoki-3.9.0+dfsg/debian/changelog 2020-09-28 18:29:31.000000000 +0000 +++ opencryptoki-3.9.0+dfsg/debian/changelog 2021-03-02 17:26:14.000000000 +0000 @@ -1,3 +1,11 @@ +opencryptoki (3.9.0+dfsg-0ubuntu1.4) bionic; urgency=medium + + * debian/patches/f1f176cbb4183bcb8a0f7b4d7f649d84a731dd43.patch + fixing migration of master key from OLD register to CURRENT register (from > 3.15.1) + Thanks to Patrick Steuer (LP: #1915517) + + -- Frank Heimes Tue, 02 Mar 2021 18:26:14 +0100 + opencryptoki (3.9.0+dfsg-0ubuntu1.3) bionic; urgency=medium * Fix re-encryption of EP11 key blobs. (LP: #1854148) diff -Nru opencryptoki-3.9.0+dfsg/debian/patches/f1f176cbb4183bcb8a0f7b4d7f649d84a731dd43.patch opencryptoki-3.9.0+dfsg/debian/patches/f1f176cbb4183bcb8a0f7b4d7f649d84a731dd43.patch --- opencryptoki-3.9.0+dfsg/debian/patches/f1f176cbb4183bcb8a0f7b4d7f649d84a731dd43.patch 1970-01-01 00:00:00.000000000 +0000 +++ opencryptoki-3.9.0+dfsg/debian/patches/f1f176cbb4183bcb8a0f7b4d7f649d84a731dd43.patch 2021-03-02 17:26:14.000000000 +0000 @@ -0,0 +1,50 @@ +From caa4bbba51cf470986944820ea773163084da0b7 Mon Sep 17 00:00:00 2001 +From: Patrick Steuer +Date: Tue, 19 Jan 2021 14:29:57 +0100 +Subject: [PATCH] A slot ID has nothing to do with the number of slots + +Signed-off-by: Patrick Steuer + +Author: Patrick Steuer +Origin: upstream, https://github.com/opencryptoki/opencryptoki/commit/f1f176cbb4183bcb8a0f7b4d7f649d84a731dd43 + (now https://github.com/opencryptoki/opencryptoki/commit/caa4bbba51cf470986944820ea773163084da0b7) +Bug-IBM: Bugzilla 191527 +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1915517 +Applied-Upstream: > v3.15.1 +Reviewed-by: Frank Heimes +Last-Update: 2021-03-02 + +--- + usr/sbin/pkcscca/pkcscca.c | 14 -------------- + 1 file changed, 14 deletions(-) + +--- a/usr/sbin/pkcscca/pkcscca.c ++++ b/usr/sbin/pkcscca/pkcscca.c +@@ -1032,7 +1032,6 @@ + { + CK_FUNCTION_LIST *funcs; + CK_KEY_TYPE key_type = 0; +- CK_ULONG slot_count; + CK_SESSION_HANDLE sess; + CK_RV rv; + struct key_count count = {0,0,0,0,0,0,0}; +@@ -1044,19 +1043,6 @@ + return 2; + } + +- rv = funcs->C_GetSlotList(TRUE, NULL_PTR, &slot_count); +- if (rv != CKR_OK) { +- p11_error("C_GetSlotList" ,rv); +- exit_code = 3; +- goto finalize; +- } +- +- if (slot_id >= slot_count) { +- print_error("%lu is not a valid slot ID." , slot_id); +- exit_code = 4; +- goto finalize; +- } +- + rv = funcs->C_OpenSession(slot_id, CKF_RW_SESSION| + CKF_SERIAL_SESSION,NULL_PTR,NULL_PTR, + &sess); diff -Nru opencryptoki-3.9.0+dfsg/debian/patches/series opencryptoki-3.9.0+dfsg/debian/patches/series --- opencryptoki-3.9.0+dfsg/debian/patches/series 2020-09-28 18:29:31.000000000 +0000 +++ opencryptoki-3.9.0+dfsg/debian/patches/series 2021-03-02 17:26:14.000000000 +0000 @@ -5,3 +5,4 @@ f5e55194748fc52360adbf69f7a7e8168644cc3b.patch 363f465755399e124b6f503db111c2b8390cfffe.patch 316e35e55b1fe90d963186d54e7d8c4f77ce94ed +f1f176cbb4183bcb8a0f7b4d7f649d84a731dd43.patch