summaryrefslogtreecommitdiffstats
path: root/lib/libssl/src/crypto/engine
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2002-09-10 16:31:53 +0000
committermarkus <markus@openbsd.org>2002-09-10 16:31:53 +0000
commit1f9308f95cf5f2eb77b454500c9bb49d76673ef3 (patch)
treec6825952eba2bd0bea9ff46656b25ab7eea8284b /lib/libssl/src/crypto/engine
parentUpdate list of supported CMD and Promise devices. (diff)
downloadwireguard-openbsd-1f9308f95cf5f2eb77b454500c9bb49d76673ef3.tar.xz
wireguard-openbsd-1f9308f95cf5f2eb77b454500c9bb49d76673ef3.zip
merge openssl-0.9.7-beta3, tested on vax by miod@
Diffstat (limited to 'lib/libssl/src/crypto/engine')
-rw-r--r--lib/libssl/src/crypto/engine/Makefile.ssl351
-rw-r--r--lib/libssl/src/crypto/engine/eng_fat.c2
-rw-r--r--lib/libssl/src/crypto/engine/hw_4758_cca.c29
-rw-r--r--lib/libssl/src/crypto/engine/hw_atalla.c27
-rw-r--r--lib/libssl/src/crypto/engine/hw_cswift.c27
-rw-r--r--lib/libssl/src/crypto/engine/hw_ncipher.c33
6 files changed, 322 insertions, 147 deletions
diff --git a/lib/libssl/src/crypto/engine/Makefile.ssl b/lib/libssl/src/crypto/engine/Makefile.ssl
index 5172028f93a..8bc8985e023 100644
--- a/lib/libssl/src/crypto/engine/Makefile.ssl
+++ b/lib/libssl/src/crypto/engine/Makefile.ssl
@@ -74,7 +74,7 @@ tags:
errors:
$(PERL) $(TOP)/util/mkerr.pl -conf hw.ec \
- -nostatic -staticloader -write hw_*.c; \
+ -nostatic -staticloader -write hw_*.c
tests:
@@ -82,7 +82,7 @@ lint:
lint -DLINT $(INCLUDES) $(SRC)>fluff
depend:
- $(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
+ $(MAKEDEPEND) $(CFLAG) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
dclean:
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
@@ -196,22 +196,29 @@ eng_list.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
eng_list.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
eng_list.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
eng_list.o: ../cryptlib.h eng_int.h eng_list.c
-eng_openssl.o: ../../e_os.h ../../include/openssl/asn1.h
-eng_openssl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
-eng_openssl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
-eng_openssl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-eng_openssl.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
-eng_openssl.o: ../../include/openssl/engine.h ../../include/openssl/err.h
-eng_openssl.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
+eng_openssl.o: ../../e_os.h ../../include/openssl/aes.h
+eng_openssl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
+eng_openssl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
+eng_openssl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
+eng_openssl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
+eng_openssl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
+eng_openssl.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h
+eng_openssl.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
+eng_openssl.o: ../../include/openssl/err.h ../../include/openssl/evp.h
+eng_openssl.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
+eng_openssl.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
+eng_openssl.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
eng_openssl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
eng_openssl.o: ../../include/openssl/opensslconf.h
eng_openssl.o: ../../include/openssl/opensslv.h
eng_openssl.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h
eng_openssl.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h
-eng_openssl.o: ../../include/openssl/rand.h ../../include/openssl/rc4.h
-eng_openssl.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
-eng_openssl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
-eng_openssl.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
+eng_openssl.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
+eng_openssl.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
+eng_openssl.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
+eng_openssl.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
+eng_openssl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
+eng_openssl.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
eng_openssl.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
eng_openssl.o: ../cryptlib.h eng_openssl.c
eng_pkey.o: ../../e_os.h ../../include/openssl/asn1.h
@@ -226,47 +233,64 @@ eng_pkey.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
eng_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
eng_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
eng_pkey.o: ../cryptlib.h eng_int.h eng_pkey.c
-eng_table.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-eng_table.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
-eng_table.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-eng_table.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
-eng_table.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-eng_table.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
+eng_table.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
+eng_table.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
+eng_table.o: ../../include/openssl/bn.h ../../include/openssl/cast.h
+eng_table.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
+eng_table.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
+eng_table.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
+eng_table.o: ../../include/openssl/engine.h ../../include/openssl/err.h
+eng_table.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
+eng_table.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
+eng_table.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
+eng_table.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
eng_table.o: ../../include/openssl/objects.h
eng_table.o: ../../include/openssl/opensslconf.h
eng_table.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
-eng_table.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
-eng_table.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
-eng_table.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
+eng_table.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
+eng_table.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
+eng_table.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
+eng_table.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
+eng_table.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
+eng_table.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
eng_table.o: eng_int.h eng_table.c
-hw_4758_cca.o: ../../e_os.h ../../include/openssl/asn1.h
-hw_4758_cca.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
-hw_4758_cca.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
-hw_4758_cca.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-hw_4758_cca.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
-hw_4758_cca.o: ../../include/openssl/engine.h ../../include/openssl/err.h
-hw_4758_cca.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
+hw_4758_cca.o: ../../e_os.h ../../include/openssl/aes.h
+hw_4758_cca.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
+hw_4758_cca.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
+hw_4758_cca.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
+hw_4758_cca.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
+hw_4758_cca.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
+hw_4758_cca.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h
+hw_4758_cca.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
+hw_4758_cca.o: ../../include/openssl/err.h ../../include/openssl/evp.h
+hw_4758_cca.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
+hw_4758_cca.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
+hw_4758_cca.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
hw_4758_cca.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
hw_4758_cca.o: ../../include/openssl/opensslconf.h
hw_4758_cca.o: ../../include/openssl/opensslv.h
hw_4758_cca.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
-hw_4758_cca.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
+hw_4758_cca.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
+hw_4758_cca.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
+hw_4758_cca.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
hw_4758_cca.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
hw_4758_cca.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
-hw_4758_cca.o: ../../include/openssl/ui.h ../../include/openssl/x509.h
-hw_4758_cca.o: ../../include/openssl/x509_vfy.h ../cryptlib.h hw_4758_cca.c
-hw_4758_cca.o: hw_4758_cca_err.c hw_4758_cca_err.h vendor_defns/hw_4758_cca.h
+hw_4758_cca.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
+hw_4758_cca.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
+hw_4758_cca.o: ../cryptlib.h hw_4758_cca.c hw_4758_cca_err.c hw_4758_cca_err.h
+hw_4758_cca.o: vendor_defns/hw_4758_cca.h
hw_aep.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-hw_aep.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
-hw_aep.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-hw_aep.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
-hw_aep.o: ../../include/openssl/engine.h ../../include/openssl/err.h
-hw_aep.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
-hw_aep.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
-hw_aep.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
-hw_aep.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
-hw_aep.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h hw_aep.c
-hw_aep.o: hw_aep_err.c hw_aep_err.h vendor_defns/aep.h
+hw_aep.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
+hw_aep.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
+hw_aep.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h
+hw_aep.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
+hw_aep.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
+hw_aep.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
+hw_aep.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
+hw_aep.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
+hw_aep.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
+hw_aep.o: ../../include/openssl/ui.h hw_aep.c hw_aep_err.c hw_aep_err.h
+hw_aep.o: vendor_defns/aep.h
hw_atalla.o: ../../e_os.h ../../include/openssl/asn1.h
hw_atalla.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
hw_atalla.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
@@ -293,24 +317,31 @@ hw_cswift.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
hw_cswift.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
hw_cswift.o: ../cryptlib.h hw_cswift.c hw_cswift_err.c hw_cswift_err.h
hw_cswift.o: vendor_defns/cswift.h
-hw_ncipher.o: ../../e_os.h ../../include/openssl/asn1.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_os2.h
-hw_ncipher.o: ../../include/openssl/engine.h ../../include/openssl/err.h
-hw_ncipher.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
+hw_ncipher.o: ../../e_os.h ../../include/openssl/aes.h
+hw_ncipher.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
+hw_ncipher.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
+hw_ncipher.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
+hw_ncipher.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
+hw_ncipher.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
+hw_ncipher.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h
+hw_ncipher.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
+hw_ncipher.o: ../../include/openssl/err.h ../../include/openssl/evp.h
+hw_ncipher.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
+hw_ncipher.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
+hw_ncipher.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
hw_ncipher.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
hw_ncipher.o: ../../include/openssl/opensslconf.h
hw_ncipher.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
hw_ncipher.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h
hw_ncipher.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
+hw_ncipher.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
+hw_ncipher.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
hw_ncipher.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
hw_ncipher.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
hw_ncipher.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
-hw_ncipher.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
-hw_ncipher.o: ../cryptlib.h hw_ncipher.c hw_ncipher_err.c hw_ncipher_err.h
-hw_ncipher.o: vendor_defns/hwcryptohook.h
+hw_ncipher.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
+hw_ncipher.o: ../../include/openssl/x509_vfy.h ../cryptlib.h hw_ncipher.c
+hw_ncipher.o: hw_ncipher_err.c hw_ncipher_err.h vendor_defns/hwcryptohook.h
hw_nuron.o: ../../e_os.h ../../include/openssl/asn1.h
hw_nuron.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
hw_nuron.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
@@ -323,47 +354,71 @@ hw_nuron.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
hw_nuron.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
hw_nuron.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
hw_nuron.o: ../cryptlib.h hw_nuron.c hw_nuron_err.c hw_nuron_err.h
+hw_cryptodev.o: ../../include/openssl/aes.h
hw_cryptodev.o: ../../include/openssl/asn1.h
-hw_cryptodev.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
+hw_cryptodev.o: ../../include/openssl/bio.h
+hw_cryptodev.o: ../../include/openssl/blowfish.h
+hw_cryptodev.o: ../../include/openssl/bn.h
+hw_cryptodev.o: ../../include/openssl/cast.h
hw_cryptodev.o: ../../include/openssl/conf.h
hw_cryptodev.o: ../../include/openssl/crypto.h
+hw_cryptodev.o: ../../include/openssl/des.h
+hw_cryptodev.o: ../../include/openssl/des_old.h
hw_cryptodev.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
hw_cryptodev.o: ../../include/openssl/e_os2.h
hw_cryptodev.o: ../../include/openssl/engine.h
hw_cryptodev.o: ../../include/openssl/err.h
hw_cryptodev.o: ../../include/openssl/evp.h
+hw_cryptodev.o: ../../include/openssl/idea.h
hw_cryptodev.o: ../../include/openssl/lhash.h
+hw_cryptodev.o: ../../include/openssl/md2.h
+hw_cryptodev.o: ../../include/openssl/md4.h
+hw_cryptodev.o: ../../include/openssl/md5.h
+hw_cryptodev.o: ../../include/openssl/mdc2.h
hw_cryptodev.o: ../../include/openssl/obj_mac.h
hw_cryptodev.o: ../../include/openssl/objects.h
hw_cryptodev.o: ../../include/openssl/opensslconf.h
hw_cryptodev.o: ../../include/openssl/opensslv.h
hw_cryptodev.o: ../../include/openssl/ossl_typ.h
hw_cryptodev.o: ../../include/openssl/rand.h
+hw_cryptodev.o: ../../include/openssl/rc2.h
+hw_cryptodev.o: ../../include/openssl/rc4.h
+hw_cryptodev.o: ../../include/openssl/rc5.h
+hw_cryptodev.o: ../../include/openssl/ripemd.h
hw_cryptodev.o: ../../include/openssl/rsa.h
hw_cryptodev.o: ../../include/openssl/safestack.h
+hw_cryptodev.o: ../../include/openssl/sha.h
hw_cryptodev.o: ../../include/openssl/stack.h
hw_cryptodev.o: ../../include/openssl/symhacks.h
-hw_cryptodev.o: ../../include/openssl/ui.h ../evp/evp_locl.h eng_int.h
-hw_cryptodev.o: hw_cryptodev.c
-hw_sureware.o: ../../e_os.h ../../include/openssl/asn1.h
-hw_sureware.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
-hw_sureware.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
-hw_sureware.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-hw_sureware.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
-hw_sureware.o: ../../include/openssl/engine.h ../../include/openssl/err.h
-hw_sureware.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
+hw_cryptodev.o: ../../include/openssl/ui.h
+hw_cryptodev.o: ../../include/openssl/ui_compat.h ../evp/evp_locl.h
+hw_cryptodev.o: eng_int.h hw_cryptodev.c
+hw_sureware.o: ../../e_os.h ../../include/openssl/aes.h
+hw_sureware.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
+hw_sureware.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
+hw_sureware.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
+hw_sureware.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
+hw_sureware.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
+hw_sureware.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h
+hw_sureware.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
+hw_sureware.o: ../../include/openssl/err.h ../../include/openssl/evp.h
+hw_sureware.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
+hw_sureware.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
+hw_sureware.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
hw_sureware.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
hw_sureware.o: ../../include/openssl/opensslconf.h
hw_sureware.o: ../../include/openssl/opensslv.h
hw_sureware.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h
hw_sureware.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h
-hw_sureware.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
+hw_sureware.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
+hw_sureware.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
+hw_sureware.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
hw_sureware.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
hw_sureware.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
-hw_sureware.o: ../../include/openssl/ui.h ../../include/openssl/x509.h
-hw_sureware.o: ../../include/openssl/x509_vfy.h ../cryptlib.h eng_int.h
-hw_sureware.o: engine.h hw_sureware.c hw_sureware_err.c hw_sureware_err.h
-hw_sureware.o: vendor_defns/sureware.h
+hw_sureware.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
+hw_sureware.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
+hw_sureware.o: ../cryptlib.h eng_int.h engine.h hw_sureware.c hw_sureware_err.c
+hw_sureware.o: hw_sureware_err.h vendor_defns/sureware.h
hw_ubsec.o: ../../e_os.h ../../include/openssl/asn1.h
hw_ubsec.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
hw_ubsec.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
@@ -377,77 +432,125 @@ hw_ubsec.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
hw_ubsec.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
hw_ubsec.o: ../cryptlib.h hw_ubsec.c hw_ubsec_err.c hw_ubsec_err.h
hw_ubsec.o: vendor_defns/hw_ubsec.h
-tb_cipher.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-tb_cipher.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
-tb_cipher.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-tb_cipher.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
-tb_cipher.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-tb_cipher.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
+tb_cipher.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
+tb_cipher.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
+tb_cipher.o: ../../include/openssl/bn.h ../../include/openssl/cast.h
+tb_cipher.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
+tb_cipher.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
+tb_cipher.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
+tb_cipher.o: ../../include/openssl/engine.h ../../include/openssl/err.h
+tb_cipher.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
+tb_cipher.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
+tb_cipher.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
+tb_cipher.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
tb_cipher.o: ../../include/openssl/objects.h
tb_cipher.o: ../../include/openssl/opensslconf.h
tb_cipher.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
-tb_cipher.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
-tb_cipher.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
-tb_cipher.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
+tb_cipher.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
+tb_cipher.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
+tb_cipher.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
+tb_cipher.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
+tb_cipher.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
+tb_cipher.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
tb_cipher.o: eng_int.h tb_cipher.c
-tb_dh.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-tb_dh.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
-tb_dh.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-tb_dh.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
-tb_dh.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-tb_dh.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
+tb_dh.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
+tb_dh.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
+tb_dh.o: ../../include/openssl/bn.h ../../include/openssl/cast.h
+tb_dh.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
+tb_dh.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
+tb_dh.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
+tb_dh.o: ../../include/openssl/engine.h ../../include/openssl/err.h
+tb_dh.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
+tb_dh.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
+tb_dh.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
+tb_dh.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
tb_dh.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
tb_dh.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
-tb_dh.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
-tb_dh.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
-tb_dh.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h eng_int.h
+tb_dh.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
+tb_dh.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
+tb_dh.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
+tb_dh.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
+tb_dh.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
+tb_dh.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h eng_int.h
tb_dh.o: tb_dh.c
-tb_digest.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-tb_digest.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
-tb_digest.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-tb_digest.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
-tb_digest.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-tb_digest.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
+tb_digest.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
+tb_digest.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
+tb_digest.o: ../../include/openssl/bn.h ../../include/openssl/cast.h
+tb_digest.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
+tb_digest.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
+tb_digest.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
+tb_digest.o: ../../include/openssl/engine.h ../../include/openssl/err.h
+tb_digest.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
+tb_digest.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
+tb_digest.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
+tb_digest.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
tb_digest.o: ../../include/openssl/objects.h
tb_digest.o: ../../include/openssl/opensslconf.h
tb_digest.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
-tb_digest.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
-tb_digest.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
-tb_digest.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
+tb_digest.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
+tb_digest.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
+tb_digest.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
+tb_digest.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
+tb_digest.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
+tb_digest.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
tb_digest.o: eng_int.h tb_digest.c
-tb_dsa.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-tb_dsa.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
-tb_dsa.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-tb_dsa.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
-tb_dsa.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-tb_dsa.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
+tb_dsa.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
+tb_dsa.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
+tb_dsa.o: ../../include/openssl/bn.h ../../include/openssl/cast.h
+tb_dsa.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
+tb_dsa.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
+tb_dsa.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
+tb_dsa.o: ../../include/openssl/engine.h ../../include/openssl/err.h
+tb_dsa.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
+tb_dsa.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
+tb_dsa.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
+tb_dsa.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
tb_dsa.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
tb_dsa.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
-tb_dsa.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
-tb_dsa.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
-tb_dsa.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h eng_int.h
-tb_dsa.o: tb_dsa.c
-tb_rand.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-tb_rand.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
-tb_rand.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-tb_rand.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
-tb_rand.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-tb_rand.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
+tb_dsa.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
+tb_dsa.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
+tb_dsa.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
+tb_dsa.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
+tb_dsa.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
+tb_dsa.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
+tb_dsa.o: eng_int.h tb_dsa.c
+tb_rand.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
+tb_rand.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
+tb_rand.o: ../../include/openssl/bn.h ../../include/openssl/cast.h
+tb_rand.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
+tb_rand.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
+tb_rand.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
+tb_rand.o: ../../include/openssl/engine.h ../../include/openssl/err.h
+tb_rand.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
+tb_rand.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
+tb_rand.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
+tb_rand.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
tb_rand.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
tb_rand.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
-tb_rand.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
-tb_rand.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
-tb_rand.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
+tb_rand.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
+tb_rand.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
+tb_rand.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
+tb_rand.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
+tb_rand.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
+tb_rand.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
tb_rand.o: eng_int.h tb_rand.c
-tb_rsa.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-tb_rsa.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
-tb_rsa.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-tb_rsa.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
-tb_rsa.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-tb_rsa.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
+tb_rsa.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
+tb_rsa.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
+tb_rsa.o: ../../include/openssl/bn.h ../../include/openssl/cast.h
+tb_rsa.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
+tb_rsa.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
+tb_rsa.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
+tb_rsa.o: ../../include/openssl/engine.h ../../include/openssl/err.h
+tb_rsa.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
+tb_rsa.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
+tb_rsa.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
+tb_rsa.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
tb_rsa.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
tb_rsa.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
-tb_rsa.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
-tb_rsa.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
-tb_rsa.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h eng_int.h
-tb_rsa.o: tb_rsa.c
+tb_rsa.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
+tb_rsa.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
+tb_rsa.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
+tb_rsa.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
+tb_rsa.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
+tb_rsa.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
+tb_rsa.o: eng_int.h tb_rsa.c
diff --git a/lib/libssl/src/crypto/engine/eng_fat.c b/lib/libssl/src/crypto/engine/eng_fat.c
index d49aa7ed408..f7edb5ad32f 100644
--- a/lib/libssl/src/crypto/engine/eng_fat.c
+++ b/lib/libssl/src/crypto/engine/eng_fat.c
@@ -84,7 +84,7 @@ int ENGINE_set_default(ENGINE *e, unsigned int flags)
/* Set default algorithms using a string */
-int int_def_cb(const char *alg, int len, void *arg)
+static int int_def_cb(const char *alg, int len, void *arg)
{
unsigned int *pflags = arg;
if (!strncmp(alg, "ALL", len))
diff --git a/lib/libssl/src/crypto/engine/hw_4758_cca.c b/lib/libssl/src/crypto/engine/hw_4758_cca.c
index 0ca2f920dc3..f404b1a3b8f 100644
--- a/lib/libssl/src/crypto/engine/hw_4758_cca.c
+++ b/lib/libssl/src/crypto/engine/hw_4758_cca.c
@@ -124,8 +124,24 @@ static F_RANDOMNUMBERGENERATE randomNumberGenerate;
/* static variables */
/*------------------*/
-static const char def_CCA4758_LIB_NAME[] = CCA_LIB_NAME;
-static const char *CCA4758_LIB_NAME = def_CCA4758_LIB_NAME;
+static const char *CCA4758_LIB_NAME = NULL;
+static const char *get_CCA4758_LIB_NAME(void)
+ {
+ if(CCA4758_LIB_NAME)
+ return CCA4758_LIB_NAME;
+ return CCA_LIB_NAME;
+ }
+static void free_CCA4758_LIB_NAME(void)
+ {
+ if(CCA4758_LIB_NAME)
+ OPENSSL_free((void*)CCA4758_LIB_NAME);
+ CCA4758_LIB_NAME = NULL;
+ }
+static long set_CCA4758_LIB_NAME(const char *name)
+ {
+ free_CCA4758_LIB_NAME();
+ return (((CCA4758_LIB_NAME = BUF_strdup(name)) != NULL) ? 1 : 0);
+ }
#ifndef OPENSSL_NO_RSA
static const char* n_keyRecordRead = CSNDKRR;
static const char* n_digitalSignatureGenerate = CSNDDSG;
@@ -232,6 +248,7 @@ void ENGINE_load_4758cca(void)
static int ibm_4758_cca_destroy(ENGINE *e)
{
ERR_unload_CCA4758_strings();
+ free_CCA4758_LIB_NAME();
return 1;
}
@@ -243,7 +260,7 @@ static int ibm_4758_cca_init(ENGINE *e)
goto err;
}
- dso = DSO_load(NULL, CCA4758_LIB_NAME , NULL, 0);
+ dso = DSO_load(NULL, get_CCA4758_LIB_NAME(), NULL, 0);
if(!dso)
{
CCA4758err(CCA4758_F_IBM_4758_CCA_INIT,CCA4758_R_DSO_FAILURE);
@@ -299,7 +316,8 @@ err:
static int ibm_4758_cca_finish(ENGINE *e)
{
- if(dso)
+ free_CCA4758_LIB_NAME();
+ if(!dso)
{
CCA4758err(CCA4758_F_IBM_4758_CCA_FINISH,
CCA4758_R_NOT_LOADED);
@@ -340,8 +358,7 @@ static int ibm_4758_cca_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)())
CCA4758_R_ALREADY_LOADED);
return 0;
}
- CCA4758_LIB_NAME = (const char *)p;
- return 1;
+ return set_CCA4758_LIB_NAME((const char *)p);
default:
break;
}
diff --git a/lib/libssl/src/crypto/engine/hw_atalla.c b/lib/libssl/src/crypto/engine/hw_atalla.c
index 696cfcf156f..6151c469024 100644
--- a/lib/libssl/src/crypto/engine/hw_atalla.c
+++ b/lib/libssl/src/crypto/engine/hw_atalla.c
@@ -286,8 +286,24 @@ static tfnASI_GetPerformanceStatistics *p_Atalla_GetPerformanceStatistics = NULL
* atasi.dll on win32). For the purposes of testing, I have created a symbollic
* link called "libatasi.so" so that we can use native name-translation - a
* better solution will be needed. */
-static const char def_ATALLA_LIBNAME[] = "atasi";
-static const char *ATALLA_LIBNAME = def_ATALLA_LIBNAME;
+static const char *ATALLA_LIBNAME = NULL;
+static const char *get_ATALLA_LIBNAME(void)
+ {
+ if(ATALLA_LIBNAME)
+ return ATALLA_LIBNAME;
+ return "atasi";
+ }
+static void free_ATALLA_LIBNAME(void)
+ {
+ if(ATALLA_LIBNAME)
+ OPENSSL_free((void*)ATALLA_LIBNAME);
+ ATALLA_LIBNAME = NULL;
+ }
+static long set_ATALLA_LIBNAME(const char *name)
+ {
+ free_ATALLA_LIBNAME();
+ return (((ATALLA_LIBNAME = BUF_strdup(name)) != NULL) ? 1 : 0);
+ }
static const char *ATALLA_F1 = "ASI_GetHardwareConfig";
static const char *ATALLA_F2 = "ASI_RSAPrivateKeyOpFn";
static const char *ATALLA_F3 = "ASI_GetPerformanceStatistics";
@@ -295,6 +311,7 @@ static const char *ATALLA_F3 = "ASI_GetPerformanceStatistics";
/* Destructor (complements the "ENGINE_atalla()" constructor) */
static int atalla_destroy(ENGINE *e)
{
+ free_ATALLA_LIBNAME();
/* Unload the atalla error strings so any error state including our
* functs or reasons won't lead to a segfault (they simply get displayed
* without corresponding string data because none will be found). */
@@ -324,7 +341,7 @@ static int atalla_init(ENGINE *e)
* drivers really use - for now a symbollic link needs to be
* created on the host system from libatasi.so to atasi.so on
* unix variants. */
- atalla_dso = DSO_load(NULL, ATALLA_LIBNAME, NULL, 0);
+ atalla_dso = DSO_load(NULL, get_ATALLA_LIBNAME(), NULL, 0);
if(atalla_dso == NULL)
{
ATALLAerr(ATALLA_F_ATALLA_INIT,ATALLA_R_NOT_LOADED);
@@ -364,6 +381,7 @@ err:
static int atalla_finish(ENGINE *e)
{
+ free_ATALLA_LIBNAME();
if(atalla_dso == NULL)
{
ATALLAerr(ATALLA_F_ATALLA_FINISH,ATALLA_R_NOT_LOADED);
@@ -397,8 +415,7 @@ static int atalla_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)())
ATALLAerr(ATALLA_F_ATALLA_CTRL,ATALLA_R_ALREADY_LOADED);
return 0;
}
- ATALLA_LIBNAME = (const char *)p;
- return 1;
+ return set_ATALLA_LIBNAME((const char *)p);
default:
break;
}
diff --git a/lib/libssl/src/crypto/engine/hw_cswift.c b/lib/libssl/src/crypto/engine/hw_cswift.c
index da732abce0a..f5c897bdbba 100644
--- a/lib/libssl/src/crypto/engine/hw_cswift.c
+++ b/lib/libssl/src/crypto/engine/hw_cswift.c
@@ -280,8 +280,24 @@ t_swSimpleRequest *p_CSwift_SimpleRequest = NULL;
t_swReleaseAccContext *p_CSwift_ReleaseAccContext = NULL;
/* Used in the DSO operations. */
-static const char def_CSWIFT_LIBNAME[] = "swift";
-static const char *CSWIFT_LIBNAME = def_CSWIFT_LIBNAME;
+static const char *CSWIFT_LIBNAME = NULL;
+static const char *get_CSWIFT_LIBNAME(void)
+ {
+ if(CSWIFT_LIBNAME)
+ return CSWIFT_LIBNAME;
+ return "swift";
+ }
+static void free_CSWIFT_LIBNAME(void)
+ {
+ if(CSWIFT_LIBNAME)
+ OPENSSL_free((void*)CSWIFT_LIBNAME);
+ CSWIFT_LIBNAME = NULL;
+ }
+static long set_CSWIFT_LIBNAME(const char *name)
+ {
+ free_CSWIFT_LIBNAME();
+ return (((CSWIFT_LIBNAME = BUF_strdup(name)) != NULL) ? 1 : 0);
+ }
static const char *CSWIFT_F1 = "swAcquireAccContext";
static const char *CSWIFT_F2 = "swAttachKeyParam";
static const char *CSWIFT_F3 = "swSimpleRequest";
@@ -313,6 +329,7 @@ static void release_context(SW_CONTEXT_HANDLE hac)
/* Destructor (complements the "ENGINE_cswift()" constructor) */
static int cswift_destroy(ENGINE *e)
{
+ free_CSWIFT_LIBNAME();
ERR_unload_CSWIFT_strings();
return 1;
}
@@ -332,7 +349,7 @@ static int cswift_init(ENGINE *e)
goto err;
}
/* Attempt to load libswift.so/swift.dll/whatever. */
- cswift_dso = DSO_load(NULL, CSWIFT_LIBNAME, NULL, 0);
+ cswift_dso = DSO_load(NULL, get_CSWIFT_LIBNAME(), NULL, 0);
if(cswift_dso == NULL)
{
CSWIFTerr(CSWIFT_F_CSWIFT_INIT,CSWIFT_R_NOT_LOADED);
@@ -377,6 +394,7 @@ err:
static int cswift_finish(ENGINE *e)
{
+ free_CSWIFT_LIBNAME();
if(cswift_dso == NULL)
{
CSWIFTerr(CSWIFT_F_CSWIFT_FINISH,CSWIFT_R_NOT_LOADED);
@@ -411,8 +429,7 @@ static int cswift_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)())
CSWIFTerr(CSWIFT_F_CSWIFT_CTRL,CSWIFT_R_ALREADY_LOADED);
return 0;
}
- CSWIFT_LIBNAME = (const char *)p;
- return 1;
+ return set_CSWIFT_LIBNAME((const char *)p);
default:
break;
}
diff --git a/lib/libssl/src/crypto/engine/hw_ncipher.c b/lib/libssl/src/crypto/engine/hw_ncipher.c
index 4762a54e3d7..a43d4360f2a 100644
--- a/lib/libssl/src/crypto/engine/hw_ncipher.c
+++ b/lib/libssl/src/crypto/engine/hw_ncipher.c
@@ -59,9 +59,9 @@
#include <stdio.h>
#include <string.h>
+#include "cryptlib.h"
#include <openssl/crypto.h>
#include <openssl/pem.h>
-#include "cryptlib.h"
#include <openssl/dso.h>
#include <openssl/engine.h>
#include <openssl/ui.h>
@@ -109,11 +109,13 @@ static int hwcrhk_rsa_mod_exp(BIGNUM *r, const BIGNUM *I, RSA *rsa);
static int hwcrhk_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
+#ifndef OPENSSL_NO_DH
/* DH stuff */
/* This function is alised to mod_exp (with the DH and mont dropped). */
static int hwcrhk_mod_exp_dh(const DH *dh, BIGNUM *r,
const BIGNUM *a, const BIGNUM *p,
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
+#endif
/* RAND stuff */
static int hwcrhk_rand_bytes(unsigned char *buf, int num);
@@ -422,8 +424,24 @@ static HWCryptoHook_RSAUnloadKey_t *p_hwcrhk_RSAUnloadKey = NULL;
static HWCryptoHook_ModExpCRT_t *p_hwcrhk_ModExpCRT = NULL;
/* Used in the DSO operations. */
-static const char def_HWCRHK_LIBNAME[] = "nfhwcrhk";
-static const char *HWCRHK_LIBNAME = def_HWCRHK_LIBNAME;
+static const char *HWCRHK_LIBNAME = NULL;
+static void free_HWCRHK_LIBNAME(void)
+ {
+ if(HWCRHK_LIBNAME)
+ OPENSSL_free((void*)HWCRHK_LIBNAME);
+ HWCRHK_LIBNAME = NULL;
+ }
+static const char *get_HWCRHK_LIBNAME(void)
+ {
+ if(HWCRHK_LIBNAME)
+ return HWCRHK_LIBNAME;
+ return "nfhwcrhk";
+ }
+static long set_HWCRHK_LIBNAME(const char *name)
+ {
+ free_HWCRHK_LIBNAME();
+ return (((HWCRHK_LIBNAME = BUF_strdup(name)) != NULL) ? 1 : 0);
+ }
static const char *n_hwcrhk_Init = "HWCryptoHook_Init";
static const char *n_hwcrhk_Finish = "HWCryptoHook_Finish";
static const char *n_hwcrhk_ModExp = "HWCryptoHook_ModExp";
@@ -469,6 +487,7 @@ static void release_context(HWCryptoHook_ContextHandle hac)
/* Destructor (complements the "ENGINE_ncipher()" constructor) */
static int hwcrhk_destroy(ENGINE *e)
{
+ free_HWCRHK_LIBNAME();
ERR_unload_HWCRHK_strings();
return 1;
}
@@ -494,7 +513,7 @@ static int hwcrhk_init(ENGINE *e)
goto err;
}
/* Attempt to load libnfhwcrhk.so/nfhwcrhk.dll/whatever. */
- hwcrhk_dso = DSO_load(NULL, HWCRHK_LIBNAME, NULL, 0);
+ hwcrhk_dso = DSO_load(NULL, get_HWCRHK_LIBNAME(), NULL, 0);
if(hwcrhk_dso == NULL)
{
HWCRHKerr(HWCRHK_F_HWCRHK_INIT,HWCRHK_R_DSO_FAILURE);
@@ -586,6 +605,7 @@ err:
static int hwcrhk_finish(ENGINE *e)
{
int to_return = 1;
+ free_HWCRHK_LIBNAME();
if(hwcrhk_dso == NULL)
{
HWCRHKerr(HWCRHK_F_HWCRHK_FINISH,HWCRHK_R_NOT_LOADED);
@@ -634,8 +654,7 @@ static int hwcrhk_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)())
HWCRHKerr(HWCRHK_F_HWCRHK_CTRL,ERR_R_PASSED_NULL_PARAMETER);
return 0;
}
- HWCRHK_LIBNAME = (const char *)p;
- return 1;
+ return set_HWCRHK_LIBNAME((const char *)p);
case ENGINE_CTRL_SET_LOGSTREAM:
{
BIO *bio = (BIO *)p;
@@ -1040,6 +1059,7 @@ static int hwcrhk_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
return hwcrhk_mod_exp(r, a, p, m, ctx);
}
+#ifndef OPENSSL_NO_DH
/* This function is aliased to mod_exp (with the dh and mont dropped). */
static int hwcrhk_mod_exp_dh(const DH *dh, BIGNUM *r,
const BIGNUM *a, const BIGNUM *p,
@@ -1047,6 +1067,7 @@ static int hwcrhk_mod_exp_dh(const DH *dh, BIGNUM *r,
{
return hwcrhk_mod_exp(r, a, p, m, ctx);
}
+#endif
/* Random bytes are good */
static int hwcrhk_rand_bytes(unsigned char *buf, int num)