Enable DSO support in OpenSSL.
authorPeter Avalos <pavalos@dragonflybsd.org>
Sun, 10 Oct 2010 23:28:01 +0000 (13:28 -1000)
committerPeter Avalos <pavalos@dragonflybsd.org>
Mon, 11 Oct 2010 21:12:27 +0000 (11:12 -1000)
OpenSSL can now load engines at run-time.  We install a few in
/usr/lib/engines/ by default.

18 files changed:
etc/mtree/BSD.usr.dist
secure/lib/libcrypto/Makefile
secure/lib/libcrypto/Makefile.inc
secure/lib/libcrypto/engines/Makefile [new file with mode: 0644]
secure/lib/libcrypto/engines/Makefile.inc [new file with mode: 0644]
secure/lib/libcrypto/engines/lib4758cca/Makefile [new file with mode: 0644]
secure/lib/libcrypto/engines/libaep/Makefile [new file with mode: 0644]
secure/lib/libcrypto/engines/libatalla/Makefile [new file with mode: 0644]
secure/lib/libcrypto/engines/libcapi/Makefile [new file with mode: 0644]
secure/lib/libcrypto/engines/libchil/Makefile [new file with mode: 0644]
secure/lib/libcrypto/engines/libcswift/Makefile [new file with mode: 0644]
secure/lib/libcrypto/engines/libgmp/Makefile [new file with mode: 0644]
secure/lib/libcrypto/engines/libgost/Makefile [new file with mode: 0644]
secure/lib/libcrypto/engines/libnuron/Makefile [new file with mode: 0644]
secure/lib/libcrypto/engines/libpadlock/Makefile [new file with mode: 0644]
secure/lib/libcrypto/engines/libsureware/Makefile [new file with mode: 0644]
secure/lib/libcrypto/engines/libubsec/Makefile [new file with mode: 0644]
share/man/man7/hier.7

index 9dfc3b6..e947165 100644 (file)
@@ -16,6 +16,8 @@
     lib
         debug
         ..
+        engines
+        ..
         gcc41
             debug
             ..
index 9bf79fb..8e2be1b 100644 (file)
@@ -6,6 +6,8 @@ SHLIB_MAJOR=    5
 
 NOLINT=                true
 
+SUBDIR=        engines
+
 .if exists(Makefile.man)
 .include "Makefile.man"
 .endif
@@ -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
@@ -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
index 6bd0f0b..8811777 100644 (file)
@@ -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}
 
diff --git a/secure/lib/libcrypto/engines/Makefile b/secure/lib/libcrypto/engines/Makefile
new file mode 100644 (file)
index 0000000..14d92d7
--- /dev/null
@@ -0,0 +1,14 @@
+SUBDIR=        lib4758cca \
+       libaep \
+       libatalla \
+       libcapi \
+       libchil \
+       libcswift \
+       libgost \
+       libgmp \
+       libnuron \
+       libpadlock \
+       libsureware \
+       libubsec
+
+.include <bsd.subdir.mk>
diff --git a/secure/lib/libcrypto/engines/Makefile.inc b/secure/lib/libcrypto/engines/Makefile.inc
new file mode 100644 (file)
index 0000000..cae56ec
--- /dev/null
@@ -0,0 +1,4 @@
+LCRYPTO_SRC=   ${.CURDIR}/../../../../../crypto/openssl
+SHLIBDIR?=     /usr/lib/engines
+
+.PATH: ${LCRYPTO_SRC}/engines
diff --git a/secure/lib/libcrypto/engines/lib4758cca/Makefile b/secure/lib/libcrypto/engines/lib4758cca/Makefile
new file mode 100644 (file)
index 0000000..1d30db6
--- /dev/null
@@ -0,0 +1,4 @@
+SHLIB_NAME=    lib4758cca.so
+SRCS=  e_4758cca.c
+
+.include <bsd.lib.mk>
diff --git a/secure/lib/libcrypto/engines/libaep/Makefile b/secure/lib/libcrypto/engines/libaep/Makefile
new file mode 100644 (file)
index 0000000..25679f5
--- /dev/null
@@ -0,0 +1,4 @@
+SHLIB_NAME=    libaep.so
+SRCS=  e_aep.c
+
+.include <bsd.lib.mk>
diff --git a/secure/lib/libcrypto/engines/libatalla/Makefile b/secure/lib/libcrypto/engines/libatalla/Makefile
new file mode 100644 (file)
index 0000000..c7ee704
--- /dev/null
@@ -0,0 +1,4 @@
+SHLIB_NAME=    libatalla.so
+SRCS=  e_atalla.c
+
+.include <bsd.lib.mk>
diff --git a/secure/lib/libcrypto/engines/libcapi/Makefile b/secure/lib/libcrypto/engines/libcapi/Makefile
new file mode 100644 (file)
index 0000000..6615cd9
--- /dev/null
@@ -0,0 +1,4 @@
+SHLIB_NAME=    libcapi.so
+SRCS=  e_capi.c
+
+.include <bsd.lib.mk>
diff --git a/secure/lib/libcrypto/engines/libchil/Makefile b/secure/lib/libcrypto/engines/libchil/Makefile
new file mode 100644 (file)
index 0000000..01afd7f
--- /dev/null
@@ -0,0 +1,4 @@
+SHLIB_NAME=    libchil.so
+SRCS=  e_chil.c
+
+.include <bsd.lib.mk>
diff --git a/secure/lib/libcrypto/engines/libcswift/Makefile b/secure/lib/libcrypto/engines/libcswift/Makefile
new file mode 100644 (file)
index 0000000..d5e6a9b
--- /dev/null
@@ -0,0 +1,4 @@
+SHLIB_NAME=    libcswift.so
+SRCS=  e_cswift.c
+
+.include <bsd.lib.mk>
diff --git a/secure/lib/libcrypto/engines/libgmp/Makefile b/secure/lib/libcrypto/engines/libgmp/Makefile
new file mode 100644 (file)
index 0000000..f91fa5f
--- /dev/null
@@ -0,0 +1,4 @@
+SHLIB_NAME=    libgmp.so
+SRCS=  e_gmp.c
+
+.include <bsd.lib.mk>
diff --git a/secure/lib/libcrypto/engines/libgost/Makefile b/secure/lib/libcrypto/engines/libgost/Makefile
new file mode 100644 (file)
index 0000000..9bf9470
--- /dev/null
@@ -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
diff --git a/secure/lib/libcrypto/engines/libnuron/Makefile b/secure/lib/libcrypto/engines/libnuron/Makefile
new file mode 100644 (file)
index 0000000..f3ef883
--- /dev/null
@@ -0,0 +1,4 @@
+SHLIB_NAME=    libnuron.so
+SRCS=  e_nuron.c
+
+.include <bsd.lib.mk>
diff --git a/secure/lib/libcrypto/engines/libpadlock/Makefile b/secure/lib/libcrypto/engines/libpadlock/Makefile
new file mode 100644 (file)
index 0000000..6ba5582
--- /dev/null
@@ -0,0 +1,4 @@
+SHLIB_NAME=    libpadlock.so
+SRCS=  e_padlock.c
+
+.include <bsd.lib.mk>
diff --git a/secure/lib/libcrypto/engines/libsureware/Makefile b/secure/lib/libcrypto/engines/libsureware/Makefile
new file mode 100644 (file)
index 0000000..03a714e
--- /dev/null
@@ -0,0 +1,4 @@
+SHLIB_NAME=    libsureware.so
+SRCS=  e_sureware.c
+
+.include <bsd.lib.mk>
diff --git a/secure/lib/libcrypto/engines/libubsec/Makefile b/secure/lib/libcrypto/engines/libubsec/Makefile
new file mode 100644 (file)
index 0000000..1316db3
--- /dev/null
@@ -0,0 +1,4 @@
+SHLIB_NAME=    libubsec.so
+SRCS=  e_ubsec.c
+
+.include <bsd.lib.mk>
index a2c0ea4..4d8bf6a 100644 (file)
@@ -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/