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

Proposed by Frank Heimes
Status: Needs review
Proposed branch: ~fheimes/ubuntu/+source/opencryptoki:opencryptoki-sru-lp1915517-xenial
Merge into: ubuntu/+source/opencryptoki:ubuntu/xenial-devel
Diff against target: 82 lines (+60/-0)
3 files modified
debian/changelog (+9/-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+399075@code.launchpad.net

Description of the change

opencryptoki-sru-lp1915517-xenial
    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

90cd756... by Frank Heimes

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

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

Subscribers

People subscribed via source and target branches