The problem is that the engine library needs the dynamic loader library
dl.so. This is done by adding the -ldl command to the compile line. The
engine uses the dynamic loader to load the shared libraries that are written
for the hardware cards. The makefile does not take this into account and
leaves off this options. After you run configure simply modify the compile
line in the makefile in the base directory to add -ldl to the compile line
and it will work.
Hope that helps.
>From: Donald Axel <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: engine library should not replace libcrypto.a
>Date: Mon, 17 Dec 2001 00:24:39 +0100 (CET)
>
>
>Hello openssl-team!
>
>Can you help me understand what is going on? Or just do not
>let openssl-engine install itself over the normal ssl-libs?
>
>I know you warned saying that openssl-engine package is not
>stable. However source is exactly the same. How come then that
>the compilation of the ssh configure script test for openssl
>fails if I link against the libs made in openssl-engine ??
>
>Dont worry about the ssh, it is up and running now. I just wonder
>what is going on in the engine-library? It will try to install
>itself as a replacement for the "normal" libcrypto.a, you know.
>
>OBJNAME=probe_ssl
>SOURCENAME=probe_ssl.c
>
>gcc -o $OBJNAME.e -g -O2 -Wall -I/opt -L/usr/local/lib \
> -L/qf3/sources/shells/secure/ssl/openssl-engine-0.9.6b/ \
> $SOURCENAME -lz -lnsl -lutil -lcrypto -lssl
>
>/qf3/sources/shells/secure/ssl/openssl-engine-0.9.6b//libcrypto.a(dso_dlfcn.o):
>In function `dlfcn_load':
>dso_dlfcn.o(.text+0x8e): undefined reference to `dlopen'
>dso_dlfcn.o(.text+0xa4): undefined reference to `dlopen'
>dso_dlfcn.o(.text+0x10a): undefined reference to `dlclose'
>/qf3/sources/shells/secure/ssl/openssl-engine-0.9.6b//libcrypto.a(dso_dlfcn.o):
>In function `dlfcn_unload':
>dso_dlfcn.o(.text+0x1d2): undefined reference to `dlclose'
>/qf3/sources/shells/secure/ssl/openssl-engine-0.9.6b//libcrypto.a(dso_dlfcn.o):
>In function `dlfcn_bind_var':
>dso_dlfcn.o(.text+0x283): undefined reference to `dlsym'
>/qf3/sources/shells/secure/ssl/openssl-engine-0.9.6b//libcrypto.a(dso_dlfcn.o):
>In function `dlfcn_bind_func':
>dso_dlfcn.o(.text+0x353): undefined reference to `dlsym'
>collect2: ld returned 1 exit status
>
>
>Linux venus.none 2.4.12 #2 Tue Oct 16 21:54:12 CEST 2001 i686 unknown
>====================================================================
>when linking against openssl-0.9.6b/libcrypto.a I get this nice
>test program:
>-rwxr-xr-x 1 root root 128400 Dec 16 21:30 probe_ssl
>-rw-r--r-- 1 root root 224 Dec 15 23:42 probe_ssl.c
>
>probe_ssl: ELF 32-bit LSB executable, \
> Intel 80386, version 1, \
> dynamically linked (uses shared libs), not stripped
>
>probe_ssl.c: ASCII C program text (from configure - script).
>====================================================================
>/* here is the openssh configure test source for ssl library: */
>#include "confdefs.h"
>
>#include <string.h>
>#include <openssl/rand.h>
>int main(void)
>{
> char a[2048];
> memset(a, 0, sizeof(a));
> RAND_add(a, sizeof(a), sizeof(a));
> return(RAND_status() <= 0);
>}
>
>
>====================================================================
>Outputs nothing when compiled and run.
>
>
>
>====================================================================
>compile commands:
>OBJNAME=probe_ssl
>SOURCENAME=probe_ssl.c
>
># this one fails
>gcc -o $OBJNAME.e -g -O2 -Wall -I/opt -L/usr/local/lib \
> -L/qf3/sources/shells/secure/ssl/openssl-engine-0.9.6b/ \
> $SOURCENAME -lz -lnsl -lutil -lcrypto -lssl
>
># this one works so nice
>gcc -o $OBJNAME -g -O2 -Wall -I/opt -L/usr/local/lib \
> -L/qf3/sources/shells/secure/ssl/openssl-0.9.6b/ \
> $SOURCENAME -lz -lnsl -lutil -lcrypto -lssl
>
>
># CURRENTDIR=/qf3/sources/shells/secure/openssh-2.9p2
>
># ls /qf3/sources/shells/secure/ssl/openssl-engine-0.9.6b/lib*.a
># /qf3/sources/shells/secure/ssl/openssl-engine-0.9.6b/libRSAglue.a
># /qf3/sources/shells/secure/ssl/openssl-engine-0.9.6b/libcrypto.a
># /qf3/sources/shells/secure/ssl/openssl-engine-0.9.6b/libssl.a
>
>
>
># --- *** --- Donald Axel - Saxenkolvej 20, DK-3210 Vejby Denmark
># --- *** --- [EMAIL PROTECTED]
>______________________________________________________________________
>OpenSSL Project http://www.openssl.org
>Development Mailing List [EMAIL PROTECTED]
>Automated List Manager [EMAIL PROTECTED]
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]