Commit 37fe6975 authored by Mark J. Cox's avatar Mark J. Cox
Browse files

Add support for AEP crypto cards to 0.9.6c. This patch is in Red Hat Linux

7.2 and been given extensive testing; it also compiles okay on our selection
of random machines (including 64-bit)
Submitted by: AEP, Mark Cox
Reviewed by: Mark Cox
PR:
parent d8616888
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -4,7 +4,9 @@

 Changes between 0.9.6b and 0.9.6c  [XX xxx XXXX]

  *)
  *) Add support for crypto accelerator cards from Accelerated
     Encryption Processing, www.aep.ie.  (Use engine 'aep')
     [AEP Inc. and Mark Cox]

 Changes between 0.9.6a and 0.9.6b  [9 Jul 2001]

+21 −2
Original line number Diff line number Diff line
@@ -23,9 +23,9 @@ APPS=

LIB=$(TOP)/libcrypto.a
LIBSRC= engine_err.c engine_lib.c engine_list.c engine_openssl.c \
	hw_atalla.c hw_cswift.c hw_ncipher.c
	hw_atalla.c hw_cswift.c hw_ncipher.c hw_aep.c
LIBOBJ= engine_err.o engine_lib.o engine_list.o engine_openssl.o \
	hw_atalla.o hw_cswift.o hw_ncipher.o
	hw_atalla.o hw_cswift.o hw_ncipher.o hw_aep.o

SRC= $(LIBSRC)

@@ -156,6 +156,25 @@ engine_openssl.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
engine_openssl.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
engine_openssl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
engine_openssl.o: ../../include/openssl/symhacks.h ../cryptlib.h engine_int.h
hw_aep.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
hw_aep.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
hw_aep.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
hw_aep.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
hw_aep.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
hw_aep.o: ../../include/openssl/dso.h ../../include/openssl/e_os.h
hw_aep.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
hw_aep.o: ../../include/openssl/err.h ../../include/openssl/evp.h
hw_aep.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
hw_aep.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
hw_aep.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
hw_aep.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
hw_aep.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
hw_aep.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
hw_aep.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
hw_aep.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
hw_aep.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
hw_aep.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
hw_aep.o: ../cryptlib.h engine_int.h vendor_defns/aep.h
hw_atalla.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
hw_atalla.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
hw_atalla.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
+14 −0
Original line number Diff line number Diff line
@@ -297,6 +297,13 @@ void ERR_load_ENGINE_strings(void);
/* Error codes for the ENGINE functions. */

/* Function codes. */

#define ENGINE_F_AEP_FINISH				 156
#define ENGINE_F_AEP_INIT				 157
#define ENGINE_F_AEP_MOD_EXP				 158
#define ENGINE_F_AEP_MOD_EXP_CRT			 160
#define ENGINE_F_AEP_RAND				 161
#define ENGINE_F_AEP_RSA_MOD_EXP			 159
#define ENGINE_F_ATALLA_FINISH				 135
#define ENGINE_F_ATALLA_INIT				 136
#define ENGINE_F_ATALLA_MOD_EXP				 137
@@ -359,6 +366,8 @@ void ERR_load_ENGINE_strings(void);
#define ENGINE_F_LOG_MESSAGE				 141

/* Reason codes. */

#define ENGINE_R_AEP_INIT_FAILURE			 132
#define ENGINE_R_ALREADY_LOADED				 100
#define ENGINE_R_BIO_WAS_FREED				 121
#define ENGINE_R_BN_CTX_FULL				 101
@@ -372,10 +381,13 @@ void ERR_load_ENGINE_strings(void);
#define ENGINE_R_FAILED_LOADING_PUBLIC_KEY		 129
#define ENGINE_R_FINISH_FAILED				 106
#define ENGINE_R_GET_HANDLE_FAILED			 107
#define ENGINE_R_GET_RANDOM_FAILED			 133
#define ENGINE_R_ID_OR_NAME_MISSING			 108
#define ENGINE_R_INIT_FAILED				 109
#define ENGINE_R_INTERNAL_LIST_ERROR			 110
#define ENGINE_R_MISSING_KEY_COMPONENTS			 111
#define ENGINE_R_MOD_EXP_CRT_FAILED			 134
#define ENGINE_R_MOD_EXP_FAILED				 131
#define ENGINE_R_NOT_INITIALISED			 117
#define ENGINE_R_NOT_LOADED				 112
#define ENGINE_R_NO_CALLBACK				 127
@@ -386,6 +398,8 @@ void ERR_load_ENGINE_strings(void);
#define ENGINE_R_NO_SUCH_ENGINE				 116
#define ENGINE_R_NO_UNLOAD_FUNCTION			 126
#define ENGINE_R_PROVIDE_PARAMETERS			 113
#define ENGINE_R_RETURN_CONNECTION_FAILED		 135
#define ENGINE_R_SETBNCALLBACK_FAILURE			 136
#define ENGINE_R_REQUEST_FAILED				 114
#define ENGINE_R_REQUEST_FALLBACK			 118
#define ENGINE_R_SIZE_TOO_LARGE_OR_TOO_SMALL		 122
+12 −0
Original line number Diff line number Diff line
@@ -66,6 +66,12 @@
#ifndef NO_ERR
static ERR_STRING_DATA ENGINE_str_functs[]=
	{
{ERR_PACK(0,ENGINE_F_AEP_FINISH,0),	"AEP_FINISH"},
{ERR_PACK(0,ENGINE_F_AEP_INIT,0),	"AEP_INIT"},
{ERR_PACK(0,ENGINE_F_AEP_MOD_EXP,0),	"AEP_MOD_EXP"},
{ERR_PACK(0,ENGINE_F_AEP_MOD_EXP_CRT,0),	"AEP_MOD_EXP_CRT"},
{ERR_PACK(0,ENGINE_F_AEP_RAND,0),	"AEP_RAND"},
{ERR_PACK(0,ENGINE_F_AEP_RSA_MOD_EXP,0),	"AEP_RSA_MOD_EXP"},
{ERR_PACK(0,ENGINE_F_ATALLA_FINISH,0),	"ATALLA_FINISH"},
{ERR_PACK(0,ENGINE_F_ATALLA_INIT,0),	"ATALLA_INIT"},
{ERR_PACK(0,ENGINE_F_ATALLA_MOD_EXP,0),	"ATALLA_MOD_EXP"},
@@ -131,6 +137,7 @@ static ERR_STRING_DATA ENGINE_str_functs[]=

static ERR_STRING_DATA ENGINE_str_reasons[]=
	{
{ENGINE_R_AEP_INIT_FAILURE               ,"aep init failure"},
{ENGINE_R_ALREADY_LOADED                 ,"already loaded"},
{ENGINE_R_BIO_WAS_FREED                  ,"bio was freed"},
{ENGINE_R_BN_CTX_FULL                    ,"BN_CTX full"},
@@ -144,10 +151,13 @@ static ERR_STRING_DATA ENGINE_str_reasons[]=
{ENGINE_R_FAILED_LOADING_PUBLIC_KEY      ,"failed loading public key"},
{ENGINE_R_FINISH_FAILED                  ,"finish failed"},
{ENGINE_R_GET_HANDLE_FAILED              ,"could not obtain hardware handle"},
{ENGINE_R_GET_RANDOM_FAILED              ,"get random failed"},
{ENGINE_R_ID_OR_NAME_MISSING             ,"'id' or 'name' missing"},
{ENGINE_R_INIT_FAILED                    ,"init failed"},
{ENGINE_R_INTERNAL_LIST_ERROR            ,"internal list error"},
{ENGINE_R_MISSING_KEY_COMPONENTS         ,"missing key components"},
{ENGINE_R_MOD_EXP_CRT_FAILED             ,"mod exp crt failed"},
{ENGINE_R_MOD_EXP_FAILED                 ,"mod exp failed"},
{ENGINE_R_NOT_INITIALISED                ,"not initialised"},
{ENGINE_R_NOT_LOADED                     ,"not loaded"},
{ENGINE_R_NO_CALLBACK                    ,"no callback"},
@@ -160,6 +170,8 @@ static ERR_STRING_DATA ENGINE_str_reasons[]=
{ENGINE_R_PROVIDE_PARAMETERS             ,"provide parameters"},
{ENGINE_R_REQUEST_FAILED                 ,"request failed"},
{ENGINE_R_REQUEST_FALLBACK               ,"request fallback"},
{ENGINE_R_RETURN_CONNECTION_FAILED       ,"return connection failed"},
{ENGINE_R_SETBNCALLBACK_FAILURE          ,"setbncallback failure"},
{ENGINE_R_SIZE_TOO_LARGE_OR_TOO_SMALL    ,"size too large or too small"},
{ENGINE_R_UNIT_FAILURE                   ,"unit failure"},
{0,NULL}
+5 −0
Original line number Diff line number Diff line
@@ -151,6 +151,11 @@ ENGINE *ENGINE_ncipher();
ENGINE *ENGINE_atalla();
#endif /* !NO_HW_ATALLA */

#ifndef NO_HW_AEP
/* Returns a structure of AEP methods. */
ENGINE *ENGINE_aep();
#endif /* !NO_HW_AEP */

#endif /* !NO_HW */

#ifdef  __cplusplus
Loading