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

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

Description of the change

opencryptoki-sru-lp1915517-bionic
    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
    minor patch adjustments were needed due to different whitespace, format and context
    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

ae6d3c5... by Frank Heimes

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

1e952cf... 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
1diff --git a/debian/changelog b/debian/changelog
2index 858465b..923291b 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,11 @@
6+opencryptoki (3.9.0+dfsg-0ubuntu1.4) bionic; urgency=medium
7+
8+ * debian/patches/f1f176cbb4183bcb8a0f7b4d7f649d84a731dd43.patch
9+ fixing migration of master key from OLD register to CURRENT register (from > 3.15.1)
10+ Thanks to Patrick Steuer (LP: #1915517)
11+
12+ -- Frank Heimes <frank.heimes@canonical.com> Tue, 02 Mar 2021 18:26:14 +0100
13+
14 opencryptoki (3.9.0+dfsg-0ubuntu1.3) bionic; urgency=medium
15
16 * Fix re-encryption of EP11 key blobs. (LP: #1854148)
17diff --git a/debian/patches/f1f176cbb4183bcb8a0f7b4d7f649d84a731dd43.patch b/debian/patches/f1f176cbb4183bcb8a0f7b4d7f649d84a731dd43.patch
18new file mode 100644
19index 0000000..1216170
20--- /dev/null
21+++ b/debian/patches/f1f176cbb4183bcb8a0f7b4d7f649d84a731dd43.patch
22@@ -0,0 +1,50 @@
23+From caa4bbba51cf470986944820ea773163084da0b7 Mon Sep 17 00:00:00 2001
24+From: Patrick Steuer <patrick.steuer@de.ibm.com>
25+Date: Tue, 19 Jan 2021 14:29:57 +0100
26+Subject: [PATCH] A slot ID has nothing to do with the number of slots
27+
28+Signed-off-by: Patrick Steuer <patrick.steuer@de.ibm.com>
29+
30+Author: Patrick Steuer <patrick.steuer@de.ibm.com>
31+Origin: upstream, https://github.com/opencryptoki/opencryptoki/commit/f1f176cbb4183bcb8a0f7b4d7f649d84a731dd43
32+ (now https://github.com/opencryptoki/opencryptoki/commit/caa4bbba51cf470986944820ea773163084da0b7)
33+Bug-IBM: Bugzilla 191527
34+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1915517
35+Applied-Upstream: > v3.15.1
36+Reviewed-by: Frank Heimes <frank.heimes@canonical.com>
37+Last-Update: 2021-03-02
38+
39+---
40+ usr/sbin/pkcscca/pkcscca.c | 14 --------------
41+ 1 file changed, 14 deletions(-)
42+
43+--- a/usr/sbin/pkcscca/pkcscca.c
44++++ b/usr/sbin/pkcscca/pkcscca.c
45+@@ -1032,7 +1032,6 @@
46+ {
47+ CK_FUNCTION_LIST *funcs;
48+ CK_KEY_TYPE key_type = 0;
49+- CK_ULONG slot_count;
50+ CK_SESSION_HANDLE sess;
51+ CK_RV rv;
52+ struct key_count count = {0,0,0,0,0,0,0};
53+@@ -1044,19 +1043,6 @@
54+ return 2;
55+ }
56+
57+- rv = funcs->C_GetSlotList(TRUE, NULL_PTR, &slot_count);
58+- if (rv != CKR_OK) {
59+- p11_error("C_GetSlotList" ,rv);
60+- exit_code = 3;
61+- goto finalize;
62+- }
63+-
64+- if (slot_id >= slot_count) {
65+- print_error("%lu is not a valid slot ID." , slot_id);
66+- exit_code = 4;
67+- goto finalize;
68+- }
69+-
70+ rv = funcs->C_OpenSession(slot_id, CKF_RW_SESSION|
71+ CKF_SERIAL_SESSION,NULL_PTR,NULL_PTR,
72+ &sess);
73diff --git a/debian/patches/series b/debian/patches/series
74index 2aeffe9..04336ac 100644
75--- a/debian/patches/series
76+++ b/debian/patches/series
77@@ -5,3 +5,4 @@
78 f5e55194748fc52360adbf69f7a7e8168644cc3b.patch
79 363f465755399e124b6f503db111c2b8390cfffe.patch
80 316e35e55b1fe90d963186d54e7d8c4f77ce94ed
81+f1f176cbb4183bcb8a0f7b4d7f649d84a731dd43.patch

Subscribers

People subscribed via source and target branches