Commit 016d7d25 authored by Geoff Thorpe's avatar Geoff Thorpe
Browse files

This is an engine contributed by Broadcom - it is meant to support the

BCM5805 and BCM5820 units. So far I've merely taken a skim over the code
and changed a few things from their original contributed source
(de-shadowing variables, removing variables from the header, and
re-constifying some functions to remove warnings). If this gives
compilation problems on any system, please let me know. We will hopefully
know for sure whether this actually functions on a system with the relevant
hardware in a day or two.  :-)
parent 2c15d426
Loading
Loading
Loading
Loading
+23 −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_all.c engine_openssl.c \
	hw_atalla.c hw_cswift.c hw_ncipher.c hw_nuron.c
	hw_atalla.c hw_cswift.c hw_ncipher.c hw_nuron.c hw_ubsec.c
LIBOBJ= engine_err.o engine_lib.o engine_list.o engine_all.o engine_openssl.o \
	hw_atalla.o hw_cswift.o hw_ncipher.o hw_nuron.o
	hw_atalla.o hw_cswift.o hw_ncipher.o hw_nuron.o hw_ubsec.o

SRC= $(LIBSRC)

@@ -265,3 +265,24 @@ hw_nuron.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
hw_nuron.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
hw_nuron.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
hw_nuron.o: ../../include/openssl/symhacks.h ../cryptlib.h engine_int.h
hw_ubsec.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
hw_ubsec.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
hw_ubsec.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
hw_ubsec.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
hw_ubsec.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
hw_ubsec.o: ../../include/openssl/dso.h ../../include/openssl/e_os.h
hw_ubsec.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
hw_ubsec.o: ../../include/openssl/err.h ../../include/openssl/evp.h
hw_ubsec.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
hw_ubsec.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
hw_ubsec.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
hw_ubsec.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
hw_ubsec.o: ../../include/openssl/opensslconf.h
hw_ubsec.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
hw_ubsec.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
hw_ubsec.o: ../../include/openssl/rc5.h ../../include/openssl/rd_fst.h
hw_ubsec.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
hw_ubsec.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
hw_ubsec.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
hw_ubsec.o: ../../include/openssl/symhacks.h ../cryptlib.h engine_int.h
hw_ubsec.o: vendor_defns/hw_ubsec.h
+8 −0
Original line number Diff line number Diff line
@@ -159,6 +159,7 @@ void ENGINE_load_cswift(void);
void ENGINE_load_chil(void);
void ENGINE_load_atalla(void);
void ENGINE_load_nuron(void);
void ENGINE_load_ubsec(void);
void ENGINE_load_builtin_engines(void);

/* These functions are useful for manufacturing new ENGINE
@@ -369,6 +370,13 @@ void ERR_load_ENGINE_strings(void);
#define ENGINE_F_NURON_FINISH				 157
#define ENGINE_F_NURON_INIT				 156
#define ENGINE_F_NURON_MOD_EXP				 158
#define ENGINE_F_UBSEC_DSA_SIGN				 163
#define ENGINE_F_UBSEC_DSA_VERIFY			 164
#define ENGINE_F_UBSEC_FINISH				 165
#define ENGINE_F_UBSEC_INIT				 166
#define ENGINE_F_UBSEC_MOD_EXP				 167
#define ENGINE_F_UBSEC_RSA_MOD_EXP			 168
#define ENGINE_F_UBSEC_RSA_MOD_EXP_CRT			 169

/* Reason codes. */
#define ENGINE_R_ALREADY_LOADED				 100
+10 −0
Original line number Diff line number Diff line
@@ -106,6 +106,15 @@ void ENGINE_load_nuron(void)
#endif /* !NO_HW */
	}

void ENGINE_load_ubsec(void)
	{
#ifndef NO_HW
#ifndef NO_HW_UBSEC
	engine_add(ENGINE_ubsec());
#endif /* !NO_HW_UBSEC */
#endif /* !NO_HW */
	}

void ENGINE_load_builtin_engines(void)
	{
	static int done=0;
@@ -117,4 +126,5 @@ void ENGINE_load_builtin_engines(void)
	ENGINE_load_chil();
	ENGINE_load_atalla();
	ENGINE_load_nuron();
	ENGINE_load_ubsec();
	}
+7 −0
Original line number Diff line number Diff line
@@ -129,6 +129,13 @@ static ERR_STRING_DATA ENGINE_str_functs[]=
{ERR_PACK(0,ENGINE_F_NURON_FINISH,0),	"NURON_FINISH"},
{ERR_PACK(0,ENGINE_F_NURON_INIT,0),	"NURON_INIT"},
{ERR_PACK(0,ENGINE_F_NURON_MOD_EXP,0),	"NURON_MOD_EXP"},
{ERR_PACK(0,ENGINE_F_UBSEC_DSA_SIGN,0),	"UBSEC_DSA_SIGN"},
{ERR_PACK(0,ENGINE_F_UBSEC_DSA_VERIFY,0),	"UBSEC_DSA_VERIFY"},
{ERR_PACK(0,ENGINE_F_UBSEC_FINISH,0),	"UBSEC_FINISH"},
{ERR_PACK(0,ENGINE_F_UBSEC_INIT,0),	"UBSEC_INIT"},
{ERR_PACK(0,ENGINE_F_UBSEC_MOD_EXP,0),	"UBSEC_MOD_EXP"},
{ERR_PACK(0,ENGINE_F_UBSEC_RSA_MOD_EXP,0),	"UBSEC_RSA_MOD_EXP"},
{ERR_PACK(0,ENGINE_F_UBSEC_RSA_MOD_EXP_CRT,0),	"UBSEC_RSA_MOD_EXP_CRT"},
{0,NULL}
	};

+4 −0
Original line number Diff line number Diff line
@@ -135,6 +135,10 @@ ENGINE *ENGINE_atalla();
ENGINE *ENGINE_nuron();
#endif /* !NO_HW_NURON */

#ifndef NO_HW_UBSEC
ENGINE *ENGINE_ubsec();
#endif /* !NO_HW_UBSEC */

#endif /* !NO_HW */

#ifdef  __cplusplus
Loading