diff --git a/.gitignore b/.gitignore index 0ecc220..562477c 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ opencryptoki-2.3.1.tar.gz /opencryptoki-3.16.0.tar.gz /opencryptoki-3.17.0.tar.gz /opencryptoki-3.18.0.tar.gz +/opencryptoki-3.19.0.tar.gz diff --git a/opencryptoki-3.18.0-fix-json-output.patch b/opencryptoki-3.18.0-fix-json-output.patch deleted file mode 100644 index baa6ff7..0000000 --- a/opencryptoki-3.18.0-fix-json-output.patch +++ /dev/null @@ -1,47 +0,0 @@ -commit 1600eebb422ae2a733de3a0bd47464620e39ab0d -Author: Ingo Franzki -Date: Tue Jun 7 08:58:16 2022 +0200 - - pkcsstats: Fix JSON output in case of errors - - Produce correct JSON output, even if an error occurs during obtaining - of the statistics for a user. - - Signed-off-by: Ingo Franzki - -diff --git a/usr/sbin/pkcsstats/pkcsstats.c b/usr/sbin/pkcsstats/pkcsstats.c -index 8eb049dd..65d4833f 100644 ---- a/usr/sbin/pkcsstats/pkcsstats.c -+++ b/usr/sbin/pkcsstats/pkcsstats.c -@@ -789,7 +789,7 @@ int main(int argc, char **argv) - bool reset = false, reset_all = false; - bool delete = false, delete_all = false; - bool slot_id_specified = false; -- bool json = false; -+ bool json = false, json_started = false; - CK_SLOT_ID slot_id = 0; - void *dll = NULL; - CK_FUNCTION_LIST *func_list = NULL; -@@ -949,8 +949,11 @@ int main(int argc, char **argv) - goto done; - } - -- if (json && print_json_start() != 0) -- goto done; -+ if (json) { -+ if (print_json_start() != 0) -+ goto done; -+ json_started = true; -+ } - - dd.func_list = func_list; - dd.num_slots = num_slots; -@@ -972,7 +975,7 @@ int main(int argc, char **argv) - } - - done: -- if (rc == 0 && json) -+ if (json && json_started) - printf("\n\t]\n}\n"); - - if (slots != NULL) diff --git a/opencryptoki-3.18.0-returning_CKR_BUFFER_TOO_SMALL.patch b/opencryptoki-3.18.0-returning_CKR_BUFFER_TOO_SMALL.patch deleted file mode 100644 index 9dbbb74..0000000 --- a/opencryptoki-3.18.0-returning_CKR_BUFFER_TOO_SMALL.patch +++ /dev/null @@ -1,32 +0,0 @@ -commit b545050b338e46c29936a2748aab7200e69a5c91 -Author: Ingo Franzki -Date: Tue Jul 26 15:11:06 2022 +0200 - - EP11: Fix C_GetMechanismList returning CKR_BUFFER_TOO_SMALL - - For mixed card levels, the size query call and the call to obtain the - list may run on different cards. When the size query call runs on a - card with less mechanisms than the second call, will fail, but it - returns the larger larger number of mechanisms. - - The code already re-allocates the buffer for retrieving the mechanism - list, but does not return the larger number in pulCount. This will - lead to a CKR_BUFFER_TOO_SMALL when the application calls C_GetMechanismList - again to obtain the list of mechanisms, because the applications buffer - is too small. - - Signed-off-by: Ingo Franzki - -diff --git a/usr/lib/ep11_stdll/ep11_specific.c b/usr/lib/ep11_stdll/ep11_specific.c -index 8d796452..1629e664 100644 ---- a/usr/lib/ep11_stdll/ep11_specific.c -+++ b/usr/lib/ep11_stdll/ep11_specific.c -@@ -8977,6 +8977,8 @@ CK_RV ep11tok_get_mechanism_list(STDLL_TokData_t * tokdata, - if (rc != CKR_BUFFER_TOO_SMALL) - goto out; - } -+ /* counter was updated in case of CKR_BUFFER_TOO_SMALL */ -+ *pulCount = counter; - } while (rc == CKR_BUFFER_TOO_SMALL); - - for (i = 0; i < counter; i++) { diff --git a/opencryptoki.spec b/opencryptoki.spec index c6d7483..0b4544d 100644 --- a/opencryptoki.spec +++ b/opencryptoki.spec @@ -5,8 +5,8 @@ Name: opencryptoki Summary: Implementation of the PKCS#11 (Cryptoki) specification v3.0 -Version: 3.18.0 -Release: 5%{?dist} +Version: 3.19.0 +Release: 1%{?dist} License: CPL URL: https://github.com/opencryptoki/opencryptoki Source0: https://github.com/opencryptoki/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz @@ -18,8 +18,6 @@ Patch1: opencryptoki-3.11.0-lockdir.patch # add missing config file Patch2: opencryptoki-3.18.0-p11sak.patch # upstream patches -Patch100: opencryptoki-3.18.0-fix-json-output.patch -Patch101: opencryptoki-3.18.0-returning_CKR_BUFFER_TOO_SMALL.patch Requires(pre): coreutils Requires: (selinux-policy >= 34.9-1 if selinux-policy-targeted) @@ -301,6 +299,7 @@ fi %files devel %{_includedir}/%{name}/ +%{_libdir}/pkgconfig/opencryptoki.pc %files swtok %{_libdir}/opencryptoki/stdll/libpkcs11_sw.* @@ -356,6 +355,9 @@ fi %changelog +* Tue Oct 11 2022 Than Ngo - 3.19.0-1 +- update to 3.19.0 + * Wed Sep 14 2022 Florian Weimer - 3.18.0-5 - Add missing build dependency on systemd-rpm-macros diff --git a/sources b/sources index 5c6e201..36aee98 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (opencryptoki-3.18.0.tar.gz) = ec975ad15766d1565bb8134160c1a6373a1106486acc924f34d63d8a02c2f2b4d88caa443d17a5f7f92c8d99d3e5c1604073d879403e4f531019ced736422ea3 +SHA512 (opencryptoki-3.19.0.tar.gz) = 40d5fb9c5a716c72f7fb9d6ac60bac1854bfe4ee8568d1ed27af2265757bf916cfeafa3eefdfc45b72ec778685ee5f1bc42aecdb5a4340a7ed0b23f3bfe62a6c