Skip to content

Commit

Permalink
Enable DSO support in OpenSSL.
Browse files Browse the repository at this point in the history
OpenSSL can now load engines at run-time.  We install a few in
/usr/lib/engines/ by default.
  • Loading branch information
Peter Avalos committed Oct 11, 2010
1 parent ebe0d36 commit 6409921
Show file tree
Hide file tree
Showing 18 changed files with 78 additions and 14 deletions.
2 changes: 2 additions & 0 deletions etc/mtree/BSD.usr.dist
Expand Up @@ -16,6 +16,8 @@
lib
debug
..
engines
..
gcc41
debug
..
Expand Down
15 changes: 2 additions & 13 deletions secure/lib/libcrypto/Makefile
Expand Up @@ -6,6 +6,8 @@ SHLIB_MAJOR= 5

NOLINT= true

SUBDIR= engines

.if exists(Makefile.man)
.include "Makefile.man"
.endif
Expand Down Expand Up @@ -134,17 +136,6 @@ SRCS+= eng_all.c eng_cnf.c eng_cryptodev.c eng_ctrl.c eng_dyn.c eng_err.c \
tb_pkmeth.c tb_rand.c tb_rsa.c tb_store.c
INCS+= eng_int.h engine.h

# engines
CFLAGS+=-DOPENSSL_NO_DYNAMIC_ENGINE # needs more hacking
SRCS+= e_4758cca.c e_aep.c e_atalla.c e_capi.c e_chil.c e_cswift.c e_gmp.c \
e_nuron.c e_padlock.c e_sureware.c e_ubsec.c

# engines/ccgost
SRCS+= e_gost_err.c gost2001.c gost2001_keyx.c gost89.c gost94_keyx.c \
gost_ameth.c gost_asn1.c gost_crypt.c gost_ctl.c gost_eng.c \
gost_keywrap.c gost_md.c gost_params.c gost_pmeth.c gost_sign.c \
gosthash.c

# err
SRCS+= err.c err_all.c err_prn.c
INCS+= err.h
Expand Down Expand Up @@ -386,7 +377,5 @@ opensslconf.h: opensslconf-${MACHINE_ARCH}.h
${LCRYPTO_SRC}/crypto/whrlpool \
${LCRYPTO_SRC}/crypto/x509 \
${LCRYPTO_SRC}/crypto/x509v3 \
${LCRYPTO_SRC}/engines \
${LCRYPTO_SRC}/engines/ccgost \
${LCRYPTO_SRC} \
${.CURDIR}/man
2 changes: 1 addition & 1 deletion secure/lib/libcrypto/Makefile.inc
Expand Up @@ -6,7 +6,7 @@ OSSLDATE= 2010-06-01
LCRYPTO_SRC= ${.CURDIR}/../../../crypto/openssl
LCRYPTO_DOC= ${LCRYPTO_SRC}/doc

CFLAGS+= -DTERMIOS -DANSI_SOURCE -DL_ENDIAN
CFLAGS+= -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DTERMIOS
CFLAGS+= -I${LCRYPTO_SRC} -I${LCRYPTO_SRC}/crypto \
-I${LCRYPTO_SRC}/crypto/engine -I${.OBJDIR}

Expand Down
14 changes: 14 additions & 0 deletions secure/lib/libcrypto/engines/Makefile
@@ -0,0 +1,14 @@
SUBDIR= lib4758cca \
libaep \
libatalla \
libcapi \
libchil \
libcswift \
libgost \
libgmp \
libnuron \
libpadlock \
libsureware \
libubsec

.include <bsd.subdir.mk>
4 changes: 4 additions & 0 deletions secure/lib/libcrypto/engines/Makefile.inc
@@ -0,0 +1,4 @@
LCRYPTO_SRC= ${.CURDIR}/../../../../../crypto/openssl
SHLIBDIR?= /usr/lib/engines

.PATH: ${LCRYPTO_SRC}/engines
4 changes: 4 additions & 0 deletions secure/lib/libcrypto/engines/lib4758cca/Makefile
@@ -0,0 +1,4 @@
SHLIB_NAME= lib4758cca.so
SRCS= e_4758cca.c

.include <bsd.lib.mk>
4 changes: 4 additions & 0 deletions secure/lib/libcrypto/engines/libaep/Makefile
@@ -0,0 +1,4 @@
SHLIB_NAME= libaep.so
SRCS= e_aep.c

.include <bsd.lib.mk>
4 changes: 4 additions & 0 deletions secure/lib/libcrypto/engines/libatalla/Makefile
@@ -0,0 +1,4 @@
SHLIB_NAME= libatalla.so
SRCS= e_atalla.c

.include <bsd.lib.mk>
4 changes: 4 additions & 0 deletions secure/lib/libcrypto/engines/libcapi/Makefile
@@ -0,0 +1,4 @@
SHLIB_NAME= libcapi.so
SRCS= e_capi.c

.include <bsd.lib.mk>
4 changes: 4 additions & 0 deletions secure/lib/libcrypto/engines/libchil/Makefile
@@ -0,0 +1,4 @@
SHLIB_NAME= libchil.so
SRCS= e_chil.c

.include <bsd.lib.mk>
4 changes: 4 additions & 0 deletions secure/lib/libcrypto/engines/libcswift/Makefile
@@ -0,0 +1,4 @@
SHLIB_NAME= libcswift.so
SRCS= e_cswift.c

.include <bsd.lib.mk>
4 changes: 4 additions & 0 deletions secure/lib/libcrypto/engines/libgmp/Makefile
@@ -0,0 +1,4 @@
SHLIB_NAME= libgmp.so
SRCS= e_gmp.c

.include <bsd.lib.mk>
9 changes: 9 additions & 0 deletions secure/lib/libcrypto/engines/libgost/Makefile
@@ -0,0 +1,9 @@
SHLIB_NAME= libgost.so
SRCS= e_gost_err.c gost2001.c gost2001_keyx.c gost89.c gost94_keyx.c \
gost_ameth.c gost_asn1.c gost_crypt.c gost_ctl.c gost_eng.c \
gost_keywrap.c gost_md.c gost_params.c gost_pmeth.c gost_sign.c \
gosthash.c

.include <bsd.lib.mk>

.PATH: ${LCRYPTO_SRC}/engines/ccgost
4 changes: 4 additions & 0 deletions secure/lib/libcrypto/engines/libnuron/Makefile
@@ -0,0 +1,4 @@
SHLIB_NAME= libnuron.so
SRCS= e_nuron.c

.include <bsd.lib.mk>
4 changes: 4 additions & 0 deletions secure/lib/libcrypto/engines/libpadlock/Makefile
@@ -0,0 +1,4 @@
SHLIB_NAME= libpadlock.so
SRCS= e_padlock.c

.include <bsd.lib.mk>
4 changes: 4 additions & 0 deletions secure/lib/libcrypto/engines/libsureware/Makefile
@@ -0,0 +1,4 @@
SHLIB_NAME= libsureware.so
SRCS= e_sureware.c

.include <bsd.lib.mk>
4 changes: 4 additions & 0 deletions secure/lib/libcrypto/engines/libubsec/Makefile
@@ -0,0 +1,4 @@
SHLIB_NAME= libubsec.so
SRCS= e_ubsec.c

.include <bsd.lib.mk>
2 changes: 2 additions & 0 deletions share/man/man7/hier.7
Expand Up @@ -297,6 +297,8 @@ shared libraries for compatibility
.It Pa aout/
a.out backward compatibility libraries
.El
.It Pa engines/
OpenSSL dynamic engines
.El
.Pp
.It Pa libdata/
Expand Down

0 comments on commit 6409921

Please sign in to comment.