Merge ~fheimes/ubuntu/+source/opencryptoki:opencryptoki-sru-lp1915517-focal into ubuntu/+source/opencryptoki:ubuntu/focal-devel

Proposed by Frank Heimes
Status: Needs review
Proposed branch: ~fheimes/ubuntu/+source/opencryptoki:opencryptoki-sru-lp1915517-focal
Merge into: ubuntu/+source/opencryptoki:ubuntu/focal-devel
Diff against target: 86 lines (+64/-0)
3 files modified
debian/changelog (+8/-0)
debian/patches/f1f176cbb4183bcb8a0f7b4d7f649d84a731dd43.patch (+55/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Canonical Foundations Team Pending
Review via email: mp+398986@code.launchpad.net

Description of the change

opencryptoki-sru-lp1915517-focal
    debian/patches/f1f176cbb4183bcb8a0f7b4d7f649d84a731dd43.patch
    Fix failed pkcscca migration with usr/sb2 is not a valid slot ID.
    Added patch f1f176cbb4183bcb8a0f7b4d7f649d84a731dd43
    (now caa4bbba51cf470986944820ea773163084da0b7) from > 3.15.1
    for fixing migration of master key from OLD register to CURRENT register.
    (LP: #1915517)

Test build is available here:
https://launchpad.net/~fheimes/+archive/ubuntu/lp1915517

To post a comment you must log in.

Unmerged commits

088fa5d... by Frank Heimes

  * debian/changelog for debian/patches/f1f176cbb4183bcb8a0f7b4d7f649d84a731dd43.patch

3304a59... by Frank Heimes

  * 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)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index 9df2e91..67f5b75 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
1opencryptoki (3.13.0+dfsg-0ubuntu5.1) focal; urgency=medium
2
3 * debian/patches/f1f176cbb4183bcb8a0f7b4d7f649d84a731dd43.patch
4 fixing migration of master key from OLD register to CURRENT register (from > 3.15.1)
5 Thanks to Patrick Steuer (LP: #1915517)
6
7 -- Frank Heimes <frank.heimes@canonical.com> Tue, 02 Mar 2021 14:09:59 +0100
8
1opencryptoki (3.13.0+dfsg-0ubuntu5) focal; urgency=medium9opencryptoki (3.13.0+dfsg-0ubuntu5) focal; urgency=medium
210
3 * Enable locks by default, on all architectures, which is the new11 * Enable locks by default, on all architectures, which is the new
diff --git a/debian/patches/f1f176cbb4183bcb8a0f7b4d7f649d84a731dd43.patch b/debian/patches/f1f176cbb4183bcb8a0f7b4d7f649d84a731dd43.patch
4new file mode 10064412new file mode 100644
index 0000000..3df63d5
--- /dev/null
+++ b/debian/patches/f1f176cbb4183bcb8a0f7b4d7f649d84a731dd43.patch
@@ -0,0 +1,55 @@
1From caa4bbba51cf470986944820ea773163084da0b7 Mon Sep 17 00:00:00 2001
2From: Patrick Steuer <patrick.steuer@de.ibm.com>
3Date: Tue, 19 Jan 2021 14:29:57 +0100
4Subject: [PATCH] A slot ID has nothing to do with the number of slots
5
6Signed-off-by: Patrick Steuer <patrick.steuer@de.ibm.com>
7
8Author: Patrick Steuer <patrick.steuer@de.ibm.com>
9Origin: upstream, https://github.com/opencryptoki/opencryptoki/commit/f1f176cbb4183bcb8a0f7b4d7f649d84a731dd43
10 (now https://github.com/opencryptoki/opencryptoki/commit/caa4bbba51cf470986944820ea773163084da0b7)
11Bug-IBM: Bugzilla 191527
12Bug-Ubuntu: https://bugs.launchpad.net/bugs/1915517
13Applied-Upstream: > v3.15.1
14Reviewed-by: Frank Heimes <frank.heimes@canonical.com>
15Last-Update: 2021-03-02
16
17---
18 usr/sbin/pkcscca/pkcscca.c | 14 --------------
19 1 file changed, 14 deletions(-)
20
21diff --git a/usr/sbin/pkcscca/pkcscca.c b/usr/sbin/pkcscca/pkcscca.c
22index c09f16b3..aa74eeb8 100644
23--- a/usr/sbin/pkcscca/pkcscca.c
24+++ b/usr/sbin/pkcscca/pkcscca.c
25@@ -1142,7 +1142,6 @@ int migrate_wrapped_keys(CK_SLOT_ID slot_id, char *userpin, int masterkey)
26 {
27 CK_FUNCTION_LIST *funcs;
28 CK_KEY_TYPE key_type = 0;
29- CK_ULONG slot_count;
30 CK_SESSION_HANDLE sess;
31 CK_RV rv;
32 struct key_count count = { 0, 0, 0, 0, 0, 0, 0 };
33@@ -1154,19 +1153,6 @@ int migrate_wrapped_keys(CK_SLOT_ID slot_id, char *userpin, int masterkey)
34 return 2;
35 }
36
37- rv = funcs->C_GetSlotList(TRUE, NULL_PTR, &slot_count);
38- if (rv != CKR_OK) {
39- p11_error("C_GetSlotList", rv);
40- exit_code = 3;
41- goto finalize;
42- }
43-
44- if (slot_id >= slot_count) {
45- print_error("%lu is not a valid slot ID.", slot_id);
46- exit_code = 4;
47- goto finalize;
48- }
49-
50 rv = funcs->C_OpenSession(slot_id, CKF_RW_SESSION |
51 CKF_SERIAL_SESSION, NULL_PTR, NULL_PTR, &sess);
52 if (rv != CKR_OK) {
53--
542.25.1
55
diff --git a/debian/patches/series b/debian/patches/series
index 58aa2da..89f2729 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
203-dlopen-soname.patch203-dlopen-soname.patch
304-pkcsslotd-cmdline-args.patch304-pkcsslotd-cmdline-args.patch
44
5f1f176cbb4183bcb8a0f7b4d7f649d84a731dd43.patch

Subscribers

People subscribed via source and target branches