From ee5cc2e86f74e1306753df85588353bf4c81576d17890a07bfd10b1496cd5622 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 15 Sep 2008 10:20:22 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/openCryptoki?expand=0&rev=4 --- ock_222_cmd_fix_ptr_to_arr.diff | 12 - ock_222_proc_struct_cmd_20060309.diff | 143 -- ock_64_bit_fixes.diff | 35 - ock_add_free_mech_list_20060131.diff | 25 - ock_head_ptr_to_null_20060308.diff | 11 - openCryptoki-2.2.2-rc2.tar.bz2 | 3 - openCryptoki-autoconf.patch | 135 -- openCryptoki-compile-fixes.patch | 1534 -------------------- openCryptoki-config.patch | 81 -- openCryptoki-no_mmap.patch | 11 - openCryptoki-per_user.patch | 331 ----- openCryptoki-pkcsslotd-removepidfile.patch | 32 - openCryptoki-prototypes.patch | 11 - openCryptoki-retval.patch | 107 -- openCryptoki.changes | 5 + openCryptoki.spec | 81 +- opencryptoki-2.2.6.tar.bz2 | 3 + 17 files changed, 52 insertions(+), 2508 deletions(-) delete mode 100644 ock_222_cmd_fix_ptr_to_arr.diff delete mode 100644 ock_222_proc_struct_cmd_20060309.diff delete mode 100644 ock_64_bit_fixes.diff delete mode 100644 ock_add_free_mech_list_20060131.diff delete mode 100644 ock_head_ptr_to_null_20060308.diff delete mode 100644 openCryptoki-2.2.2-rc2.tar.bz2 delete mode 100644 openCryptoki-autoconf.patch delete mode 100644 openCryptoki-compile-fixes.patch delete mode 100644 openCryptoki-config.patch delete mode 100644 openCryptoki-no_mmap.patch delete mode 100644 openCryptoki-per_user.patch delete mode 100644 openCryptoki-pkcsslotd-removepidfile.patch delete mode 100644 openCryptoki-prototypes.patch delete mode 100644 openCryptoki-retval.patch create mode 100644 opencryptoki-2.2.6.tar.bz2 diff --git a/ock_222_cmd_fix_ptr_to_arr.diff b/ock_222_cmd_fix_ptr_to_arr.diff deleted file mode 100644 index bbcb747..0000000 --- a/ock_222_cmd_fix_ptr_to_arr.diff +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur ./openCryptoki-2.2.2-rc2/usr/sbin/pkcsslotd/garbage_linux.h openCryptoki-2.2.2-rc2-cmd_fix/usr/sbin/pkcsslotd/garbage_linux.h ---- ./openCryptoki-2.2.2-rc2/usr/sbin/pkcsslotd/garbage_linux.h 2006-04-04 14:45:04.000000000 -0500 -+++ openCryptoki-2.2.2-rc2-cmd_fix/usr/sbin/pkcsslotd/garbage_linux.h 2006-04-04 14:50:40.000000000 -0500 -@@ -301,7 +301,7 @@ - pid; /* process id */ - - char -- *cmd, /* command line string vector for /proc//cmdline */ -+ cmd[16], /* command line string vector for /proc//cmdline */ - state; /* single-char code for process state [R, S, D, Z, or T] */ - - int diff --git a/ock_222_proc_struct_cmd_20060309.diff b/ock_222_proc_struct_cmd_20060309.diff deleted file mode 100644 index 9deacd2..0000000 --- a/ock_222_proc_struct_cmd_20060309.diff +++ /dev/null @@ -1,143 +0,0 @@ -Index: usr/sbin/pkcsslotd/garbage_linux.c -=================================================================== -RCS file: /cvsroot/opencryptoki/opencryptoki/usr/sbin/pkcsslotd/garbage_linux.c,v -retrieving revision 1.4 -diff -a -u -r1.4 garbage_linux.c ---- usr/sbin/pkcsslotd/garbage_linux.c 24 Jan 2006 17:18:25 -0000 1.4 -+++ usr/sbin/pkcsslotd/garbage_linux.c 9 Mar 2006 17:06:15 -0000 -@@ -295,91 +295,15 @@ - #include - #include - #include --/* #include "garbage_linux.h" */ - #pragma info(restore) - -- - #define PROC_BASE "/proc" - -- - extern BOOL GCBlockSignals (void); - -- - #if !defined(NOGARBAGE) - -- --/* -- * Basic data structure which holds information we can get about a process. -- * (unless otherwise specified, fields are read from /proc//stat) -- * -- * Comes from task_struct in linux/sched.h -- */ --typedef struct { -- int -- pid; /* process id */ -- -- char -- *cmd, /* command line string vector for /proc//cmdline */ -- state; /* single-char code for process state [R, S, D, Z, or T] */ -- -- int -- ppid, /* pid of parent process */ -- pgrp, /* process group id */ -- session, /* session id */ -- tty, /* full device number of controlling terminal */ -- tpgid; /* terminal process group id */ -- -- unsigned long -- flags, /* kernel flags for the process */ -- min_flt, /* number of minor page faults since process start */ -- cmin_flt, /* cumulative min_flt of process and child processes */ -- maj_flt, /* number of major page faults since process start */ -- cmaj_flt, /* cumulative maj_flt of process and child processes */ -- utime, /* user-mode CPU time accumulated by process */ -- stime; /* kernel-mode CPU time accumulated by process */ -- -- long -- cutime, /* cumulative utime of process and reaped children */ -- cstime, /* cumulative stime of process and reaped children */ -- priority, /* kernel scheduling priority */ -- nice, /* standard unix nice level of process */ -- timeout, /* ? */ -- it_real_value; /* ? */ -- -- unsigned long -- start_time, /* start time of process -- seconds since 1-1-70 */ -- vsize; /* number of pages of virtual memory ... */ -- -- long -- rss; /* resident set size from /proc//stat (pages) */ -- -- unsigned long -- rss_rlim, /* resident set size limit? */ -- start_code, /* address of beginning of code segment */ -- end_code, /* address of end of code segment */ -- start_stack, /* address of the bottom of stack for the process */ -- kstk_esp, /* kernel stack pointer */ -- kstk_eip; /* kernel instruction pointer */ -- -- char -- /* Linux 2.1.7x and up have more signals. This handles 88. */ -- /* long long (instead of char xxxxxx[24]) handles 64 */ -- signal[24], /* mask of pending signals */ -- blocked[24], /* mask of blocked signals */ -- sigignore[24], /* mask of ignored signals */ -- sigcatch[24]; /* mask of caught signals */ -- -- unsigned long -- wchan, /* address of kernel wait channel proc is sleeping in */ -- nswap, /* ? */ -- cnswap; /* cumulative nswap ? */ -- -- int -- exit_signal, -- processor; -- --} proc_t; -- -+#include "garbage_linux.h" - - #ifdef PKCS64 - BOOL IsValidProcessEntry ( pid_t_64 pid, time_t_64 RegTime ); -Index: usr/sbin/pkcsslotd/garbage_linux.h -=================================================================== -RCS file: /cvsroot/opencryptoki/opencryptoki/usr/sbin/pkcsslotd/garbage_linux.h,v -retrieving revision 1.2 -diff -a -u -r1.2 garbage_linux.h ---- usr/sbin/pkcsslotd/garbage_linux.h 24 Jan 2006 17:18:26 -0000 1.2 -+++ usr/sbin/pkcsslotd/garbage_linux.h 9 Mar 2006 17:06:24 -0000 -@@ -291,18 +291,11 @@ - - */ - --/* (C) COPYRIGHT International Business Machines Corp. 2001 */ -- -+/* (C) COPYRIGHT International Business Machines Corp. 2001 */ - - #ifndef GARBAGE_LINUX_H - #define GARBAGE_LINUX_H - --/* -- * Basic data structure which holds all information we can get about a process. -- * (unless otherwise specified, fields are read from /proc/#/stat) -- * -- * Most of it comes from task_struct in linux/sched.h -- */ - typedef struct { - int - pid; /* process id */ -@@ -323,7 +316,7 @@ - min_flt, /* number of minor page faults since process start */ - cmin_flt, /* cumulative min_flt of process and child processes */ - maj_flt, /* number of major page faults since process start */ -- cmaj_flt; /* cumulative maj_flt of process and child processes */ -+ cmaj_flt, /* cumulative maj_flt of process and child processes */ - utime, /* user-mode CPU time accumulated by process */ - stime; /* kernel-mode CPU time accumulated by process */ - -@@ -369,6 +362,5 @@ - - } proc_t; - -- - #endif - diff --git a/ock_64_bit_fixes.diff b/ock_64_bit_fixes.diff deleted file mode 100644 index b8fa729..0000000 --- a/ock_64_bit_fixes.diff +++ /dev/null @@ -1,35 +0,0 @@ -diff -Naur ./openCryptoki-2.2.2-rc2/usr/lib/pkcs11/api/apiutil.c ./openCryptoki-2.2.2-rc2-64_bit_fixes/usr/lib/pkcs11/api/apiutil.c ---- ./openCryptoki-2.2.2-rc2/usr/lib/pkcs11/api/apiutil.c 2006-04-10 22:22:16.000000000 +0200 -+++ ./openCryptoki-2.2.2-rc2-64_bit_fixes/usr/lib/pkcs11/api/apiutil.c 2006-04-10 22:23:07.000000000 +0200 -@@ -1026,16 +1026,17 @@ - - // Check for the name specified to be corre - sprintf(path,"%s",sinfp->dll_location); // make a copy since dir name can change the memory -- sprintf(path2,"%s/stdll",LIBLOCATION); // make a copy since dir name can change the memory - dname = dirname(path); -+ sprintf(path2,"%s/stdll%s",LIBLOCATION,&(sinfp->dll_location[strlen(dname)])); // make a copy since dir name can change the memory -+ /* - if (strcmp(dname,path2) != 0 ) { - // Not in the location we expect - sltp->dlop_p = NULL; - return 0; - - } -- -- dllload[i].dlop_p = dlopen(sinfp->dll_location,RTLD_NOW); -+ */ -+ dllload[i].dlop_p = dlopen(path2,RTLD_NOW); - - if (dllload[i].dlop_p != NULL ){ - sltp->dlop_p = dllload[i].dlop_p; -diff -Naur ./openCryptoki-2.2.2-rc2/usr/lib/pkcs11/common/utility.c ./openCryptoki-2.2.2-rc2-64_bit_fixes/usr/lib/pkcs11/common/utility.c ---- ./openCryptoki-2.2.2-rc2/usr/lib/pkcs11/common/utility.c 2006-04-10 22:22:16.000000000 +0200 -+++ ./openCryptoki-2.2.2-rc2-64_bit_fixes/usr/lib/pkcs11/common/utility.c 2006-04-10 22:22:53.000000000 +0200 -@@ -294,6 +294,7 @@ - #include - #include - #include -+#include - #include - #include - #include diff --git a/ock_add_free_mech_list_20060131.diff b/ock_add_free_mech_list_20060131.diff deleted file mode 100644 index 2f9ede6..0000000 --- a/ock_add_free_mech_list_20060131.diff +++ /dev/null @@ -1,25 +0,0 @@ -Index: ./usr/lib/pkcs11/ica_s390_stdll/ica_specific.c -=================================================================== -RCS file: /cvsroot/opencryptoki/opencryptoki/usr/lib/pkcs11/ica_s390_stdll/ica_specific.c,v -retrieving revision 1.6 -diff -a -u -r1.6 ica_specific.c ---- ./usr/lib/pkcs11/ica_s390_stdll/ica_specific.c 4 Jan 2006 15:05:50 -0000 1.6 -+++ ./usr/lib/pkcs11/ica_s390_stdll/ica_specific.c 31 Jan 2006 17:06:13 -0000 -@@ -2050,6 +2050,7 @@ - int rc = CKR_OK; - struct mech_list_item head; - struct mech_list_item *walker; -+ head.next = NULL; - #if 1 - rc = ock_generic_get_mechanism_list(pMechanismList, pulCount); - if (rc != CKR_OK) { -@@ -2090,7 +2091,8 @@ - walker = next; - } - #endif -- out: -+out: -+ free_mech_list(&head); - return rc; - } - diff --git a/ock_head_ptr_to_null_20060308.diff b/ock_head_ptr_to_null_20060308.diff deleted file mode 100644 index 34ef73b..0000000 --- a/ock_head_ptr_to_null_20060308.diff +++ /dev/null @@ -1,11 +0,0 @@ -diff -Naur ./openCryptoki-2.2.2-rc2/usr/lib/pkcs11/ica_s390_stdll/ica_specific.c openCryptoki-2.2.2-rc2-head_ptr_to_null/usr/lib/pkcs11/ica_s390_stdll/ica_specific.c ---- ./openCryptoki-2.2.2-rc2/usr/lib/pkcs11/ica_s390_stdll/ica_specific.c 2006-03-08 13:06:28.000000000 -0500 -+++ openCryptoki-2.2.2-rc2-head_ptr_to_null/usr/lib/pkcs11/ica_s390_stdll/ica_specific.c 2006-03-08 13:07:11.000000000 -0500 -@@ -2110,6 +2110,7 @@ - int rc = CKR_MECHANISM_INVALID; - struct mech_list_item head; - struct mech_list_item *walker; -+ head.next = NULL; - #if 1 - rc = ock_generic_get_mechanism_info(type, pInfo); - if (rc == CKR_OK) { diff --git a/openCryptoki-2.2.2-rc2.tar.bz2 b/openCryptoki-2.2.2-rc2.tar.bz2 deleted file mode 100644 index 0e31762..0000000 --- a/openCryptoki-2.2.2-rc2.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:38e80887e0fadf5d6ca2c7ba7a561dbdc98f01595148bc62d31f8fe848930a5b -size 612893 diff --git a/openCryptoki-autoconf.patch b/openCryptoki-autoconf.patch deleted file mode 100644 index 11e1acb..0000000 --- a/openCryptoki-autoconf.patch +++ /dev/null @@ -1,135 +0,0 @@ ---- find_files.sh -+++ find_files.sh -@@ -21,7 +21,7 @@ - # Recursively search these paths for header or library file(s) - # - HDR_PATHS="${ADDED_INCS} /usr/include /usr/local/include /usr/X11R6/include $HOME/include" --LIB_PATHS="${ADDED_LIBS} /lib /usr/lib /usr/local/lib /usr/X11R6/lib $HOME/lib" -+LIB_PATHS="${ADDED_LIBS} /lib /lib64 /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64 /usr/X11R6/lib $HOME/lib" - - - if [ "$1" == "LIB" ]; then ---- usr/lib/pkcs11/aep_stdll/Makefile.am -+++ usr/lib/pkcs11/aep_stdll/Makefile.am -@@ -4,7 +4,7 @@ - - PKCS11_AEP_so_LDFLAGS = $(LCRYPTO) $(AEP_LIB_DIRS) -nostartfiles -shared -Wl,-soname,PKCS11_AEP.so.1 -lc -lpthread -lcrypto -laep - --CFLAGS = $(PERFFLAG) -DSPINXPL -DDEV -D_THREAD_SAFE -DLINUX -fPIC -DSHALLOW=0 -DSWTOK=1 -DLITE=0 -DNOCDMF -DNOMD2 -DNODSA -DDEBUGON -DAEP_GENERIC -+AM_CFLAGS = $(PERFFLAG) -DSPINXPL -DDEV -D_THREAD_SAFE -DLINUX -fPIC -DSHALLOW=0 -DSWTOK=1 -DLITE=0 -DNOCDMF -DNOMD2 -DNODSA -DDEBUGON -DAEP_GENERIC - - VPATH= ./:../common - ---- usr/lib/pkcs11/api/Makefile.am -+++ usr/lib/pkcs11/api/Makefile.am -@@ -2,7 +2,7 @@ - bin_PROGRAMS=PKCS11_API.so - bindir=/tmp - PKCS11_API_so_LDFLAGS = -g -nostartfiles -shared -Wl,-soname,$@ -Wl,-Bsymbolic -lc -ldl -lpthread --CFLAGS = $(PERFFLAG) $(PKCS64_FLG) -DSPINXPL -DAPI -DDEV -D_THREAD_SAFE -DLINUX -fPIC -+AM_CFLAGS = $(PERFFLAG) $(PKCS64_FLG) -DSPINXPL -DAPI -DDEV -D_THREAD_SAFE -DLINUX -fPIC - PKCS11_API_so_SOURCES = api_interface.c shrd_mem.c apiutil.c - INCLUDES = -I../. -I../../../include/pkcs11 - ---- usr/lib/pkcs11/bcom_stdll/Makefile.am -+++ usr/lib/pkcs11/bcom_stdll/Makefile.am -@@ -5,7 +5,7 @@ - PKCS11_BC_so_LDFLAGS = $(LCRYPTO) $(BC_LIB_DIRS) -nostartfiles -shared -Wl,-Bsymbolic -Wl,-soname,PKCS11_BC.so.1 -lc -lpthread -lubsec -ldl -lcrypto - - VARIANT = -DSHALLOW=0 -DSWTOK=1 -DLITE=0 --CFLAGS = $(PERFFLAG) -DSPINXPL -DDEV -D_THREAD_SAFE -DLINUX -fPIC $(VARIANT) -DNOCDMF -DNOMD2 -DNODSA -DNOAES -DNODH -DDEBUGON -D_LINUX -D_LINUX_ -+AM_CFLAGS = $(PERFFLAG) -DSPINXPL -DDEV -D_THREAD_SAFE -DLINUX -fPIC $(VARIANT) -DNOCDMF -DNOMD2 -DNODSA -DNOAES -DNODH -DDEBUGON -D_LINUX -D_LINUX_ - - VPATH= ./:../common - ---- usr/lib/pkcs11/cr_stdll/Makefile.am -+++ usr/lib/pkcs11/cr_stdll/Makefile.am -@@ -5,7 +5,7 @@ - PKCS11_CR_so_LDFLAGS = $(LCRYPTO) $(CR_LIB_DIRS) -nostartfiles -shared -Wl,-Bsymbolic -Wl,-soname,PKCS11_BC.so.1 -lc -lpthread -lsocketarmor -ldl -lcrypto - - VARIANT = -DSHALLOW=0 -DSWTOK=1 -DLITE=0 --CFLAGS = $(PERFFLAG) -DSPINXPL -DDEV -D_THREAD_SAFE -DLINUX -fPIC $(VARIANT) -DNOCDMF -DNOMD2 -DNODSA -DDEBUGON -D_LINUX -D_LINUX_ -+AM_CFLAGS = $(PERFFLAG) -DSPINXPL -DDEV -D_THREAD_SAFE -DLINUX -fPIC $(VARIANT) -DNOCDMF -DNOMD2 -DNODSA -DDEBUGON -D_LINUX -D_LINUX_ - - VPATH= ./:../common - ---- usr/lib/pkcs11/ica_s390_stdll/Makefile.am -+++ usr/lib/pkcs11/ica_s390_stdll/Makefile.am -@@ -6,7 +6,7 @@ - - PKCS11_ICA_so_LDFLAGS = $(LCRYPTO) $(ICA_LIB_DIRS) -nostartfiles -shared -Wl,-Bsymbolic -Wl,-soname,$@ -Wl,-Bsymbolic -lc -lpthread -lica -ldl -lcrypto - --CFLAGS = $(PERFFLAG) $(PKCS64_FLG) -DSPINXPL -DDEV -D_THREAD_SAFE -DLINUX -fPIC -DSHALLOW=0 -DSWTOK=0 -DLITE=1 -DNODH -DNOAES -DNOCDMF -DNOMD2 -DNODSA -D_LINUX -D_LINUX_ -+AM_CFLAGS = $(PERFFLAG) $(PKCS64_FLG) -DSPINXPL -DDEV -D_THREAD_SAFE -DLINUX -fPIC -DSHALLOW=0 -DSWTOK=0 -DLITE=1 -DNODH -DNOAES -DNOCDMF -DNOMD2 -DNODSA -D_LINUX -D_LINUX_ - - VPATH= ./:../common - ---- usr/lib/pkcs11/ica_stdll/Makefile.am -+++ usr/lib/pkcs11/ica_stdll/Makefile.am -@@ -4,7 +4,7 @@ - - PKCS11_ICA_so_LDFLAGS = $(LCRYPTO) $(ICA_LIB_DIRS) -nostartfiles -shared -Wl,-Bsymbolic -Wl,-soname,PKCS11_ICA.so.1 -lc -lpthread -lica -ldl -lcrypto - --CFLAGS = $(PERFFLAG) -DSPINXPL -DDEV -D_THREAD_SAFE -DLINUX -fPIC -DSHALLOW=0 -DSWTOK=0 -DLITE=1 -DNOCDMF -DNOMD2 -DNODSA -DNOAES -DNODH -D_LINUX -D_LINUX_ -+AM_CFLAGS = $(PERFFLAG) -DSPINXPL -DDEV -D_THREAD_SAFE -DLINUX -fPIC -DSHALLOW=0 -DSWTOK=0 -DLITE=1 -DNOCDMF -DNOMD2 -DNODSA -DNOAES -DNODH -D_LINUX -D_LINUX_ - - VPATH= ./:../common - ---- usr/lib/pkcs11/leeds_stdll/Makefile.am -+++ usr/lib/pkcs11/leeds_stdll/Makefile.am -@@ -5,7 +5,7 @@ - - LIBS = -lscc - --CFLAGS = $(PERFFLAG) -DDEV -D_THREAD_SAFE -DLINUX -DLEEDS_BUILD -DAIXSTDLL -D_LINUX_ -+AM_CFLAGS = $(PERFFLAG) -DDEV -D_THREAD_SAFE -DLINUX -DLEEDS_BUILD -DAIXSTDLL -D_LINUX_ - - PKCS11_4758_so_SOURCES = host_api.c util.c - ---- usr/lib/pkcs11/methods/4758_status/Makefile.am -+++ usr/lib/pkcs11/methods/4758_status/Makefile.am -@@ -3,9 +3,9 @@ - bindir=/tmp - - --LDFLAGS = $(SCC_LIB_DIRS) -ldl -lpthread -+AM_LDFLAGS = $(SCC_LIB_DIRS) -ldl -lpthread - LIBS = -lscc --CFLAGS = $(PERFFLAG) -DDEV -D_THREAD_SAFE -DLINUX -DDEBUG -DAPI -+AM_CFLAGS = $(PERFFLAG) -DDEV -D_THREAD_SAFE -DLINUX -DDEBUG -DAPI - - SOURCES = 4758_status.c - ---- usr/lib/pkcs11/methods/pkcsconf/Makefile.am -+++ usr/lib/pkcs11/methods/pkcsconf/Makefile.am -@@ -4,7 +4,7 @@ - - pkcsconf_LDFLAGS = -lpthread -ldl - --CFLAGS = $(PERFFLAG) $(PKCS64_FLG) -DSPINXPL -DLINUX -D_THREAD_SAFE -DDEBUG -DDEV -DAPI -+AM_CFLAGS = $(PERFFLAG) $(PKCS64_FLG) -DSPINXPL -DLINUX -D_THREAD_SAFE -DDEBUG -DDEV -DAPI - - pkcsconf_SOURCES = pkcsconf.c - ---- usr/lib/pkcs11/soft_stdll/Makefile.am -+++ usr/lib/pkcs11/soft_stdll/Makefile.am -@@ -4,7 +4,7 @@ - - PKCS11_SW_so_LDFLAGS = $(LCRYPTO) -nostartfiles -shared -Wl,-Bsymbolic -Wl,-soname,PKCS11_SW.so.1 -lc -lpthread -lcrypto - --CFLAGS = $(PERFFLAG) -DSPINXPL -DDEV -D_THREAD_SAFE -DLINUX -fPIC -DSHALLOW=0 -DSWTOK=1 -DLITE=0 -DNOCDMF -DNOMD2 -DNODSA -DDEBUGON -+AM_CFLAGS = $(PERFFLAG) -DSPINXPL -DDEV -D_THREAD_SAFE -DLINUX -fPIC -DSHALLOW=0 -DSWTOK=1 -DLITE=0 -DNOCDMF -DNOMD2 -DNODSA -DDEBUGON - - VPATH= ./:../common - ---- usr/sbin/pkcsslotd/Makefile.am -+++ usr/sbin/pkcsslotd/Makefile.am -@@ -4,7 +4,7 @@ - - pkcsslotd_LDFLAGS = -lpthread - --CFLAGS = $(PERFFLAG) $(PKCS64_FLG) -DSPINXPL -DLINUX -DPROGRAM_NAME=\"$(@)\" -DNOODM -DNODAE -+AM_CFLAGS = $(PERFFLAG) $(PKCS64_FLG) -DSPINXPL -DLINUX -DPROGRAM_NAME=\"$(@)\" -DNOODM -DNODAE - - pkcsslotd_SOURCES = slotmgr.c shmem.c signal.c mutex.c err.c log.c daemon.c no_odm.c garbage_linux.c - diff --git a/openCryptoki-compile-fixes.patch b/openCryptoki-compile-fixes.patch deleted file mode 100644 index fcd4c86..0000000 --- a/openCryptoki-compile-fixes.patch +++ /dev/null @@ -1,1534 +0,0 @@ -? openCryptoki-config.patch -? opencryptoki-compile-fixes.patch -? opencryptoki-include-fix.patch -? tmp.diff -Index: testcases/driver/driver.c -=================================================================== -RCS file: /cvsroot/opencryptoki/opencryptoki/testcases/driver/driver.c,v -retrieving revision 1.6 -diff -p -u -r1.6 driver.c ---- testcases/driver/driver.c 11 Jan 2006 19:36:15 -0000 1.6 -+++ testcases/driver/driver.c 12 Jan 2006 09:56:32 -0000 -@@ -74,7 +74,7 @@ void process_time(SYSTEMTIME t1, SYSTEMT - - - -- printf("Time: %u msec\n", ms ); -+ printf("Time: %ld msec\n", ms ); - - } - -@@ -174,7 +174,7 @@ void process_ret_code( CK_RV rc ) - // - void show_error( CK_BYTE *str, CK_RV rc ) - { -- printf("%s returned: %d (0x%0x)", str, rc, rc ); -+ printf("%s returned: %d (0x%0x)", str, (int)rc, (int)rc ); - process_ret_code( rc ); - printf("\n"); - } -@@ -261,7 +261,7 @@ int main (int argc, char **argv) - for (i = 1; i < argc; i++) { - if (strcmp (argv[i], "-h") == 0 || strcmp (argv[i], "--help") == 0) { - usage (argv [0]); -- return; -+ return -1; - } - else if (strcmp (argv[i], "-noskip") == 0) - skip_token_obj = FALSE; -@@ -275,16 +275,16 @@ int main (int argc, char **argv) - else { - printf ("Invalid argument passed as option: %s\n", argv [i]); - usage (argv [0]); -- return; -+ return -1; - } - } - -- printf("Using slot #%d...\n\n", SLOT_ID ); -+ printf("Using slot #%d...\n\n", (int)SLOT_ID ); - printf("With option: no_init: %d, noskip: %d\n", no_init, skip_token_obj); - - rc = do_GetFunctionList(); - if (!rc) -- return; -+ return rc; - - memset( &cinit_args, 0x0, sizeof(cinit_args) ); - cinit_args.flags = CKF_OS_LOCKING_OK; -@@ -294,15 +294,15 @@ int main (int argc, char **argv) - funcs->C_Initialize( &cinit_args ); - - { -- CK_SESSION_HANDLE hsess; -+ CK_SESSION_HANDLE hsess = 0; - - rc = funcs->C_GetFunctionStatus(hsess); - if (rc != CKR_FUNCTION_NOT_PARALLEL) -- return; -+ return rc; - - rc = funcs->C_CancelFunction(hsess); - if (rc != CKR_FUNCTION_NOT_PARALLEL) -- return; -+ return rc; - - } - -@@ -313,25 +313,25 @@ int main (int argc, char **argv) - fprintf (stderr, "\tMisc Functions tests...\n"); - rc = misc_functions(); - if (!rc) -- return; -+ return rc; - - fprintf (stderr, "\tSession Mgmt Functions tests...\n"); - rc = sess_mgmt_functions(); - if (!rc) -- return; -+ return rc; - - fprintf (stderr, "\tObject Mgmt Functions tests...\n"); - rc = obj_mgmt_functions(); - if (!rc) -- return; -+ return rc; - - rc = des_functions(); - if (!rc) -- return; -+ return rc; - - rc = des3_functions(); - if (!rc) -- return; -+ return rc; - - rc = aes_functions(); - if (!rc) { -@@ -340,21 +340,21 @@ int main (int argc, char **argv) - - rc = digest_functions(); - if (!rc) -- return; -+ return rc; - - rc = rsa_functions(); - if (!rc) -- return; -+ return rc; - - /* Begin code contributed by Corrent corp. */ - rc = dh_functions(); - if (!rc) -- return; -+ return rc; - /* End code contributed by Corrent corp. */ - - rc = ssl3_functions(); - if (!rc) -- return; -+ return rc; - printf("------------------ Completed pass %d --------------------\n",i); - i++; - -@@ -362,4 +362,6 @@ int main (int argc, char **argv) - } - - funcs->C_Finalize( NULL ); -+ -+return 0; - } -Index: testcases/init_tok/init_tok.c -=================================================================== -RCS file: /cvsroot/opencryptoki/opencryptoki/testcases/init_tok/init_tok.c,v -retrieving revision 1.6 -diff -p -u -r1.6 init_tok.c ---- testcases/init_tok/init_tok.c 17 Jun 2005 15:35:19 -0000 1.6 -+++ testcases/init_tok/init_tok.c 12 Jan 2006 09:56:33 -0000 -@@ -686,7 +686,7 @@ int main( int argc, char **argv ) - if (strcmp(argv[i], "-h") == 0) { - printf("usage: %s [-slot ] [-h]\n\n", argv[0] ); - printf("By default, Slot #1 is used\n\n"); -- return; -+ return -1; - } - } - -@@ -705,6 +705,6 @@ int main( int argc, char **argv ) - done: - - rc = funcs->C_Finalize( NULL ); -- if (rc != CKR_OK) -- return rc; -+ -+ return rc; - } -Index: testcases/mkobj/mkobj.c -=================================================================== -RCS file: /cvsroot/opencryptoki/opencryptoki/testcases/mkobj/mkobj.c,v -retrieving revision 1.6 -diff -p -u -r1.6 mkobj.c ---- testcases/mkobj/mkobj.c 17 Jun 2005 15:35:19 -0000 1.6 -+++ testcases/mkobj/mkobj.c 12 Jan 2006 09:56:33 -0000 -@@ -705,6 +705,6 @@ int main( int argc, char **argv ) - } while (++i < 1 ); - - rc = funcs->C_Finalize( NULL ); -- if (rc != CKR_OK) -- return rc; -+ -+ return rc; - } -Index: testcases/rsa_keygen/rsa_keygen.c -=================================================================== -RCS file: /cvsroot/opencryptoki/opencryptoki/testcases/rsa_keygen/rsa_keygen.c,v -retrieving revision 1.6 -diff -p -u -r1.6 rsa_keygen.c ---- testcases/rsa_keygen/rsa_keygen.c 17 Jun 2005 15:35:19 -0000 1.6 -+++ testcases/rsa_keygen/rsa_keygen.c 12 Jan 2006 09:56:33 -0000 -@@ -139,7 +139,7 @@ void process_time(SYSTEMTIME t1, SYSTEMT - - - -- printf("Time: %u msec\n", ms ); -+ printf("Time: %ld msec\n", ms ); - - } - -@@ -239,7 +239,7 @@ void process_ret_code( CK_RV rc ) - // - void show_error( CK_BYTE *str, CK_RV rc ) - { -- printf("%s returned: %d (0x%0x)", str, rc, rc ); -+ printf("%s returned: %d (0x%0x)", str, (int)rc, (int)rc ); - process_ret_code( rc ); - printf("\n"); - } -@@ -332,11 +332,11 @@ int main( int argc, char **argv ) - printf("By default, Slot #1 is used\n\n"); - printf("By default we skip anything that creates or modifies\n"); - printf("token objects to preserve flash lifetime.\n"); -- return; -+ return -1; - } - } - -- printf("Using slot #%d...\n\n", SLOT_ID ); -+ printf("Using slot #%d...\n\n", (int)SLOT_ID ); - - rc = do_GetFunctionList(); - if (!rc) -@@ -355,4 +355,6 @@ int main( int argc, char **argv ) - return rc; - - funcs->C_Finalize( NULL ); -+ -+ return 0; - } -Index: testcases/rsa_test/rsa_test.c -=================================================================== -RCS file: /cvsroot/opencryptoki/opencryptoki/testcases/rsa_test/rsa_test.c,v -retrieving revision 1.6 -diff -p -u -r1.6 rsa_test.c ---- testcases/rsa_test/rsa_test.c 17 Jun 2005 15:35:19 -0000 1.6 -+++ testcases/rsa_test/rsa_test.c 12 Jan 2006 09:56:33 -0000 -@@ -567,4 +567,6 @@ int main( int argc, char **argv ) - return rc; - - funcs->C_Finalize( NULL ); -+ -+ return 0; - } -Index: testcases/speed/speed.c -=================================================================== -RCS file: /cvsroot/opencryptoki/opencryptoki/testcases/speed/speed.c,v -retrieving revision 1.6 -diff -p -u -r1.6 speed.c ---- testcases/speed/speed.c 17 Jun 2005 15:35:19 -0000 1.6 -+++ testcases/speed/speed.c 12 Jan 2006 09:56:33 -0000 -@@ -1329,6 +1329,8 @@ int do_DummyFunction( void ) - printf("Minimum: %d ms\n", min_time ); - printf("Maximum: %d ms\n", max_time ); - #endif -+ -+ return 0; - } - - -Index: testcases/threadmkobj/threadmkobj.c -=================================================================== -RCS file: /cvsroot/opencryptoki/opencryptoki/testcases/threadmkobj/threadmkobj.c,v -retrieving revision 1.5 -diff -p -u -r1.5 threadmkobj.c ---- testcases/threadmkobj/threadmkobj.c 17 Jun 2005 15:35:20 -0000 1.5 -+++ testcases/threadmkobj/threadmkobj.c 12 Jan 2006 09:56:33 -0000 -@@ -192,7 +192,7 @@ CK_BYTE true = TRUE; - - rc = funcs->C_Login( h_session, CKU_USER, user_pin, user_pin_len ); - -- -+ return rc; - } - - // do_create_token_object() -@@ -313,7 +313,7 @@ main( int argc, char **argv ) - if (strcmp(argv[i], "-h") == 0) { - printf("usage: %s [-slot ] [-h]\n\n", argv[0] ); - printf("By default, Slot #1 is used\n\n"); -- return; -+ return -1; - } - } - -@@ -321,7 +321,7 @@ main( int argc, char **argv ) - - rc = do_GetFunctionList(); - if (!rc) -- return; -+ return rc; - - funcs->C_Initialize( NULL ); - -@@ -339,6 +339,6 @@ main( int argc, char **argv ) - } - - rc = funcs->C_Finalize( NULL ); -- if (rc != CKR_OK) -- return; -+ -+ return rc; - } -Index: usr/lib/pkcs11/api/api_interface.c -=================================================================== -RCS file: /cvsroot/opencryptoki/opencryptoki/usr/lib/pkcs11/api/api_interface.c,v -retrieving revision 1.6 -diff -p -u -r1.6 api_interface.c ---- usr/lib/pkcs11/api/api_interface.c 12 Aug 2005 19:54:51 -0000 1.6 -+++ usr/lib/pkcs11/api/api_interface.c 12 Jan 2006 09:56:34 -0000 -@@ -297,7 +297,7 @@ - - #include - #include -- -+#include - #include - - #include -@@ -2555,13 +2555,13 @@ C_GetInfo ( CK_INFO_PTR pInfo ) - - shm = Anchor->SharedMemP; - -- bzero(pInfo, sizeof(*pInfo)); -+ memset(pInfo, 0, sizeof(*pInfo)); - - pInfo->cryptokiVersion = shm->ck_info.cryptokiVersion; - memset(pInfo->manufacturerID, '\0', 32); -- bcopy(&(shm->ck_info.manufacturerID),pInfo->manufacturerID,32); -+ memcpy(pInfo->manufacturerID,&(shm->ck_info.manufacturerID),32); - pInfo->flags = shm->ck_info.flags; -- bcopy(&(shm->ck_info.libraryDescription),pInfo->libraryDescription,32); -+ memcpy(pInfo->libraryDescription,&(shm->ck_info.libraryDescription),32); - pInfo->libraryVersion = shm->ck_info.libraryVersion; - - return CKR_OK; -@@ -2586,7 +2586,7 @@ C_GetInfo ( CK_INFO_PTR pInfo ) - } - - shm = Anchor->SharedMemP; -- bcopy(&(shm->ck_info),pInfo,sizeof(CK_INFO)); -+ memcpy(pInfo,&(shm->ck_info),sizeof(CK_INFO)); - - return CKR_OK; - } // end of C_GetInfo -@@ -2972,14 +2972,14 @@ C_GetSlotInfo ( CK_SLOT_ID slotID, - - #ifdef __64BIT__ - -- bcopy((char *)&(sinfp->pk_slot),pInfo,sizeof(CK_SLOT_INFO)); -+ memcpy(pInfo,(char *)&(sinfp->pk_slot),sizeof(CK_SLOT_INFO)); - - #else - -- bcopy((char *)&(sinfp->pk_slot.slotDescription[0]), -- (char *)&(pInfo->slotDescription[0]),64); -- bcopy((char *)&(sinfp->pk_slot.manufacturerID[0]), -- (char *)&(pInfo->manufacturerID[0]),32); -+ memcpy((char *)&(pInfo->slotDescription[0]), -+ (char *)&(sinfp->pk_slot.slotDescription[0]),64); -+ memcpy((char *)&(pInfo->manufacturerID[0]), -+ (char *)&(sinfp->pk_slot.manufacturerID[0]),32); - - pInfo->flags = sinfp->pk_slot.flags; - pInfo->hardwareVersion = sinfp->pk_slot.hardwareVersion; -@@ -3038,7 +3038,7 @@ C_GetSlotInfo ( CK_SLOT_ID slotID, - - //LOGIT(LOG_DEBUG," %32s ",sinfp->pk_slot.slotDescription); - //LOGIT(LOG_DEBUG," %32s ",sinfp->pk_slot.manufacturerID); -- bcopy((char *)&(sinfp->pk_slot),pInfo,sizeof(CK_SLOT_INFO)); -+ memcpy(pInfo,(char *)&(sinfp->pk_slot),sizeof(CK_SLOT_INFO)); - - return CKR_OK; - } // end of C_GetSlotInfo -@@ -3311,7 +3311,7 @@ C_Initialize ( CK_VOID_PTR pVoid ) - return CKR_CRYPTOKI_ALREADY_INITIALIZED; - } - -- bzero(slot_loaded,sizeof(int)*NUMBER_SLOTS_MANAGED); // Clear out the load list -+ memset(slot_loaded,0,sizeof(int)*NUMBER_SLOTS_MANAGED); // Clear out the load list - - - LOGIT(LOG_DEBUG,"Anchor allocated at %x",(char *)Anchor); -@@ -3424,7 +3424,7 @@ C_Initialize ( CK_VOID_PTR pVoid ) - //if ( Shared Memory Mapped not Successful ) - // Free allocated Memory - // Return CKR_HOST_MEMORY -- bzero((char *)Anchor,sizeof(API_Proc_Struct_t)); -+ memset((char *)Anchor,0,sizeof(API_Proc_Struct_t)); - pthread_mutex_init(&(Anchor->ProcMutex),NULL); // This is not shared across apps. - pthread_mutex_init(&(Anchor->SessListMutex),NULL); // This is not shared across apps. - pthread_mutex_init(&GlobMutex,NULL); -Index: usr/lib/pkcs11/api/apiproto.h -=================================================================== -RCS file: /cvsroot/opencryptoki/opencryptoki/usr/lib/pkcs11/api/apiproto.h,v -retrieving revision 1.1.1.1 -diff -p -u -r1.1.1.1 apiproto.h ---- usr/lib/pkcs11/api/apiproto.h 18 Jan 2005 16:09:00 -0000 1.1.1.1 -+++ usr/lib/pkcs11/api/apiproto.h 12 Jan 2006 09:56:34 -0000 -@@ -308,6 +308,13 @@ - void *attach_shared_memory(); - void detach_shared_memory(char *); - -+void loginit(); -+void logterm(); -+void st_err_log(int num, ...); -+ -+int Valid_Session(Session_Struct_t *, ST_SESSION_T *); -+void RemoveFromSessionList(Session_Struct_t *); -+int decr_sess_counts(CK_SLOT_ID); - - int API_Initialized(); - void Terminate_All_Process_Sessions(); -Index: usr/lib/pkcs11/api/apiutil.c -=================================================================== -RCS file: /cvsroot/opencryptoki/opencryptoki/usr/lib/pkcs11/api/apiutil.c,v -retrieving revision 1.5 -diff -p -u -r1.5 apiutil.c ---- usr/lib/pkcs11/api/apiutil.c 11 Oct 2005 19:04:23 -0000 1.5 -+++ usr/lib/pkcs11/api/apiutil.c 12 Jan 2006 09:56:34 -0000 -@@ -302,10 +302,13 @@ - - #include - #include -+#include - #include - #include - #include -- -+#include -+#include -+#include - #include - - #include "msg.h" //HACK -@@ -356,7 +359,7 @@ set_perm(int file) - #ifdef DEBUG - #define LOGIT logit - #else --#define LOGIT -+#define LOGIT(x...) - #endif - - #define SYSLOG -@@ -654,6 +657,7 @@ incr_sess_counts(slotID) - - XProcUnLock(&(shm->slt_mutex)); - -+ return 0; - } - - int -@@ -687,7 +691,7 @@ decr_sess_counts(slotID) - - XProcUnLock(&(shm->slt_mutex)); - -- -+ return 0; - } - - // Check if any sessions from other applicaitons exist on this particular -@@ -863,9 +867,9 @@ API_Register() - } - - #ifdef PKCS64 -- bzero((char *)procp,sizeof(Slot_Mgr_Proc_t_64)); -+ memset((char *)procp,0,sizeof(Slot_Mgr_Proc_t_64)); - #else -- bzero((char *)procp,sizeof(Slot_Mgr_Proc_t)); -+ memset((char *)procp,0,sizeof(Slot_Mgr_Proc_t)); - #endif - procp->inuse = TRUE; - procp->proc_id = getpid(); -@@ -916,9 +920,9 @@ API_UnRegister() - procp = &(shm->proc_table[Anchor->MgrProcIndex]); - - #ifdef PKCS64 -- bzero((char *)procp,sizeof(Slot_Mgr_Proc_t_64)); -+ memset((char *)procp,0,sizeof(Slot_Mgr_Proc_t_64)); - #else -- bzero((char *)procp,sizeof(Slot_Mgr_Proc_t)); -+ memset((char *)procp,0,sizeof(Slot_Mgr_Proc_t)); - #endif - - Anchor->MgrProcIndex=0; -@@ -1070,6 +1074,7 @@ int DL_Unload(sltp) - sltp->pSTfini = NULL; - sltp->pSTcloseall = NULL; - -+ return TRUE; - } - - int -Index: usr/lib/pkcs11/bcom_stdll/bcom_specific.c -=================================================================== -RCS file: /cvsroot/opencryptoki/opencryptoki/usr/lib/pkcs11/bcom_stdll/bcom_specific.c,v -retrieving revision 1.2 -diff -p -u -r1.2 bcom_specific.c ---- usr/lib/pkcs11/bcom_stdll/bcom_specific.c 1 Sep 2005 22:57:04 -0000 1.2 -+++ usr/lib/pkcs11/bcom_stdll/bcom_specific.c 12 Jan 2006 09:56:37 -0000 -@@ -428,7 +428,7 @@ CK_RV build_swapped_attribute(CK_ATTRIBU - if (! swapped_data) { - return CKR_DEVICE_ERROR; - } -- bzero(swapped_data, data_len); -+ memset(swapped_data, 0, data_len); - real_data_len = data_len; - - pos = data_len -1; -@@ -483,10 +483,10 @@ int bcom_rsa_pub_new(BCOM_RSA_PUB_KEY_t - } - - rsa_pub->n = (U32_t *)malloc(MAX_PUBLIC_KEY_BYTES*sizeof(unsigned char)); -- bzero(rsa_pub->n, MAX_PUBLIC_KEY_BYTES); -+ memset(rsa_pub->n, 0, MAX_PUBLIC_KEY_BYTES); - rsa_pub->n_len = 0; - rsa_pub->e = (U32_t *)malloc(MAX_PUBLIC_KEY_BYTES*sizeof(unsigned char)); -- bzero(rsa_pub->e, MAX_PUBLIC_KEY_BYTES); -+ memset(rsa_pub->e, 0, MAX_PUBLIC_KEY_BYTES); - rsa_pub->e_len = 0; - - if (! (rsa_pub->n && rsa_pub->e)) { -@@ -578,24 +578,24 @@ int bcom_rsa_crt_new(BCOM_RSA_CRT_KEY_t - } - - rsa_priv->n = (U32_t *)malloc(MAX_PUBLIC_KEY_BYTES); -- bzero(rsa_priv->n, MAX_PUBLIC_KEY_BYTES); -+ memset(rsa_priv->n, 0, MAX_PUBLIC_KEY_BYTES); - rsa_priv->d = (U32_t *)malloc(MAX_PUBLIC_KEY_BYTES); -- bzero(rsa_priv->d, MAX_PUBLIC_KEY_BYTES); -+ memset(rsa_priv->d, 0, MAX_PUBLIC_KEY_BYTES); - rsa_priv->d_len = 0; - rsa_priv->p = (U32_t *)malloc(MAX_PUBLIC_KEY_BYTES); -- bzero(rsa_priv->p, MAX_PUBLIC_KEY_BYTES); -+ memset(rsa_priv->p, 0, MAX_PUBLIC_KEY_BYTES); - rsa_priv->p_len = 0; - rsa_priv->q = (U32_t *)malloc(MAX_PUBLIC_KEY_BYTES); -- bzero(rsa_priv->q, MAX_PUBLIC_KEY_BYTES); -+ memset(rsa_priv->q, 0, MAX_PUBLIC_KEY_BYTES); - rsa_priv->q_len = 0; - rsa_priv->dp = (U32_t *)malloc(MAX_PUBLIC_KEY_BYTES); -- bzero(rsa_priv->dp, MAX_PUBLIC_KEY_BYTES); -+ memset(rsa_priv->dp, 0, MAX_PUBLIC_KEY_BYTES); - rsa_priv->dp_len = 0; - rsa_priv->dq = (U32_t *)malloc(MAX_PUBLIC_KEY_BYTES); -- bzero(rsa_priv->dq, MAX_PUBLIC_KEY_BYTES); -+ memset(rsa_priv->dq, 0, MAX_PUBLIC_KEY_BYTES); - rsa_priv->dq_len = 0; - rsa_priv->pinv = (U32_t *)malloc(MAX_PUBLIC_KEY_BYTES); -- bzero(rsa_priv->pinv, MAX_PUBLIC_KEY_BYTES); -+ memset(rsa_priv->pinv, 0, MAX_PUBLIC_KEY_BYTES); - rsa_priv->pinv_len = 0; - - if (! (rsa_priv->p && rsa_priv->q && rsa_priv->dp && rsa_priv->dq && rsa_priv->pinv)) { -Index: usr/lib/pkcs11/common/loadsave.c -=================================================================== -RCS file: /cvsroot/opencryptoki/opencryptoki/usr/lib/pkcs11/common/loadsave.c,v -retrieving revision 1.4 -diff -p -u -r1.4 loadsave.c ---- usr/lib/pkcs11/common/loadsave.c 14 Dec 2005 19:14:16 -0000 1.4 -+++ usr/lib/pkcs11/common/loadsave.c 12 Jan 2006 09:56:37 -0000 -@@ -303,6 +303,8 @@ - #include - #include - #include -+#include -+#include - #include - - #include -@@ -331,9 +333,11 @@ load_token_data() - FILE * fp; - CK_BYTE fname[2048]; - TOKEN_DATA td; -+#if 0 - CK_BYTE clear[3 * DES_BLOCK_SIZE]; // enough to hold a CBC-encrypted SHA hash - CK_BYTE cipher[3 * DES_BLOCK_SIZE]; - CK_ULONG clear_len, cipher_len; -+#endif - CK_RV rc; - struct passwd *pw = NULL; - -@@ -392,6 +396,7 @@ load_token_data() - goto out_unlock; - } - -+#if 0 - // memcpy( cipher, &td.user_pin_sha, 3*DES_BLOCK_SIZE ); - // clear_len = cipher_len = 3 * DES_BLOCK_SIZE; - // rc = ckm_des3_cbc_decrypt( cipher, cipher_len, clear, &clear_len, "12345678", master_key ); -@@ -407,6 +412,7 @@ load_token_data() - // return CKR_FUNCTION_FAILED; - // - // memcpy( &td.so_pin_sha, clear, clear_len ); -+#endif - - memcpy( nv_token_data, &td, sizeof(TOKEN_DATA) ); - -@@ -427,9 +433,11 @@ save_token_data() - { - FILE *fp; - TOKEN_DATA td; -+#if 0 - CK_BYTE clear[3 * DES_BLOCK_SIZE]; - CK_BYTE cipher[3 * DES_BLOCK_SIZE]; - CK_ULONG clear_len, cipher_len; -+#endif - CK_RV rc; - CK_BYTE fname[2048]; - struct passwd *pw = NULL; -@@ -477,7 +485,7 @@ save_token_data() - // - // memcpy( td.so_pin_sha, cipher, 3*DES_BLOCK_SIZE ); - -- fwrite( &td, sizeof(TOKEN_DATA), 1, fp ); -+ (void)fwrite( &td, sizeof(TOKEN_DATA), 1, fp ); - fclose(fp); - - rc = CKR_OK; -@@ -526,7 +534,7 @@ save_token_object( OBJECT *obj ) - if (fp) { - set_perm(fileno(fp)); - while (!feof(fp)) { -- fgets((char *)line, 50, fp ); -+ (void)fgets((char *)line, 50, fp ); - if (!feof(fp)) { - line[ strlen((char *)line)-1 ] = 0; - if (strcmp((char *)line,(char *)( obj->name)) == 0) { -@@ -600,9 +608,9 @@ save_public_token_object( OBJECT *obj ) - - total_len = cleartxt_len + sizeof(CK_ULONG_32) + sizeof(CK_BBOOL); - -- fwrite( &total_len, sizeof(CK_ULONG_32), 1, fp ); -- fwrite( &flag, sizeof(CK_BBOOL), 1, fp ); -- fwrite( cleartxt, cleartxt_len, 1, fp ); -+ (void)fwrite( &total_len, sizeof(CK_ULONG_32), 1, fp ); -+ (void)fwrite( &flag, sizeof(CK_BBOOL), 1, fp ); -+ (void)fwrite( cleartxt, cleartxt_len, 1, fp ); - - fclose( fp ); - free( cleartxt ); -@@ -628,9 +636,8 @@ save_private_token_object( OBJECT *obj ) - CK_BYTE * ptr = NULL; - CK_BYTE fname[100]; - CK_BYTE hash_sha[SHA1_HASH_SIZE]; -- CK_BYTE hash_md5[MD5_HASH_SIZE]; - CK_BYTE des3_key[3 * DES_KEY_SIZE]; -- CK_ULONG obj_data_len,cleartxt_len, ciphertxt_len, hash_len, tmp, tmp2; -+ CK_ULONG obj_data_len,cleartxt_len, ciphertxt_len; - CK_ULONG padded_len; - CK_BBOOL flag; - CK_RV rc; -@@ -704,7 +711,7 @@ save_private_token_object( OBJECT *obj ) - - initial_vector = (CK_BYTE *)alloca(strlen("10293847")+5); - if (initial_vector) { -- bcopy("10293847",initial_vector,strlen("10293847")); -+ memcpy(initial_vector,"10293847",strlen("10293847")); - rc = ckm_des3_cbc_encrypt( cleartxt, padded_len, - ciphertxt, &ciphertxt_len, - initial_vector, (char *) des3_key ); -@@ -714,7 +721,7 @@ save_private_token_object( OBJECT *obj ) - - } - #else -- bcopy(cleartxt,ciphertxt,padded_len); -+ memcpy(ciphertxt,cleartxt,padded_len); - rc = CKR_OK; - #endif - if (rc != CKR_OK){ -@@ -738,9 +745,9 @@ save_private_token_object( OBJECT *obj ) - - flag = TRUE; - -- fwrite( &total_len, sizeof(CK_ULONG_32), 1, fp ); -- fwrite( &flag, sizeof(CK_BBOOL), 1, fp ); -- fwrite( ciphertxt, ciphertxt_len, 1, fp ); -+ (void)fwrite( &total_len, sizeof(CK_ULONG_32), 1, fp ); -+ (void)fwrite( &flag, sizeof(CK_BBOOL), 1, fp ); -+ (void)fwrite( ciphertxt, ciphertxt_len, 1, fp ); - - fclose( fp ); - -@@ -786,7 +793,7 @@ load_public_token_objects( void ) - return CKR_OK; // no token objects - - while (!feof(fp1)) { -- fgets( (char *)tmp, 50, fp1 ); -+ (void)fgets( (char *)tmp, 50, fp1 ); - if (!feof(fp1)) { - tmp[ strlen((char *)tmp)-1 ] = 0; - -@@ -798,8 +805,8 @@ load_public_token_objects( void ) - if (!fp2) - continue; - -- fread( &size, sizeof(CK_ULONG_32), 1, fp2 ); -- fread( &priv, sizeof(CK_BBOOL), 1, fp2 ); -+ (void)fread( &size, sizeof(CK_ULONG_32), 1, fp2 ); -+ (void)fread( &priv, sizeof(CK_BBOOL), 1, fp2 ); - if (priv == TRUE) { - fclose( fp2 ); - continue; -@@ -815,7 +822,7 @@ load_public_token_objects( void ) - return CKR_HOST_MEMORY; - } - -- fread( buf, size, 1, fp2 ); -+ (void)fread( buf, size, 1, fp2 ); - - // ... grab object mutex here. - MY_LockMutex(&obj_list_mutex); -@@ -839,7 +846,6 @@ load_private_token_objects( void ) - FILE *fp1 = NULL, *fp2 = NULL; - CK_BYTE *buf = NULL; - CK_BYTE tmp[2048], fname[2048],iname[2048]; -- CK_BYTE sha_hash[SHA1_HASH_SIZE], old_hash[SHA1_HASH_SIZE]; - CK_BBOOL priv; - CK_ULONG_32 size; - CK_RV rc; -@@ -859,7 +865,7 @@ load_private_token_objects( void ) - return CKR_OK; // no token objects - - while (!feof(fp1)) { -- fgets((char *) tmp, 50, fp1 ); -+ (void)fgets((char *) tmp, 50, fp1 ); - if (!feof(fp1)) { - tmp[ strlen((char *)tmp)-1 ] = 0; - -@@ -871,8 +877,8 @@ load_private_token_objects( void ) - if (!fp2) - continue; - -- fread( &size, sizeof(CK_ULONG_32), 1, fp2 ); -- fread( &priv, sizeof(CK_BBOOL), 1, fp2 ); -+ (void)fread( &size, sizeof(CK_ULONG_32), 1, fp2 ); -+ (void)fread( &priv, sizeof(CK_BBOOL), 1, fp2 ); - if (priv == FALSE) { - fclose( fp2 ); - continue; -@@ -932,10 +938,7 @@ restore_private_token_object( CK_BYTE * - CK_BYTE * ptr = NULL; - CK_BYTE des3_key[3 * DES_KEY_SIZE]; - CK_BYTE hash_sha[SHA1_HASH_SIZE]; -- CK_MECHANISM mech; -- DIGEST_CONTEXT digest_ctx; -- ENCR_DECR_CONTEXT encr_ctx; -- CK_ULONG hash_len, cleartxt_len, obj_data_len; -+ CK_ULONG cleartxt_len, obj_data_len; - CK_RV rc; - - // format for the object data: -@@ -968,7 +971,7 @@ restore_private_token_object( CK_BYTE * - - initial_vector = (CK_BYTE *)alloca(strlen("10293847")+5); - if (initial_vector) { -- bcopy("10293847",initial_vector,strlen("10293847")); -+ memcpy(initial_vector,"10293847",strlen("10293847")); - rc = ckm_des3_cbc_decrypt( ciphertxt, len, - cleartxt, &len, - initial_vector, (char *) des3_key ); -@@ -984,7 +987,7 @@ restore_private_token_object( CK_BYTE * - "10293847", des3_key ); - #endif - #else -- bcopy(ciphertxt,cleartxt,len); -+ memcpy(cleartxt,ciphertxt,len); - rc = CKR_OK; - #endif - -@@ -1098,7 +1101,7 @@ load_masterkey_so( void ) - - initial_vector = (CK_BYTE *)alloca(strlen("12345678")+5); - if (initial_vector) { -- bcopy("12345678",initial_vector,strlen("12345678")); -+ memcpy(initial_vector,"12345678",strlen("12345678")); - rc = ckm_des3_cbc_decrypt( cipher, cipher_len, - clear, &clear_len, - initial_vector, (char *) des3_key ); -@@ -1112,7 +1115,7 @@ load_masterkey_so( void ) - rc = ckm_des3_cbc_decrypt( cipher, cipher_len, clear, &clear_len, "12345678", des3_key ); - #endif - #else -- bcopy(cipher,clear,cipher_len); -+ memcpy(clear,cipher,cipher_len); - rc = CKR_OK; - #endif - -@@ -1208,7 +1211,7 @@ load_masterkey_user( void ) - - initial_vector = (CK_BYTE *)alloca(strlen("12345678")+5); - if (initial_vector) { -- bcopy("12345678",initial_vector,strlen("12345678")); -+ memcpy(initial_vector,"12345678",strlen("12345678")); - rc = ckm_des3_cbc_decrypt( cipher, cipher_len, - clear, &clear_len, - initial_vector, (char *) des3_key ); -@@ -1221,7 +1224,7 @@ load_masterkey_user( void ) - rc = ckm_des3_cbc_decrypt( cipher, cipher_len, clear, &clear_len, "12345678", des3_key ); - #endif - #else -- bcopy(cipher,clear,cipher_len); -+ memcpy(clear,cipher,cipher_len); - rc = CKR_OK; - #endif - -@@ -1300,7 +1303,7 @@ save_masterkey_so( void ) - - initial_vector = (CK_BYTE *)alloca(strlen("12345678")); - if (initial_vector) { -- bcopy("12345678",initial_vector,strlen("12345678")); -+ memcpy(initial_vector,"12345678",strlen("12345678")); - rc = ckm_des3_cbc_encrypt( cleartxt, padded_len, - ciphertxt, &ciphertxt_len, - initial_vector, (char *) des3_key ); -@@ -1313,7 +1316,7 @@ save_masterkey_so( void ) - rc = ckm_des3_cbc_encrypt( cleartxt, padded_len, ciphertxt, &ciphertxt_len, "12345678", des3_key ); - #endif - #else -- bcopy(cleartxt,ciphertxt,padded_len); -+ memcpy(ciphertxt,cleartxt,padded_len); - rc = CKR_OK; - #endif - -@@ -1396,7 +1399,7 @@ save_masterkey_user( void ) - - initial_vector = (CK_BYTE *)alloca(strlen("12345678")+5); - if (initial_vector) { -- bcopy("12345678",initial_vector,strlen("12345678")); -+ memcpy(initial_vector,"12345678",strlen("12345678")); - rc = ckm_des3_cbc_encrypt( cleartxt, padded_len, - ciphertxt, &ciphertxt_len, - initial_vector, (char *) des3_key ); -@@ -1409,7 +1412,7 @@ save_masterkey_user( void ) - rc = ckm_des3_cbc_encrypt( cleartxt, padded_len, ciphertxt, &ciphertxt_len, "12345678", des3_key ); - #endif - #else -- bcopy(cleartxt,ciphertxt,padded_len); -+ memcpy(ciphertxt,cleartxt,padded_len); - rc = CKR_OK; - #endif - -@@ -1563,7 +1566,7 @@ delete_token_object( OBJECT *obj ) - set_perm(fileno(fp2)); - - while (!feof(fp1)) { -- fgets((char *)line, 50, fp1 ); -+ (void)fgets((char *)line, 50, fp1 ); - if (!feof(fp1)) { - line[ strlen((char *)line)-1 ] = 0; - if (strcmp((char *)line, (char *)obj->name) == 0) -@@ -1589,7 +1592,7 @@ delete_token_object( OBJECT *obj ) - set_perm(fileno(fp2)); - - while (!feof(fp1)) { -- fgets((char *)line, 50, fp1 ); -+ (void)fgets((char *)line, 50, fp1 ); - if (!feof(fp1)) - fprintf( fp2, "%s",(char *) line ); - } -Index: usr/lib/pkcs11/common/mech_list.c -=================================================================== -RCS file: /cvsroot/opencryptoki/opencryptoki/usr/lib/pkcs11/common/mech_list.c,v -retrieving revision 1.2 -diff -p -u -r1.2 mech_list.c ---- usr/lib/pkcs11/common/mech_list.c 1 Sep 2005 22:57:04 -0000 1.2 -+++ usr/lib/pkcs11/common/mech_list.c 12 Jan 2006 09:56:37 -0000 -@@ -288,6 +288,8 @@ - - /* COPYRIGHT (c) International Business Machines Corp. 2005 */ - -+#include -+#include - #include "pkcs11types.h" - #include "defs.h" - #include "host_defs.h" -Index: usr/lib/pkcs11/common/mech_ssl3.c -=================================================================== -RCS file: /cvsroot/opencryptoki/opencryptoki/usr/lib/pkcs11/common/mech_ssl3.c,v -retrieving revision 1.2 -diff -p -u -r1.2 mech_ssl3.c ---- usr/lib/pkcs11/common/mech_ssl3.c 24 Feb 2005 21:35:09 -0000 1.2 -+++ usr/lib/pkcs11/common/mech_ssl3.c 12 Jan 2006 09:56:37 -0000 -@@ -1486,7 +1486,7 @@ ssl3_key_and_mac_derive( SESSION - CK_BYTE key_block[(16*26) + (4*16)]; - CK_ULONG i, key_material_loop_count; - CK_ULONG iv_len, MAC_len, write_len; -- CK_RV rc; -+ CK_RV rc = CKR_OK; - - CK_BYTE * base_key_value = NULL; - CK_BBOOL base_sensitive; -@@ -2000,7 +2000,7 @@ ssl3_kmd_process_write_keys( SESSION - CK_ULONG i, cnt; - CK_ULONG true_vals[] = { CKA_ENCRYPT, CKA_DECRYPT, CKA_DERIVE }; - CK_ULONG false_vals[] = { CKA_SIGN, CKA_VERIFY, CKA_WRAP, CKA_UNWRAP }; -- CK_RV rc; -+ CK_RV rc = CKR_HOST_MEMORY; - - // for the write keys, we want the following default values: - // CKA_ENCRYPT, CKA_DECRYPT, CKA_DERIVE = TRUE -@@ -2027,7 +2027,6 @@ ssl3_kmd_process_write_keys( SESSION - attr->ulValueLen = sizeof(CK_BBOOL); - attr->pValue = (CK_BBOOL *)malloc(sizeof(CK_BBOOL)); - if (!attr->pValue) { -- rc = CKR_HOST_MEMORY; - st_err_log(0, __FILE__, __LINE__); - goto error; - } -@@ -2039,7 +2038,6 @@ ssl3_kmd_process_write_keys( SESSION - attr->ulValueLen = sizeof(CK_BBOOL); - attr->pValue = (CK_BBOOL *)malloc(sizeof(CK_BBOOL)); - if (!attr->pValue) { -- rc = CKR_HOST_MEMORY; - st_err_log(0, __FILE__, __LINE__); - goto error; - } -@@ -2055,7 +2053,6 @@ ssl3_kmd_process_write_keys( SESSION - attr->ulValueLen = pTemplate[i].ulValueLen; - attr->pValue = (char *)malloc(attr->ulValueLen); - if (!attr->pValue) { -- rc = CKR_HOST_MEMORY; - st_err_log(0, __FILE__, __LINE__); - goto error; - } -Index: usr/lib/pkcs11/common/new_host.c -=================================================================== -RCS file: /cvsroot/opencryptoki/opencryptoki/usr/lib/pkcs11/common/new_host.c,v -retrieving revision 1.15 -diff -p -u -r1.15 new_host.c ---- usr/lib/pkcs11/common/new_host.c 1 Sep 2005 22:57:04 -0000 1.15 -+++ usr/lib/pkcs11/common/new_host.c 12 Jan 2006 09:56:37 -0000 -@@ -310,6 +310,7 @@ - #include - #include - #include -+#include - - #include "pkcs11types.h" - #include "stdll.h" -@@ -532,11 +533,11 @@ init_data_store(char *directory) - char *pkdir; - if ( (pkdir = getenv("PKCS_APP_STORE")) != NULL){ - pk_dir = (char *) malloc(strlen(pkdir)+1024); -- bzero(pk_dir,strlen(pkdir)+1024); -+ memset(pk_dir,0,strlen(pkdir)+1024); - sprintf(pk_dir,"%s/%s",pkdir,SUB_DIR); - } else { - pk_dir = (char *)malloc(strlen(directory)+25); -- bzero(pk_dir,strlen(directory)+25); -+ memset(pk_dir,0,strlen(directory)+25); - sprintf(pk_dir,"%s",directory); - - } -Index: usr/lib/pkcs11/common/obj_mgr.c -=================================================================== -RCS file: /cvsroot/opencryptoki/opencryptoki/usr/lib/pkcs11/common/obj_mgr.c,v -retrieving revision 1.11 -diff -p -u -r1.11 obj_mgr.c ---- usr/lib/pkcs11/common/obj_mgr.c 12 Dec 2005 17:44:37 -0000 1.11 -+++ usr/lib/pkcs11/common/obj_mgr.c 12 Jan 2006 09:56:38 -0000 -@@ -2217,17 +2217,17 @@ object_mgr_del_from_shm( OBJECT *obj ) - - if (count > 0) { // If we are not deleting the last element in the list - // Move up count number of elements effectively deleting the index -- bcopy((char *)&global_shm->priv_tok_objs[index+1], -- (char *)&global_shm->priv_tok_objs[index], -+ memcpy((char *)&global_shm->priv_tok_objs[index], -+ (char *)&global_shm->priv_tok_objs[index+1], - sizeof(TOK_OBJ_ENTRY) * count ); - // We need to zero out the last entry... Since the memcopy - // does not zero it out... -- bzero((char *)&global_shm->priv_tok_objs[global_shm->num_priv_tok_obj+1], -- sizeof(TOK_OBJ_ENTRY)); -+ memset((char *)&global_shm->priv_tok_objs[global_shm->num_priv_tok_obj+1], -+ 0,sizeof(TOK_OBJ_ENTRY)); - } - else { // We are deleting the last element which is in num_priv_tok_obj -- bzero((char *)&global_shm->priv_tok_objs[global_shm->num_priv_tok_obj], -- sizeof(TOK_OBJ_ENTRY)); -+ memset((char *)&global_shm->priv_tok_objs[global_shm->num_priv_tok_obj], -+ 0,sizeof(TOK_OBJ_ENTRY)); - } - } - else { -@@ -2252,17 +2252,17 @@ object_mgr_del_from_shm( OBJECT *obj ) - #endif - - if (count > 0) { -- bcopy((char *)&global_shm->publ_tok_objs[index+1], -- (char *)&global_shm->publ_tok_objs[index], -+ memcpy((char *)&global_shm->publ_tok_objs[index], -+ (char *)&global_shm->publ_tok_objs[index+1], - sizeof(TOK_OBJ_ENTRY) * count); - // We need to zero out the last entry... Since the memcopy - // does not zero it out... -- bzero((char *)&global_shm->publ_tok_objs[global_shm->num_publ_tok_obj+1], -- sizeof(TOK_OBJ_ENTRY)); -+ memset((char *)&global_shm->publ_tok_objs[global_shm->num_publ_tok_obj+1], -+ 0,sizeof(TOK_OBJ_ENTRY)); - } - else { -- bzero((char *)&global_shm->publ_tok_objs[global_shm->num_publ_tok_obj], -- sizeof(TOK_OBJ_ENTRY)); -+ memset((char *)&global_shm->publ_tok_objs[global_shm->num_publ_tok_obj], -+ 0,sizeof(TOK_OBJ_ENTRY)); - } - } - -@@ -2439,6 +2439,8 @@ object_mgr_update_from_shm( void ) - { - object_mgr_update_publ_tok_obj_from_shm(); - object_mgr_update_priv_tok_obj_from_shm(); -+ -+ return CKR_OK; - } - - -Index: usr/lib/pkcs11/common/sess_mgr.c -=================================================================== -RCS file: /cvsroot/opencryptoki/opencryptoki/usr/lib/pkcs11/common/sess_mgr.c,v -retrieving revision 1.3 -diff -p -u -r1.3 sess_mgr.c ---- usr/lib/pkcs11/common/sess_mgr.c 10 May 2005 18:51:59 -0000 1.3 -+++ usr/lib/pkcs11/common/sess_mgr.c 12 Jan 2006 09:56:38 -0000 -@@ -874,7 +874,7 @@ session_mgr_get_op_state( SESSION *ses - CK_ULONG *data_len ) - { - OP_STATE_DATA *op_data = NULL; -- CK_ULONG op_data_len; -+ CK_ULONG op_data_len = 0; - CK_ULONG offset; - - if (!sess){ -Index: usr/lib/pkcs11/common/template.c -=================================================================== -RCS file: /cvsroot/opencryptoki/opencryptoki/usr/lib/pkcs11/common/template.c,v -retrieving revision 1.2 -diff -p -u -r1.2 template.c ---- usr/lib/pkcs11/common/template.c 24 Feb 2005 21:35:10 -0000 1.2 -+++ usr/lib/pkcs11/common/template.c 12 Jan 2006 09:56:38 -0000 -@@ -868,7 +868,7 @@ template_flatten( TEMPLATE * tmpl, - DL_NODE * node = NULL; - CK_BYTE * ptr = NULL; - CK_ULONG_32 long_len; -- CK_ATTRIBUTE_32 *attr_32; -+ CK_ATTRIBUTE_32 *attr_32 = NULL; - CK_ULONG Val; - CK_ULONG_32 Val_32; - CK_ULONG * pVal; -@@ -929,7 +929,7 @@ template_flatten( TEMPLATE * tmpl, - node = node->next; - } - -- if (long_len != 4) -+ if (attr_32) - free(attr_32); - - return CKR_OK; -Index: usr/lib/pkcs11/common/utility.c -=================================================================== -RCS file: /cvsroot/opencryptoki/opencryptoki/usr/lib/pkcs11/common/utility.c,v -retrieving revision 1.6 -diff -p -u -r1.6 utility.c ---- usr/lib/pkcs11/common/utility.c 12 Aug 2005 15:54:31 -0000 1.6 -+++ usr/lib/pkcs11/common/utility.c 12 Jan 2006 09:56:38 -0000 -@@ -299,7 +299,7 @@ - #include - #include - #include -- -+#include - - #include "pkcs11types.h" - #include "defs.h" -Index: usr/lib/pkcs11/ica_s390_stdll/ica_specific.c -=================================================================== -RCS file: /cvsroot/opencryptoki/opencryptoki/usr/lib/pkcs11/ica_s390_stdll/ica_specific.c,v -retrieving revision 1.6 -diff -p -u -r1.6 ica_specific.c ---- usr/lib/pkcs11/ica_s390_stdll/ica_specific.c 4 Jan 2006 15:05:50 -0000 1.6 -+++ usr/lib/pkcs11/ica_s390_stdll/ica_specific.c 12 Jan 2006 09:56:38 -0000 -@@ -292,6 +292,7 @@ - - #include - #include // for memcmp() et al -+#include - #include - - #ifndef NOAES -@@ -439,7 +440,7 @@ token_specific_des_ecb(CK_BYTE * in_data - unsigned int temp = 0; - temp = (unsigned int) *out_data_len; - -- bzero(&empty_iv,sizeof(empty_iv)); -+ memset(&empty_iv,0,sizeof(empty_iv)); - if ( encrypt) { - rc = icaDesEncrypt(adapter_handle, MODE_DES_ECB, (unsigned int)in_data_len, in_data, - &empty_iv, (ICA_KEY_DES_SINGLE *)key_value, -@@ -515,7 +516,7 @@ token_specific_tdes_ecb(CK_BYTE * in_dat - unsigned int temp; - temp = (unsigned int) *out_data_len; - -- bzero(&empty_iv,sizeof(empty_iv)); -+ memset(&empty_iv,0,sizeof(empty_iv)); - if ( encrypt) { - rc = icaTDesEncrypt(adapter_handle, MODE_DES_ECB, (unsigned int)in_data_len, in_data, - &empty_iv, -@@ -1127,7 +1128,7 @@ rsa_convert_public_key( OBJECT * key_ - if (publKey == NULL) { - return NULL; - } -- bzero(publKey, sizeof(ICA_KEY_RSA_MODEXPO)); -+ memset(publKey, 0, sizeof(ICA_KEY_RSA_MODEXPO)); - - // Currently using definition of ICA_KEY_RSA_MODEXPO in NT spec v1.12 - -@@ -1142,9 +1143,9 @@ rsa_convert_public_key( OBJECT * key_ - - pkey = (CK_BYTE_PTR) publKey->keyRecord; - pkey += modulus->ulValueLen - pub_exp->ulValueLen; -- bcopy(pub_exp->pValue, pkey, pub_exp->ulValueLen); -+ memcpy(pkey, pub_exp->pValue, pub_exp->ulValueLen); - pkey += pub_exp->ulValueLen; -- bcopy(modulus->pValue, pkey, modulus->ulValueLen); -+ memcpy(pkey, modulus->pValue, modulus->ulValueLen); - return publKey; - - } -@@ -1186,7 +1187,7 @@ rsa_convert_private_key(OBJECT *key_obj) - if (privKey == NULL) { - return NULL; - } -- bzero(privKey, sizeof(ICA_KEY_RSA_CRT)); -+ memset(privKey, 0, sizeof(ICA_KEY_RSA_CRT)); - - // Currently using definition of ICA_KEY_RSA_CRT in NT spec v1.12 - // (with nLength and nOffset removed per BEF's e-mail) -@@ -1210,19 +1211,19 @@ rsa_convert_private_key(OBJECT *key_obj) - privKey->qInvOffset = offset + qSize; - pkey = (CK_BYTE_PTR) privKey->keyRecord; - pkey += pSize - exp1->ulValueLen; -- bcopy(exp1->pValue, pkey, exp1->ulValueLen); -+ memcpy(pkey, exp1->pValue, exp1->ulValueLen); - // pkey += exp1->ulValueLen + qSize - exp2->ulValueLen; - pkey += exp1->ulValueLen; -- bcopy(exp2->pValue, pkey, exp2->ulValueLen); -+ memcpy(pkey, exp2->pValue, exp2->ulValueLen); - // pkey += exp2->ulValueLen + pSize - prime1->ulValueLen; - pkey += qSize + pSize - prime1->ulValueLen; -- bcopy(prime1->pValue, pkey, prime1->ulValueLen); -+ memcpy(pkey, prime1->pValue, prime1->ulValueLen); - // pkey += prime1->ulValueLen + qSize - prime2->ulValueLen; - pkey += prime1->ulValueLen; -- bcopy(prime2->pValue, pkey, prime2->ulValueLen); -+ memcpy(pkey, prime2->pValue, prime2->ulValueLen); - // pkey += prime2->ulValueLen + pSize - coeff->ulValueLen; - pkey += qSize + pSize - coeff->ulValueLen; -- bcopy(coeff->pValue, pkey, coeff->ulValueLen); -+ memcpy(pkey, coeff->pValue, coeff->ulValueLen); - return privKey; - // hex_dump_to_file("PRIVATEKEY",(char *)privKey,sizeof(ICA_KEY_RSA_CRT)); - } else { // must be a non-CRT key -@@ -1233,7 +1234,7 @@ rsa_convert_private_key(OBJECT *key_obj) - if (privModKey == NULL) { - return NULL; - } -- bzero(privModKey, sizeof(ICA_KEY_RSA_MODEXPO)); -+ memset(privModKey, 0, sizeof(ICA_KEY_RSA_MODEXPO)); - - // Currently using definition of ICA_KEY_RSA_MODEXPO in NT spec v1.12 - -@@ -1249,9 +1250,9 @@ rsa_convert_private_key(OBJECT *key_obj) - - pkey = (CK_BYTE_PTR) privModKey->keyRecord; - pkey += modulus->ulValueLen - priv_exp->ulValueLen; -- bcopy(priv_exp->pValue, pkey, priv_exp->ulValueLen); -+ memcpy(pkey, priv_exp->pValue, priv_exp->ulValueLen); - pkey += priv_exp->ulValueLen; -- bcopy(modulus->pValue, pkey, modulus->ulValueLen); -+ memcpy(pkey, modulus->pValue, modulus->ulValueLen); - - return privModKey; - } -Index: usr/lib/pkcs11/ica_stdll/ica_specific.c -=================================================================== -RCS file: /cvsroot/opencryptoki/opencryptoki/usr/lib/pkcs11/ica_stdll/ica_specific.c,v -retrieving revision 1.7 -diff -p -u -r1.7 ica_specific.c ---- usr/lib/pkcs11/ica_stdll/ica_specific.c 1 Sep 2005 22:57:05 -0000 1.7 -+++ usr/lib/pkcs11/ica_stdll/ica_specific.c 12 Jan 2006 09:56:39 -0000 -@@ -291,6 +291,7 @@ - - #include - #include // for memcmp() et al -+#include - #include - - #ifndef NOAES -@@ -438,7 +439,7 @@ token_specific_des_ecb(CK_BYTE * in_data - CK_RV rc; - unsigned int _out_data_len = *out_data_len; - -- bzero(&empty_iv,sizeof(empty_iv)); -+ memset(&empty_iv,0,sizeof(empty_iv)); - if ( encrypt) { - rc = icaDesEncrypt(adapter_handle, (unsigned int)MODE_DES_ECB, (unsigned int)in_data_len, in_data, - &empty_iv, (ICA_KEY_DES_SINGLE *)key_value, -@@ -513,7 +514,7 @@ token_specific_tdes_ecb(CK_BYTE * in_dat - unsigned int _out_data_len = *out_data_len; - - -- bzero(&empty_iv,sizeof(empty_iv)); -+ memset(&empty_iv,0,sizeof(empty_iv)); - if ( encrypt) { - rc = icaTDesEncrypt(adapter_handle, (unsigned int)MODE_DES_ECB, - (unsigned int)in_data_len, in_data, -@@ -617,7 +618,7 @@ rsa_convert_public_key( OBJECT * key_ - if (publKey == NULL) { - return NULL; - } -- bzero(publKey, sizeof(ICA_KEY_RSA_MODEXPO)); -+ memset(publKey, 0, sizeof(ICA_KEY_RSA_MODEXPO)); - - // Currently using definition of ICA_KEY_RSA_MODEXPO in NT spec v1.12 - -@@ -676,7 +677,7 @@ rsa_convert_private_key(OBJECT *key_obj) - if (privKey == NULL) { - return NULL; - } -- bzero(privKey, sizeof(ICA_KEY_RSA_CRT)); -+ memset(privKey, 0, sizeof(ICA_KEY_RSA_CRT)); - - // Currently using definition of ICA_KEY_RSA_CRT in NT spec v1.12 - // (with nLength and nOffset removed per BEF's e-mail) -@@ -723,7 +724,7 @@ rsa_convert_private_key(OBJECT *key_obj) - if (privModKey == NULL) { - return NULL; - } -- bzero(privModKey, sizeof(ICA_KEY_RSA_MODEXPO)); -+ memset(privModKey, 0, sizeof(ICA_KEY_RSA_MODEXPO)); - - // Currently using definition of ICA_KEY_RSA_MODEXPO in NT spec v1.12 - -Index: usr/lib/pkcs11/leeds_stdll/host_api.c -=================================================================== -RCS file: /cvsroot/opencryptoki/opencryptoki/usr/lib/pkcs11/leeds_stdll/host_api.c,v -retrieving revision 1.4 -diff -p -u -r1.4 host_api.c ---- usr/lib/pkcs11/leeds_stdll/host_api.c 3 Nov 2005 19:38:00 -0000 1.4 -+++ usr/lib/pkcs11/leeds_stdll/host_api.c 12 Jan 2006 09:56:42 -0000 -@@ -838,7 +838,7 @@ copy_attribute_value(void *source, void - - break; - default: -- bcopy(source,dest,attr->ulValueLen); -+ memcpy(dest,source,attr->ulValueLen); - break; - } - -@@ -874,10 +874,10 @@ ModifyAttribute(type,val) - #ifdef PKCS64 - tval = HTOCL((CK_ULONG_32)*val); - *val = tval; -- // bcopy(&tval,val,sizeof(CK_ULONG_32)); -+ // memcpy(val,&tval,sizeof(CK_ULONG_32)); - #else - tval = HTOCL((CK_ULONG)*val); -- bcopy(&tval,val,sizeof(CK_ULONG)); -+ memcpy(val,&tval,sizeof(CK_ULONG)); - #endif - - default: -@@ -1254,7 +1254,7 @@ CK_RV communicate( CK_ULONG cmd_id, C - } - hst=*hs; - saddr.sin_family = AF_INET; -- bcopy(hs->h_addr,(char *)&saddr.sin_addr,hs->h_length); -+ memcpy((char *)&saddr.sin_addr,hs->h_addr,hs->h_length); - //saddr.sin_addr.s_addr = htonl(0x0933510c); - saddr.sin_port = htons(PORT); - -@@ -1556,11 +1556,11 @@ CK_RV SC_Initialize( void **FunctionList - // Zero out the adapter handle array - // an adapter handle of 0 indicates that the particular adapter has - // NOT been initialized -- bzero((char *)adapter_handle,sizeof(sccAdapterHandle_t)*MAX_SLOT_ID); -+ memset((char *)adapter_handle,0,sizeof(sccAdapterHandle_t)*MAX_SLOT_ID); - initialized = TRUE; - initedpid = getpid(); - SC_SetFunctionList(); -- bzero((char *)correlator_init,PKW_MAX_DEVICES * sizeof(struct Cor_init)); -+ memset((char *)correlator_init,0,PKW_MAX_DEVICES * sizeof(struct Cor_init)); - - { - int i; -@@ -1645,7 +1645,7 @@ rc = 0; - - - saddr.sin_family = AF_INET; -- bcopy(hs->h_addr,(char *)&saddr.sin_addr,hs->h_length); -+ memcpy((char *)&saddr.sin_addr,hs->h_addr,hs->h_length); - saddr.sin_port = htons(PORT); - if ( connect (adapter_handle[i],(struct sockaddr *)&saddr,sizeof(struct sockaddr_in)) < 0 ){ - // XXX FIXME just bail for now. -@@ -3133,7 +3133,7 @@ CK_RV SC_CopyObject( ST_SESSION_HANDLE - #if __64BIT__ - copy_attribute_value(ps,pd,attr); - #else -- bcopy(ps,pd,attr->ulValueLen); -+ memcpy(pd,ps,attr->ulValueLen); - #endif - - #if __64BIT__ -@@ -3842,7 +3842,7 @@ CK_RV SC_SetAttributeValue( ST_SESSION_ - #if __64BIT__ - copy_attribute_value(ps,pd,attr); - #else -- bcopy(ps,pd,attr->ulValueLen); -+ memcpy(pd,ps,attr->ulValueLen); - #endif - - #if __64BIT__ -@@ -3997,7 +3997,7 @@ CK_RV SC_FindObjectsInit( ST_SESSION_HAN - #if __64BIT__ - copy_attribute_value(ps,pd,attr); - #else -- bcopy(ps,pd,attr->ulValueLen); -+ memcpy(pd,ps,attr->ulValueLen); - #endif - - #if __64BIT__ -@@ -4457,7 +4457,7 @@ CK_RV SC_GenerateKey( ST_SESSION_HANDLE - #if __64BIT__ - copy_attribute_value(ps,pd,attr); - #else -- bcopy(ps,pd,attr->ulValueLen); -+ memcpy(pd,ps,attr->ulValueLen); - #endif - - #if __64BIT__ -@@ -5555,7 +5555,7 @@ CK_RV SC_UnwrapKey( ST_SESSION_HANDLE - #if __64BIT__ - copy_attribute_value(ps,pd,attr); - #else -- bcopy(ps,pd,attr->ulValueLen); -+ memcpy(pd,ps,attr->ulValueLen); - #endif - - -@@ -6142,7 +6142,7 @@ CK_RV SC_GenerateKeyPair( ST_SESSION_HAN - #if __64BIT__ - copy_attribute_value(ps,pd,attr); - #else -- bcopy(ps,pd,attr->ulValueLen); -+ memcpy(pd,ps,attr->ulValueLen); - #endif - - #if __64BIT__ -@@ -6205,7 +6205,7 @@ CK_RV SC_GenerateKeyPair( ST_SESSION_HAN - #if __64BIT__ - copy_attribute_value(ps,pd,attr); - #else -- bcopy(ps,pd,attr->ulValueLen); -+ memcpy(pd,ps,attr->ulValueLen); - #endif - - #if __64BIT__ -@@ -7995,7 +7995,7 @@ CK_RV SC_DeriveKey( ST_SESSION_HANDLE - #if __64BIT__ - copy_attribute_value(ps,pd,attr); - #else -- bcopy(ps,pd,attr->ulValueLen); -+ memcpy(pd,ps,attr->ulValueLen); - #endif - - #if __64BIT__ -Index: usr/lib/pkcs11/soft_stdll/soft_specific.c -=================================================================== -RCS file: /cvsroot/opencryptoki/opencryptoki/usr/lib/pkcs11/soft_stdll/soft_specific.c,v -retrieving revision 1.3 -diff -p -u -r1.3 soft_specific.c ---- usr/lib/pkcs11/soft_stdll/soft_specific.c 1 Sep 2005 22:57:05 -0000 1.3 -+++ usr/lib/pkcs11/soft_stdll/soft_specific.c 12 Jan 2006 09:56:42 -0000 -@@ -302,6 +302,7 @@ - #include - #include // for memcmp() et al - #include -+#include - - #include "pkcs11types.h" - #include "defs.h" -@@ -395,6 +396,7 @@ token_specific_init(char * Correlator,CK - CK_RV - token_specific_final() - { -+ return CKR_OK; - } - - -Index: usr/lib/pkcs11/tpm_stdll/new_host.c -=================================================================== -RCS file: /cvsroot/opencryptoki/opencryptoki/usr/lib/pkcs11/tpm_stdll/new_host.c,v -retrieving revision 1.10 -diff -p -u -r1.10 new_host.c ---- usr/lib/pkcs11/tpm_stdll/new_host.c 11 Aug 2005 20:52:59 -0000 1.10 -+++ usr/lib/pkcs11/tpm_stdll/new_host.c 12 Jan 2006 09:56:42 -0000 -@@ -305,12 +305,12 @@ init_data_store(char *directory) - - if ( (pkdir = getenv("PKCS_APP_STORE")) != NULL) { - pk_dir = (char *) malloc(strlen(pkdir)+1024); -- bzero(pk_dir,strlen(pkdir)+1024); -+ memset(pk_dir,0,strlen(pkdir)+1024); - sprintf(pk_dir,"%s/%s",pkdir,SUB_DIR); - LogError("Using custom data store location: %s", pk_dir); - } else { - pk_dir = (char *)malloc(strlen(directory)+25); -- bzero(pk_dir,strlen(directory)+25); -+ memset(pk_dir,0,strlen(directory)+25); - sprintf(pk_dir,"%s",directory); - } - } -Index: usr/sbin/pkcsconf/pkcsconf.c -=================================================================== -RCS file: /cvsroot/opencryptoki/opencryptoki/usr/sbin/pkcsconf/pkcsconf.c,v -retrieving revision 1.5 -diff -p -u -r1.5 pkcsconf.c ---- usr/sbin/pkcsconf/pkcsconf.c 11 Aug 2005 21:00:57 -0000 1.5 -+++ usr/sbin/pkcsconf/pkcsconf.c 12 Jan 2006 09:56:42 -0000 -@@ -588,17 +588,17 @@ done: - #endif - - if (sopin) { -- bzero (sopin, strlen(sopin)); -+ memset (sopin, 0, strlen(sopin)); - free (sopin); - } - - if (pin) { -- bzero (pin, strlen(pin)); -+ memset (pin, 0, strlen(pin)); - free (pin); - } - - if (newpin) { -- bzero (newpin, strlen(newpin)); -+ memset (newpin, 0, strlen(newpin)); - free (newpin); - } - -@@ -672,6 +672,8 @@ echo(int bool){ - * displayed on the terminal is invalid */ - if (tcsetattr(STDIN_FILENO, TCSAFLUSH, &term) != 0) - return -1; -+ -+ return 0; - } - - #if SHM -@@ -725,6 +727,8 @@ display_pkcs11_info(void){ - printf(PKCSINIT_MSG(LIBVERSION, "\tLibrary Version %d.%d \n"), - CryptokiInfo.libraryVersion.major, - CryptokiInfo.libraryVersion.minor); -+ -+ return 0; - } - - CK_RV -@@ -1176,7 +1180,7 @@ init(void){ - dllPtr = dlopen("/usr/lib/pkcs11/PKCS11_API.so64", RTLD_NOW); */ - dllPtr = dlopen("libopencryptoki.so", RTLD_NOW); - if (!dllPtr) { -- printf(PKCSINIT_MSG(LOADERROR, "Error loading PKCS#11 library: 0x%X\n"), rc); -+ printf(PKCSINIT_MSG(LOADERROR, "Error loading PKCS#11 library;\n")); - printf(PKCSINIT_MSG(LOADERROR, "dlopen error: %s\n"), dlerror()); - fflush(stdout); - return -1; -Index: usr/sbin/pkcsslotd/garbage_linux.c -=================================================================== -RCS file: /cvsroot/opencryptoki/opencryptoki/usr/sbin/pkcsslotd/garbage_linux.c,v -retrieving revision 1.3 -diff -p -u -r1.3 garbage_linux.c ---- usr/sbin/pkcsslotd/garbage_linux.c 24 Feb 2005 21:35:10 -0000 1.3 -+++ usr/sbin/pkcsslotd/garbage_linux.c 12 Jan 2006 09:56:42 -0000 -@@ -917,7 +917,7 @@ BOOL IsValidProcessEntry ( pid_t pid, ti - p = (proc_t *)malloc(sizeof(proc_t)); - #else - p = &procstore; -- bzero(p, sizeof(proc_t)); -+ memset(p, 0, sizeof(proc_t)); - #endif - - if( !(valid = Stat2Proc( (int)pid, p )) ) -Index: usr/sbin/pkcsslotd/no_odm.c -=================================================================== -RCS file: /cvsroot/opencryptoki/opencryptoki/usr/sbin/pkcsslotd/no_odm.c,v -retrieving revision 1.5 -diff -p -u -r1.5 no_odm.c ---- usr/sbin/pkcsslotd/no_odm.c 3 Jun 2005 16:07:39 -0000 1.5 -+++ usr/sbin/pkcsslotd/no_odm.c 12 Jan 2006 09:56:42 -0000 -@@ -502,7 +502,7 @@ BOOL ReadSlotInfoDB ( void ) { - #ifdef ALLOCATE - slot_entry = (char *)malloc(sizeof(char)*(PATH_MAX)); - #else -- bzero(slot_entry,PATH_MAX); -+ memset(slot_entry,0,PATH_MAX); - #endif - - fgets(slot_entry, PATH_MAX, fp); -@@ -523,7 +523,7 @@ BOOL ReadSlotInfoDB ( void ) { - // if( feof(fp) ) - // break; - -- bzero(&sinfo_struct,sizeof(sinfo_struct)); // for good measure zero it out before use each time -+ memset(&sinfo_struct,0,sizeof(sinfo_struct)); // for good measure zero it out before use each time - - sinfo_struct.global_sessions = 0; // initializing to zero - element_num = Present; -@@ -746,7 +746,7 @@ BOOL ReadSlotInfoDB ( void ) { - /* WarnLog ( "***** ReadSlotInfoDB: %s: file not found (%s). Skipping DB entry.", sinfo[Index].dll_location, SysError(Err) ); */ - } - else { -- fprintf(stderr, "\nReading Slot Info: %s: looking at %s, stat64() returned %s (%d; %#x)", sinfo_struct.dll_location, SysError(Err), Err, Err); -+ fprintf(stderr, "\nReading Slot Info: %s: stat64() returned %s (%d; %#x)", sinfo_struct.dll_location, SysError(Err), Err, Err); - /* DbgLog (DL0, "***** ReadSlotInfoDB: looking at %s, stat64() returned %s (%d; %#x)", sinfo[Index].dll_location, SysError(Err), Err, Err); */ - } - memset( pSlot, '\0', sizeof(*pSlot) ); -@@ -809,7 +809,7 @@ BOOL ReadSlotInfoDB ( void ) { - if( (sinfo_struct.dll_location != NULL) && - (sinfo_struct.slot_init_fcn != NULL) ) { - -- bcopy(&sinfo_struct,&sinfo[Index],sizeof(sinfo_struct)); // similar to sinfo[Index] = &sinfo_struct; -+ memcpy(&sinfo[Index],&sinfo_struct,sizeof(sinfo_struct)); // similar to sinfo[Index] = &sinfo_struct; - PrintSlotInfo( &(sinfo[Index]) ); - Index++; - diff --git a/openCryptoki-config.patch b/openCryptoki-config.patch deleted file mode 100644 index bab7245..0000000 --- a/openCryptoki-config.patch +++ /dev/null @@ -1,81 +0,0 @@ -? opencryptoki-include-fix.patch -Index: Makefile.am -=================================================================== -RCS file: /cvsroot/opencryptoki/opencryptoki/Makefile.am,v -retrieving revision 1.2 -diff -u -r1.2 Makefile.am ---- Makefile.am 3 Jun 2005 18:18:35 -0000 1.2 -+++ Makefile.am 11 Jan 2006 13:24:51 -0000 -@@ -1,5 +1,5 @@ - SUBDIRS = usr testcases --SPEC=rpm//openCryptoki-$(shell uname -m).spec -+SPEC=rpm//openCryptoki-$(host_cpu).spec - - rpm: ${SPEC} - rm -rf /usr/src/openCryptoki -Index: usr/include/pkcs11/Makefile.am -=================================================================== -RCS file: /cvsroot/opencryptoki/opencryptoki/usr/include/pkcs11/Makefile.am,v -retrieving revision 1.3 -diff -u -r1.3 Makefile.am ---- usr/include/pkcs11/Makefile.am 1 Jun 2005 15:08:35 -0000 1.3 -+++ usr/include/pkcs11/Makefile.am 11 Jan 2006 13:24:51 -0000 -@@ -1,5 +1,5 @@ - opencryptoki_headers = apiclient.h pkcs11types.h pkcs11.h - --opencryptokiincludedir=$(DESTDIR)/$(includedir)/opencryptoki -+opencryptokiincludedir=$(includedir)/opencryptoki - - opencryptokiinclude_HEADERS = $(opencryptoki_headers) -Index: usr/lib/pkcs11/api/Makefile.am -=================================================================== -RCS file: /cvsroot/opencryptoki/opencryptoki/usr/lib/pkcs11/api/Makefile.am,v -retrieving revision 1.28 -diff -u -r1.28 Makefile.am ---- usr/lib/pkcs11/api/Makefile.am 3 Aug 2005 02:43:41 -0000 1.28 -+++ usr/lib/pkcs11/api/Makefile.am 11 Jan 2006 13:24:51 -0000 -@@ -37,29 +37,3 @@ - mkdir -p $(DESTDIR)/$(libdir)/opencryptoki/stdll - cd $(DESTDIR)/$(libdir)/pkcs11 && rm -f stdll && \ - ln -sf ../opencryptoki/stdll/ stdll -- -groupadd pkcs11 -- if test "x$(prefix)" = "x/usr"; then \ -- mkdir -p $(DESTDIR)/var/lib/opencryptoki ; \ -- chown root:pkcs11 $(DESTDIR)/var/lib/opencryptoki ; \ -- chmod 775 $(DESTDIR)/var/lib/opencryptoki ; \ -- if [ ! -L $(DESTDIR)/etc/pkcs11 ] ; then \ -- if [ -e $(DESTDIR)/etc/pkcs11/* ] ; then \ -- mv $(DESTDIR)/etc/pkcs11/* $(DESTDIR)/var/lib/opencryptoki ; \ -- fi ; \ -- fi ;\ -- cd $(DESTDIR)/etc && rm -rf pkcs11 && \ -- ln -sf $(DESTDIR)/var/lib/opencryptoki pkcs11 ; \ -- else \ -- mkdir -p $(DESTDIR)/$(localstatedir)/lib/opencryptoki ; \ -- chown root:pkcs11 $(DESTDIR)/$(localstatedir)/lib/opencryptoki ; \ -- chmod 775 $(DESTDIR)/$(localstatedir)/lib/opencryptoki ; \ -- if [ ! -L $(DESTDIR)/$(sysconfdir)/pkcs11 ] ; then \ -- if [ -e $(DESTDIR)/$(sysconfdir)/pkcs11/* ] ; then \ -- mv $(DESTDIR)/$(sysconfdir)/pkcs11/* \ -- $(DESTDIR)/$(localstatedir)/lib/opencryptoki ; \ -- fi ; \ -- fi ; \ -- mkdir -p $(DESTDIR)/$(sysconfdir) ; \ -- cd $(DESTDIR)/$(sysconfdir) && rm -rf pkcs11 && \ -- ln -sf $(DESTDIR)/$(localstatedir)/lib/opencryptoki pkcs11 ; \ -- fi -Index: usr/lib/pkcs11/methods/4758_status/Makefile.am -=================================================================== -RCS file: /cvsroot/opencryptoki/opencryptoki/usr/lib/pkcs11/methods/4758_status/Makefile.am,v -retrieving revision 1.2 -diff -u -r1.2 Makefile.am ---- usr/lib/pkcs11/methods/4758_status/Makefile.am 22 Feb 2005 20:48:07 -0000 1.2 -+++ usr/lib/pkcs11/methods/4758_status/Makefile.am 11 Jan 2006 13:25:00 -0000 -@@ -11,6 +11,6 @@ - - install-data-local: - mkdir -p $(INSROOT)/usr/lib/pkcs11/methods; \ -- if [ $(shell uname -m) != s390x ] ;then cp 4758_status \ -+ if [ $(host_cpu) != s390x ] ;then cp 4758_status \ - $(INSROOT)/usr/lib/pkcs11/methods/; fi; \ - rm -f /tmp/4758*; diff --git a/openCryptoki-no_mmap.patch b/openCryptoki-no_mmap.patch deleted file mode 100644 index d58f359..0000000 --- a/openCryptoki-no_mmap.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- configure.in 2006-01-11 13:16:18.000000000 -0600 -+++ configure.in 2006-01-25 16:32:36.000000000 -0600 -@@ -246,7 +246,7 @@ - AC_MSG_RESULT([*** Disabling the Corrent Crypto Accelerator token at user request ***]) - fi - --CFLAGS="$CFLAGS -DMMAP -DPKCS64 \ -+CFLAGS="$CFLAGS -DPKCS64 \ - -DCONFIG_PATH=\\\"$CONFIG_PATH\\\" \ - -DSBIN_PATH=\\\"$SBIN_PATH\\\" \ - -DLIB_PATH=\\\"$LIB_PATH\\\" \ diff --git a/openCryptoki-per_user.patch b/openCryptoki-per_user.patch deleted file mode 100644 index 717e5e0..0000000 --- a/openCryptoki-per_user.patch +++ /dev/null @@ -1,331 +0,0 @@ ---- usr/lib/pkcs11/common/loadsave.c 2006-01-25 17:06:14.000000000 -0600 -+++ usr/lib/pkcs11/common/loadsave.c 2006-01-25 18:02:20.000000000 -0600 -@@ -320,9 +320,21 @@ - void - set_perm(int file) - { -+#ifdef PER_USER_TOKEN - /* With per user data stores, we don't share the token data amongst a - * group. In fact, we want to restrict access to a single user */ - fchmod(file,S_IRUSR|S_IWUSR); -+#else -+ struct group *grp; -+ -+ // Set absolute permissions or rw-rw-r-- -+ fchmod(file,S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH); -+ -+ grp = getgrnam("pkcs11"); // Obtain the group id -+ if (grp){ -+ fchown(file,getuid(),grp->gr_gid); // set ownership to root, and pkcs11 group -+ } -+#endif - } - - // -@@ -339,6 +351,7 @@ - CK_ULONG clear_len, cipher_len; - #endif - CK_RV rc; -+#ifdef PER_USER_TOKEN - struct passwd *pw = NULL; - - if ((pw = getpwuid(getuid())) == NULL){ -@@ -347,6 +360,9 @@ - } - - sprintf((char *)fname,"%s/%s/%s",(char *)pk_dir, pw->pw_name, PK_LITE_NV); -+#else -+ sprintf((char *)fname,"%s/%s",(char *)pk_dir, PK_LITE_NV); -+#endif - - rc = XProcLock( xproclock ); - if (rc != CKR_OK){ -@@ -440,6 +456,7 @@ - #endif - CK_RV rc; - CK_BYTE fname[2048]; -+#ifdef PER_USER_TOKEN - struct passwd *pw = NULL; - - if ((pw = getpwuid(getuid())) == NULL){ -@@ -448,6 +465,9 @@ - } - - sprintf((char *)fname,"%s/%s/%s",(char *)pk_dir, pw->pw_name, PK_LITE_NV); -+#else -+ sprintf((char *)fname,"%s/%s",pk_dir, PK_LITE_NV); -+#endif - - rc = XProcLock( xproclock ); - if (rc != CKR_OK){ -@@ -507,8 +527,9 @@ - CK_BYTE line[100]; - CK_RV rc; - CK_BYTE fname[2048]; -+#ifdef PER_USER_TOKEN - struct passwd *pw = NULL; -- -+#endif - - if (object_is_private(obj) == TRUE) - rc = save_private_token_object( obj ); -@@ -521,6 +542,7 @@ - } - // update the index file if it exists - // -+#ifdef PER_USER_TOKEN - if ((pw = getpwuid(getuid())) == NULL){ - LogError("getpwuid failed: %s", strerror(errno)); - return CKR_FUNCTION_FAILED; -@@ -528,6 +550,9 @@ - - sprintf((char *)fname,"%s/%s/%s/%s",(char *)pk_dir, pw->pw_name, - PK_LITE_OBJ_DIR, PK_LITE_OBJ_IDX); -+#else -+ sprintf((char *)fname,"%s/%s/%s",pk_dir,PK_LITE_OBJ_DIR,PK_LITE_OBJ_IDX); -+#endif - - //fp = fopen( "/tmp/TOK_OBJ/OBJ.IDX", "r" ); - fp = fopen( (char *)fname, "r" ); -@@ -579,6 +604,7 @@ - CK_BBOOL flag = FALSE; - CK_RV rc; - CK_ULONG_32 total_len; -+#ifdef PER_USER_TOKEN - struct passwd *pw = NULL; - - if ((pw = getpwuid(getuid())) == NULL){ -@@ -588,6 +614,9 @@ - - sprintf((char *)fname,"%s/%s/%s/",(char *)pk_dir, pw->pw_name, - PK_LITE_OBJ_DIR); -+#else -+ sprintf( (char *)fname,"%s/%s/", pk_dir,PK_LITE_OBJ_DIR); -+#endif - - //strcpy( fname, "/tmp/TOK_OBJ/" ); - strncat( (char *)fname, (char *) obj->name, 8 ); -@@ -643,6 +672,7 @@ - CK_RV rc; - CK_ULONG_32 obj_data_len_32; - CK_ULONG_32 total_len; -+#ifdef PER_USER_TOKEN - struct passwd * pw = NULL; - - if ((pw = getpwuid(getuid())) == NULL){ -@@ -652,6 +682,9 @@ - - sprintf((char *)fname,"%s/%s/%s/",(char *)pk_dir, pw->pw_name, - PK_LITE_OBJ_DIR); -+#else -+ sprintf( (char *)fname,"%s/%s/", pk_dir,PK_LITE_OBJ_DIR); -+#endif - - rc = object_flatten( obj, &obj_data, &obj_data_len ); - obj_data_len_32 = obj_data_len; -@@ -777,6 +810,7 @@ - CK_BYTE tmp[2048], fname[2048],iname[2048]; - CK_BBOOL priv; - CK_ULONG_32 size; -+#ifdef PER_USER_TOKEN - struct passwd *pw = NULL; - - if ((pw = getpwuid(getuid())) == NULL){ -@@ -786,6 +820,9 @@ - - sprintf((char *)iname,"%s/%s/%s/%s",(char *)pk_dir, pw->pw_name, - PK_LITE_OBJ_DIR, PK_LITE_OBJ_IDX); -+#else -+ sprintf((char *)iname,"%s/%s/%s",pk_dir,PK_LITE_OBJ_DIR, PK_LITE_OBJ_IDX); -+#endif - - //fp1 = fopen("/tmp/TOK_OBJ/OBJ.IDX", "r"); - fp1 = fopen((char *)iname, "r"); -@@ -798,7 +835,11 @@ - tmp[ strlen((char *)tmp)-1 ] = 0; - - //strcpy(fname,"/tmp/TOK_OBJ/"); -+#ifdef PER_USER_TOKEN - sprintf((char *)fname,"%s/%s/%s/",pk_dir, pw->pw_name, PK_LITE_OBJ_DIR); -+#else -+ sprintf((char *)fname,"%s/%s/",pk_dir, PK_LITE_OBJ_DIR); -+#endif - strcat((char *)fname, (char *)tmp ); - - fp2 = fopen( (char *)fname, "r" ); -@@ -849,6 +890,7 @@ - CK_BBOOL priv; - CK_ULONG_32 size; - CK_RV rc; -+#ifdef PER_USER_TOKEN - struct passwd *pw = NULL; - - if ((pw = getpwuid(getuid())) == NULL){ -@@ -858,6 +900,9 @@ - - sprintf((char *)iname,"%s/%s/%s/%s",(char *)pk_dir, pw->pw_name, - PK_LITE_OBJ_DIR, PK_LITE_OBJ_IDX); -+#else -+ sprintf((char *)iname,"%s/%s/%s",pk_dir,PK_LITE_OBJ_DIR, PK_LITE_OBJ_IDX); -+#endif - - //fp1 = fopen("/tmp/TOK_OBJ/OBJ.IDX", "r"); - fp1 = fopen((char *)iname, "r"); -@@ -870,7 +915,11 @@ - tmp[ strlen((char *)tmp)-1 ] = 0; - - //strcpy(fname,"/tmp/TOK_OBJ/"); -+#ifdef PER_USER_TOKEN - sprintf((char *)fname,"%s/%s/%s/",pk_dir, pw->pw_name, PK_LITE_OBJ_DIR); -+#else -+ sprintf((char *)fname,"%s/%s/",pk_dir,PK_LITE_OBJ_DIR); -+#endif - strcat((char *)fname,(char *) tmp ); - - fp2 = fopen( (char *)fname, "r" ); -@@ -1057,6 +1106,7 @@ - CK_ULONG cipher_len, clear_len, hash_len; - CK_RV rc; - CK_BYTE fname[2048]; -+#ifdef PER_USER_TOKEN - struct passwd * pw = NULL; - - if ((pw = getpwuid(getuid())) == NULL){ -@@ -1065,6 +1115,9 @@ - } - - sprintf((char *)fname,"%s/%s/MK_SO",(char *)pk_dir, pw->pw_name); -+#else -+ sprintf((char *)fname,"%s/MK_SO",pk_dir); -+#endif - - memset( master_key, 0x0, 3*DES_KEY_SIZE ); - -@@ -1167,6 +1220,7 @@ - CK_ULONG cipher_len, clear_len, hash_len; - CK_RV rc; - CK_BYTE fname[2048]; -+#ifdef PER_USER_TOKEN - struct passwd * pw = NULL; - - if ((pw = getpwuid(getuid())) == NULL){ -@@ -1175,6 +1229,9 @@ - } - - sprintf((char *)fname,"%s/%s/MK_USER",(char *)pk_dir, pw->pw_name); -+#else -+ sprintf((char *)fname,"%s/MK_USER",pk_dir); -+#endif - - memset( master_key, 0x0, 3*DES_KEY_SIZE ); - -@@ -1274,12 +1331,14 @@ - CK_ULONG hash_len, cleartxt_len, ciphertxt_len, padded_len; - CK_RV rc; - CK_BYTE fname[2048]; -+#ifdef PER_USER_TOKEN - struct passwd * pw = NULL; - - if ((pw = getpwuid(getuid())) == NULL){ - LogError("getpwuid failed: %s", strerror(errno)); - return CKR_FUNCTION_FAILED; - } -+#endif - - memcpy( mk.key, master_key, 3 * DES_KEY_SIZE); - -@@ -1329,7 +1388,11 @@ - // - // probably ought to ensure the permissions are correct - // -+#ifdef PER_USER_TOKEN - sprintf((char *)fname,"%s/%s/MK_SO",(char *)pk_dir, pw->pw_name); -+#else -+ sprintf((char *)fname,"%s/MK_SO",pk_dir); -+#endif - //fp = fopen( "/tmp/MK_SO", "w" ); - fp = fopen( (char *)fname, "w" ); - if (!fp) { -@@ -1369,12 +1432,14 @@ - CK_ULONG hash_len, cleartxt_len, ciphertxt_len, padded_len; - CK_RV rc; - CK_BYTE fname[2048]; -+#ifdef PER_USER_TOKEN - struct passwd * pw = NULL; - - if ((pw = getpwuid(getuid())) == NULL){ - LogError("getpwuid failed: %s", strerror(errno)); - return CKR_FUNCTION_FAILED; - } -+#endif - - memcpy( mk.key, master_key, 3 * DES_KEY_SIZE); - -@@ -1426,7 +1491,11 @@ - // - // probably ought to ensure the permissions are correct - // -+#ifdef PER_USER_TOKEN - sprintf((char *)fname,"%s/%s/MK_USER",(char *)pk_dir, pw->pw_name); -+#else -+ sprintf((char *)fname,"%s/MK_USER", pk_dir); -+#endif - //fp = fopen( "/tmp/MK_USER", "w" ); - fp = fopen( (char *)fname, "w" ); - if (!fp) { -@@ -1463,17 +1532,22 @@ - CK_ULONG_32 size; - CK_ULONG size_64; - CK_RV rc; -+#ifdef PER_USER_TOKEN - struct passwd *pw = NULL; - - if ((pw = getpwuid(getuid())) == NULL){ - LogError("getpwuid failed: %s", strerror(errno)); - return CKR_FUNCTION_FAILED; - } -- -+#endif - memset( (char *)fname, 0x0, sizeof(fname) ); - -+#ifdef PER_USER_TOKEN - sprintf((char *)fname,"%s/%s/%s/",(char *)pk_dir, pw->pw_name, - PK_LITE_OBJ_DIR); -+#else -+ sprintf((char *)fname,"%s/%s/",pk_dir, PK_LITE_OBJ_DIR); -+#endif - - // strcpy(fname, "/tmp/TOK_OBJ/" ); - strncat((char *)fname,(char *) obj->name, 8 ); -@@ -1532,6 +1606,7 @@ - FILE *fp1, *fp2; - CK_BYTE line[100]; - CK_BYTE objidx[2048], idxtmp[2048],fname[2048]; -+#ifdef PER_USER_TOKEN - struct passwd *pw = NULL; - - if ((pw = getpwuid(getuid())) == NULL){ -@@ -1543,7 +1618,10 @@ - PK_LITE_OBJ_DIR, PK_LITE_OBJ_IDX); - sprintf((char *)idxtmp,"%s/%s/%s/%s",(char *)pk_dir, pw->pw_name, - PK_LITE_OBJ_DIR, "IDX.TMP"); -- -+#else -+ sprintf((char *)objidx,"%s/%s/%s",pk_dir, PK_LITE_OBJ_DIR,PK_LITE_OBJ_IDX); -+ sprintf((char *)idxtmp,"%s/%s/%s",pk_dir, PK_LITE_OBJ_DIR, "IDX.TMP"); -+#endif - - // FIXME: on UNIX, we need to make sure these guys aren't symlinks - // before we blindly write to these files... -@@ -1600,7 +1678,11 @@ - fclose(fp1); - fclose(fp2); - -+#ifdef PER_USER_TOKEN - sprintf((char *)fname,"%s/%s/%s/%s",pk_dir, pw->pw_name, PK_LITE_OBJ_DIR, (char *)obj->name); -+#else -+ sprintf((char *)fname,"%s/%s/%s",pk_dir, PK_LITE_OBJ_DIR,(char *)obj->name); -+#endif - unlink((char *)fname); - return CKR_OK; - diff --git a/openCryptoki-pkcsslotd-removepidfile.patch b/openCryptoki-pkcsslotd-removepidfile.patch deleted file mode 100644 index 37e06a6..0000000 --- a/openCryptoki-pkcsslotd-removepidfile.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- usr/include/pkcs11/slotmgr.h -+++ usr/include/pkcs11/slotmgr.h -@@ -325,7 +325,7 @@ - #endif - - --#define PID_FILE_PATH CONFIG_PATH "/.slotpid" -+#define PID_FILE_PATH "/var/run/pkcsslotd.pid" - - #ifndef CK_BOOL - #define CK_BOOL CK_BBOOL ---- usr/sbin/pkcsslotd/slotmgr.c -+++ usr/sbin/pkcsslotd/slotmgr.c -@@ -314,6 +314,10 @@ - - void DumpSharedMemory ( void ); - -+void unlink_pidfile(void) -+{ -+ unlink(PID_FILE_PATH); -+} - - /***************************************** - * main() - -@@ -575,6 +579,7 @@ - fprintf(pidfile,"%d",getpid()); - fclose(pidfile); - } -+ atexit(unlink_pidfile); - } - - #pragma info(none) diff --git a/openCryptoki-prototypes.patch b/openCryptoki-prototypes.patch deleted file mode 100644 index ae236e2..0000000 --- a/openCryptoki-prototypes.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- usr/lib/pkcs11/api/shrd_mem.c.in -+++ usr/lib/pkcs11/api/shrd_mem.c.in -@@ -322,6 +322,8 @@ - #include - #include - -+#include -+ - #define MAPFILENAME "@CONFIG_PATH@/.apimap" - - extern API_Proc_Struct_t *Anchor; diff --git a/openCryptoki-retval.patch b/openCryptoki-retval.patch deleted file mode 100644 index df2dcc2..0000000 --- a/openCryptoki-retval.patch +++ /dev/null @@ -1,107 +0,0 @@ ---- testcases/login/login.c -+++ testcases/login/login.c -@@ -82,7 +82,7 @@ - } else { - printf("usage: %s [-slot ] [-h] [-pass passwd] [-user|-so]\n\n", argv[0] ); - printf("By default, Slot %d is used, as user\n\n", SLOT_ID_DEFAULT); -- return; -+ return 0; - } - } - ---- testcases/oc-digest/oc-digest.c -+++ testcases/oc-digest/oc-digest.c -@@ -164,7 +164,7 @@ - - if( (rc = funcs->C_Initialize( &initialize_args )) != CKR_OK ) { - oc_err_msg("C_Initialize", rc); -- return; -+ return clean_up(); - } - - /* stat the file for size, etc */ ---- testcases/rsa_test/rsa_test_genkey.c -+++ testcases/rsa_test/rsa_test_genkey.c -@@ -544,7 +544,7 @@ - printf("By default, Slot #1 is used\n\n"); - printf("By default we skip anything that creates or modifies\n"); - printf("token objects to preserve flash lifetime.\n"); -- return; -+ return 0; - } - } - -@@ -552,7 +552,7 @@ - - rc = do_GetFunctionList(); - if (!rc) -- return; -+ return 0; - - memset( &cinit_args, 0x0, sizeof(cinit_args) ); - cinit_args.flags = CKF_OS_LOCKING_OK; -@@ -564,7 +564,8 @@ - - rc = do_EncryptRSA_PKCS(); - if (!rc) -- return; -+ return 0; - - funcs->C_Finalize( NULL ); -+ return 0; - } ---- testcases/rsa_test/rsa_thread_test.c -+++ testcases/rsa_test/rsa_thread_test.c -@@ -417,7 +417,7 @@ - threads[index].processed = loopcount - failed; - threads[index].ops = (float) ((float)(loopcount - failed) / (float)diff); - -- return; -+ return 0; - errordecrypt: - //if (len1 != len2) { - // printf(" ERROR: lengths don't match\n"); ---- testcases/v2.11/aes_func.c -+++ testcases/v2.11/aes_func.c -@@ -1946,7 +1946,7 @@ - - if ((rc = funcs->C_Initialize(&initialize_args)) != CKR_OK) { - OC_ERR_MSG("C_Initialize", rc); -- return; -+ return 0; - } - - ---- testcases/v2.11/hw_fn.c -+++ testcases/v2.11/hw_fn.c -@@ -289,7 +289,7 @@ - - if( (rc = funcs->C_Initialize( &initialize_args )) != CKR_OK ) { - OC_ERR_MSG("C_Initialize", rc); -- return; -+ return 0; - } - - /* Open a session with the token */ ---- testcases/v2.11/login.c -+++ testcases/v2.11/login.c -@@ -63,7 +63,7 @@ - - if( (rc = funcs->C_Initialize( &initialize_args )) != CKR_OK ) { - oc_err_msg("C_Initialize", rc); -- return; -+ return 0; - } - - // ---- testcases/v2.11/rijndael.c -+++ testcases/v2.11/rijndael.c -@@ -925,7 +925,7 @@ - - if( (rc = funcs->C_Initialize( &initialize_args )) != CKR_OK ) { - OC_ERR_MSG("C_Initialize", rc); -- return; -+ return 0; - } - - /* Open a session with the token */ diff --git a/openCryptoki.changes b/openCryptoki.changes index 9f89b0b..5d4f0ec 100644 --- a/openCryptoki.changes +++ b/openCryptoki.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Sep 12 06:55:17 CEST 2008 - jjolly@suse.de + +- Updated to openCryptoki v2.2.6 + ------------------------------------------------------------------- Thu Aug 28 18:21:26 CEST 2008 - ro@suse.de diff --git a/openCryptoki.spec b/openCryptoki.spec index 7a5c376..333387c 100644 --- a/openCryptoki.spec +++ b/openCryptoki.spec @@ -1,5 +1,5 @@ # -# spec file for package openCryptoki (Version 2.2.2) +# spec file for package openCryptoki (Version 2.2.6) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -17,37 +17,37 @@ # norootforbuild +%define oc_cvs_tag opencryptoki-%{version} Name: openCryptoki BuildRequires: gcc-c++ libica openssl-devel pwdutils Summary: An Implementation of PKCS#11 (Cryptoki) v2.11 for IBM Cryptographic Hardware -Version: 2.2.2 -Release: 165 +Version: 2.2.6 +Release: 1 License: IBM Public License Group: Productivity/Security # :pserver:anonymous@cvs.sourceforge.net:/cvsroot/opencryptoki # cvs co -r openCryptoki-2-1-5 -d openCryptoki-2-1-5 . -Source: openCryptoki-2.2.2-rc2.tar.bz2 +Source: %{oc_cvs_tag}.tar.bz2 Source1: openCryptoki.pkcsslotd Source2: openCryptoki-TFAQ.html -Patch0: openCryptoki-autoconf.patch -Patch1: openCryptoki-config.patch -Patch3: openCryptoki-compile-fixes.patch -Patch4: openCryptoki-no_mmap.patch -Patch5: openCryptoki-per_user.patch -Patch6: openCryptoki-prototypes.patch -Patch7: ock_add_free_mech_list_20060131.diff -Patch8: ock_head_ptr_to_null_20060308.diff -Patch9: ock_222_proc_struct_cmd_20060309.diff -Patch10: ock_222_cmd_fix_ptr_to_arr.diff -Patch11: ock_64_bit_fixes.diff -Patch12: openCryptoki-pkcsslotd-removepidfile.patch -Patch13: openCryptoki-retval.patch +# Patch0: openCryptoki-autoconf.patch +# Patch1: openCryptoki-config.patch +# Patch3: openCryptoki-compile-fixes.patch +# Patch4: openCryptoki-no_mmap.patch +# Patch5: openCryptoki-per_user.patch +# Patch6: openCryptoki-prototypes.patch +# Patch7: ock_add_free_mech_list_20060131.diff +# Patch8: ock_head_ptr_to_null_20060308.diff +# Patch9: ock_222_proc_struct_cmd_20060309.diff +# Patch10: ock_222_cmd_fix_ptr_to_arr.diff +# Patch11: ock_64_bit_fixes.diff +# Patch12: openCryptoki-pkcsslotd-removepidfile.patch +# Patch13: openCryptoki-retval.patch Url: http://oss.software.ibm.com/developerworks/opensource/opencryptoki BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: /usr/sbin/groupadd /usr/bin/id /usr/sbin/usermod /bin/sed Requires: libica -%define oc_cvs_tag openCryptoki-2.2.2-rc2 # the userland tools are only maintained in 32bit, when a 32bit # userland compatibility is available for the corresponding 64bit # architecture. @@ -136,19 +136,19 @@ Cryptographic Accelerator (FC 4960 on pSeries). %prep -%setup -n %{oc_cvs_tag} -%patch1 -%patch3 -%patch4 -%patch5 -%patch6 -%patch7 -%patch8 -p1 -%patch9 -%patch10 -p1 -%patch11 -p2 -%patch12 -%patch13 +%setup -q -n %{oc_cvs_tag} +# %patch1 +# %patch3 +# %patch4 +# %patch5 +# %patch6 +# %patch7 +# %patch8 -p1 +# %patch9 +# %patch10 -p1 +# %patch11 -p2 +# %patch12 +# %patch13 cp %{SOURCE2} . #find -name CVS -type d -print0 | xargs -0 rm -rfv @@ -264,6 +264,7 @@ fi /usr/sbin/pkcs_slot %dir %{_libdir}/opencryptoki %dir %{_libdir}/opencryptoki/stdll +%{_mandir}/man*/* %files 32bit %defattr(-,root,root) @@ -272,19 +273,21 @@ fi %{_libdir}/opencryptoki/libopencryptoki.so %ghost %{_libdir}/opencryptoki/PKCS11_API.so %{_libdir}/opencryptoki/*.0 -%{_libdir}/opencryptoki/stdll/libpkcs11_ica.so -%ghost %{_libdir}/opencryptoki/stdll/PKCS11_ICA.so %ifnarch s390 s390x %{_libdir}/opencryptoki/stdll/libpkcs11_sw.so %ghost %{_libdir}/opencryptoki/stdll/PKCS11_SW.so +%else +%{_libdir}/opencryptoki/stdll/libpkcs11_ica.so +%ghost %{_libdir}/opencryptoki/stdll/PKCS11_ICA.so %endif %{_libdir}/opencryptoki/stdll/*.0 %dir %{_libdir}/pkcs11 %ghost %{_libdir}/pkcs11/stdll %ghost %{_libdir}/pkcs11/methods %{_libdir}/pkcs11/*.so -%{_libdir}/libopencryptoki.so -%{_libdir}/libopencryptoki.so.0 +# %{_libdir}/libopencryptoki.so +# %{_libdir}/libopencryptoki.so.0 +%{_sysconfdir}/ld.so.conf.d/* %files devel %defattr(-,root,root) @@ -305,11 +308,15 @@ fi %{_libdir}/opencryptoki/stdll/*.so %{_libdir}/opencryptoki/stdll/*.0 %{_libdir}/pkcs11 -%{_libdir}/libopencryptoki.so -%{_libdir}/libopencryptoki.so.0 +# %{_libdir}/libopencryptoki.so +# %{_libdir}/libopencryptoki.so.0 +%{_sysconfdir}/ld.so.conf.d/* +%{_mandir}/man*/* %endif %changelog +* Fri Sep 12 2008 jjolly@suse.de +- Updated to openCryptoki v2.2.6 * Thu Aug 28 2008 ro@suse.de - fix init script * Fri Mar 30 2007 ro@suse.de diff --git a/opencryptoki-2.2.6.tar.bz2 b/opencryptoki-2.2.6.tar.bz2 new file mode 100644 index 0000000..cf3ef41 --- /dev/null +++ b/opencryptoki-2.2.6.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c4e59e4a67207986c4cb77bc6a922806d6fa53282a722a17eb08095b0778c8fb +size 983838