diff --git a/ocki-3.5-fix-pkcscca-calls.patch b/ocki-3.5-fix-pkcscca-calls.patch new file mode 100644 index 0000000..907444e --- /dev/null +++ b/ocki-3.5-fix-pkcscca-calls.patch @@ -0,0 +1,35 @@ +From 814e5861701798b4f5872fcc20f7292f79987104 Mon Sep 17 00:00:00 2001 +From: Eduardo Barretto +Date: Tue, 30 Aug 2016 16:46:40 -0300 +Subject: [PATCH] PKCSCCA: Fix symbol name to get the correct address + +The csulincl.h file was changed to substitute the xxx_32 bit API +declarations with the latest CCA v5. In order to pkcscca work and avoid +"Illegal Instruction" we had to fix the symbol name that should be called +based on the csulincl.h change. + +Signed-off-by: Eduardo Barretto +--- + usr/sbin/pkcscca/pkcscca.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/usr/sbin/pkcscca/pkcscca.c b/usr/sbin/pkcscca/pkcscca.c +index 6d9f8dd..05caea3 100644 +--- a/usr/sbin/pkcscca/pkcscca.c ++++ b/usr/sbin/pkcscca/pkcscca.c +@@ -1387,9 +1387,9 @@ int main(int argc, char **argv) + return -1; + } + +- CSNDKTC = dlsym(lib_csulcca, "CSNDKTC_32"); +- CSNBKTC = dlsym(lib_csulcca, "CSNBKTC_32"); +- CSNBKTC2 = dlsym(lib_csulcca, "CSNBKTC2_32"); ++ CSNDKTC = dlsym(lib_csulcca, "CSNDKTC"); ++ CSNBKTC = dlsym(lib_csulcca, "CSNBKTC"); ++ CSNBKTC2 = dlsym(lib_csulcca, "CSNBKTC2"); + ret = migrate_wrapped_keys(slot_id, userpin, masterkey); + } + done: +-- +1.9.1 + diff --git a/openCryptoki.changes b/openCryptoki.changes index 048bcd0..cb7cc4f 100644 --- a/openCryptoki.changes +++ b/openCryptoki.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Sep 1 17:06:45 UTC 2016 - mpost@suse.com + +- Added ocki-3.5-fix-pkcscca-calls.patch (bsc#996887). + ------------------------------------------------------------------- Fri Jul 29 17:32:24 UTC 2016 - mpost@suse.com diff --git a/openCryptoki.spec b/openCryptoki.spec index 421f007..84f2168 100644 --- a/openCryptoki.spec +++ b/openCryptoki.spec @@ -71,6 +71,7 @@ Patch6: ocki-3.5-icsf-sessionhandle-missing-fix.patch Patch7: ocki-3.5-icsf-reasoncode-2028-added.patch Patch8: ocki-3.5-added-NULLreturn-check.patch Patch9: ocki-3.5-create-missing-tpm-token-lock-directory.patch +Patch10: ocki-3.5-fix-pkcscca-calls.patch Url: https://sourceforge.net/projects/opencryptoki/ BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -158,6 +159,7 @@ Cryptographic Accelerator (FC 4960 on pSeries). %patch7 -p1 %patch8 -p1 %patch9 -p1 +%patch10 -p1 cp %{SOURCE2} .