cc015c48db
Atalla card, you should be able to compile with the "hw-atalla" switch with "./config" or "perl Configure", and then you can use the command- line switch "-engine atalla" inside speed, s_cient and s_server (after checking out note (1)). Notes: (1) I've turned on native name translation when loading the shared- library, but this means that the Unix shared library needs to be libatasi.so rather than atasi.so. I got around this in my testing by creating a symbollic link from /usr/lib/libatasi.so to the real library, but something better will be needed. It also assumes in win32 that the DLL will be called atasi.dll - but as I don't have a win32/atalla environment to try I have no idea yet if this is the case. (2) Currently DSA verifies are not accelerated because I haven't yet got a mod_exp-based variant of BN_mod_exp2_mont() that yields correct results. (3) Currently the "init()" doesn't fail if the shared library can load successfully but the card is not operational. In this case, the ENGINE_init() call will succeed, but all RSA, DSA, DH, and the two BN_*** operations will fail until the ENGINE is switched back to something that does work. I expect to correct this next. (4) Although the API for the Atalla card just has the one crypto function suggesting an RSA private key operation - this is in fact just a straight mod_exp function that ignores all the RSA key parameters except the (private) exponent and modulus. This is why the only accelerator work is taking place inside the mod_exp function and there's no optimisation of RSA private key operations based on CRT etc.
149 lines
6.3 KiB
Text
149 lines
6.3 KiB
Text
#
|
|
# OpenSSL/crypto/engine/Makefile
|
|
#
|
|
|
|
DIR= engine
|
|
TOP= ../..
|
|
CC= cc
|
|
INCLUDES= -I.. -I../../include
|
|
CFLAG=-g
|
|
INSTALL_PREFIX=
|
|
OPENSSLDIR= /usr/local/ssl
|
|
INSTALLTOP=/usr/local/ssl
|
|
MAKE= make -f Makefile.ssl
|
|
MAKEDEPEND= $(TOP)/util/domd $(TOP)
|
|
MAKEFILE= Makefile.ssl
|
|
AR= ar r
|
|
|
|
CFLAGS= $(INCLUDES) $(CFLAG)
|
|
|
|
GENERAL=Makefile
|
|
TEST= enginetest.c
|
|
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
|
|
LIBOBJ= engine_err.o engine_lib.o engine_list.o engine_openssl.o \
|
|
hw_atalla.o hw_cswift.o hw_ncipher.o
|
|
|
|
SRC= $(LIBSRC)
|
|
|
|
EXHEADER= engine.h
|
|
HEADER= $(EXHEADER)
|
|
|
|
ALL= $(GENERAL) $(SRC) $(HEADER)
|
|
|
|
top:
|
|
(cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
|
|
|
|
all: lib
|
|
|
|
lib: $(LIBOBJ)
|
|
$(AR) $(LIB) $(LIBOBJ)
|
|
$(RANLIB) $(LIB)
|
|
@touch lib
|
|
|
|
files:
|
|
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
|
|
|
links:
|
|
@$(TOP)/util/point.sh Makefile.ssl Makefile
|
|
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
|
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
|
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
|
|
|
install:
|
|
@for i in $(EXHEADER) ; \
|
|
do \
|
|
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
|
|
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
|
|
done;
|
|
|
|
tags:
|
|
ctags $(SRC)
|
|
|
|
tests:
|
|
|
|
lint:
|
|
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
|
|
|
depend:
|
|
$(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
|
|
|
|
dclean:
|
|
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
|
mv -f Makefile.new $(MAKEFILE)
|
|
|
|
clean:
|
|
rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
|
|
|
|
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
|
|
|
engine_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
|
engine_err.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
|
|
engine_err.o: ../../include/openssl/dsa.h ../../include/openssl/engine.h
|
|
engine_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
|
engine_err.o: ../../include/openssl/opensslconf.h
|
|
engine_err.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
|
|
engine_err.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
|
engine_err.o: ../../include/openssl/stack.h
|
|
engine_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
|
engine_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
|
engine_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
|
engine_lib.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
|
|
engine_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h
|
|
engine_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
|
engine_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
|
|
engine_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
|
engine_lib.o: ../../include/openssl/stack.h ../cryptlib.h engine_int.h
|
|
engine_list.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
|
engine_list.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
|
engine_list.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
|
engine_list.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
|
|
engine_list.o: ../../include/openssl/engine.h ../../include/openssl/err.h
|
|
engine_list.o: ../../include/openssl/lhash.h
|
|
engine_list.o: ../../include/openssl/opensslconf.h
|
|
engine_list.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
|
|
engine_list.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
|
engine_list.o: ../../include/openssl/stack.h ../cryptlib.h engine_int.h
|
|
engine_openssl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
|
engine_openssl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
|
engine_openssl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
|
engine_openssl.o: ../../include/openssl/dso.h ../../include/openssl/e_os.h
|
|
engine_openssl.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
|
|
engine_openssl.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
|
engine_openssl.o: ../../include/openssl/opensslconf.h
|
|
engine_openssl.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
|
|
engine_openssl.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
|
engine_openssl.o: ../../include/openssl/stack.h ../cryptlib.h engine_int.h
|
|
hw_atalla.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
|
hw_atalla.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
|
hw_atalla.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
|
hw_atalla.o: ../../include/openssl/dso.h ../../include/openssl/e_os.h
|
|
hw_atalla.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
|
|
hw_atalla.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
|
hw_atalla.o: ../../include/openssl/opensslconf.h
|
|
hw_atalla.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
|
|
hw_atalla.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
|
hw_atalla.o: ../../include/openssl/stack.h ../cryptlib.h engine_int.h
|
|
hw_cswift.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
|
hw_cswift.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
|
hw_cswift.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
|
hw_cswift.o: ../../include/openssl/dso.h ../../include/openssl/e_os.h
|
|
hw_cswift.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
|
|
hw_cswift.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
|
hw_cswift.o: ../../include/openssl/opensslconf.h
|
|
hw_cswift.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
|
|
hw_cswift.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
|
hw_cswift.o: ../../include/openssl/stack.h ../cryptlib.h engine_int.h
|
|
hw_ncipher.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
|
hw_ncipher.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
|
hw_ncipher.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
|
hw_ncipher.o: ../../include/openssl/dso.h ../../include/openssl/e_os.h
|
|
hw_ncipher.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
|
|
hw_ncipher.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
|
hw_ncipher.o: ../../include/openssl/opensslconf.h
|
|
hw_ncipher.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
|
|
hw_ncipher.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
|
hw_ncipher.o: ../../include/openssl/stack.h ../cryptlib.h engine_int.h
|