This commit is contained in:
parent
bc1979e539
commit
ee5cc2e86f
@ -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/<pid>/cmdline */
|
||||
+ cmd[16], /* command line string vector for /proc/<pid>/cmdline */
|
||||
state; /* single-char code for process state [R, S, D, Z, or T] */
|
||||
|
||||
int
|
@ -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 <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
-/* #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/<pid>/stat)
|
||||
- *
|
||||
- * Comes from task_struct in linux/sched.h
|
||||
- */
|
||||
-typedef struct {
|
||||
- int
|
||||
- pid; /* process id */
|
||||
-
|
||||
- char
|
||||
- *cmd, /* command line string vector for /proc/<pid>/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/<pid>/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
|
||||
|
@ -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 <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
+#include <sys/shm.h>
|
||||
#include <pthread.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/ipc.h>
|
@ -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;
|
||||
}
|
||||
|
@ -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) {
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:38e80887e0fadf5d6ca2c7ba7a561dbdc98f01595148bc62d31f8fe848930a5b
|
||||
size 612893
|
@ -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
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -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*;
|
@ -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\\\" \
|
@ -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;
|
||||
|
@ -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)
|
@ -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 <slotmgr.h>
|
||||
#include <apictl.h>
|
||||
|
||||
+#include <string.h>
|
||||
+
|
||||
#define MAPFILENAME "@CONFIG_PATH@/.apimap"
|
||||
|
||||
extern API_Proc_Struct_t *Anchor;
|
@ -1,107 +0,0 @@
|
||||
--- testcases/login/login.c
|
||||
+++ testcases/login/login.c
|
||||
@@ -82,7 +82,7 @@
|
||||
} else {
|
||||
printf("usage: %s [-slot <num>] [-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 */
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
3
opencryptoki-2.2.6.tar.bz2
Normal file
3
opencryptoki-2.2.6.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c4e59e4a67207986c4cb77bc6a922806d6fa53282a722a17eb08095b0778c8fb
|
||||
size 983838
|
Loading…
x
Reference in New Issue
Block a user