I am using OpenSSL on Linux in a shared library environment (./config
shared).

I am trying to load support for the Broadcom uBSec engine.  Here is a
test program:

int main (int argc, char *argv[])
   {  ENGINE *Engine;

   SSL_library_init();
   SSL_load_error_strings();
   OpenSSL_add_all_algorithms();
   ENGINE_load_ubsec();

   // See if we can find the ubsec engine
   Engine = ENGINE_by_id ("ubsec");
   if (Engine)
      printf ("ENGINE_by_id() found uBSec at %p.\n", Engine);
   else
      printf ("ENGINE_by_id() did not find UBSec.\n");

   return (0);
   }

I compile and link this file (test.c) with OpenSSL 0.9.7g:

   gcc -o test test.c -I include ./libssl.so ./libcrypto.so

I run it, and it reports that it finds the uBSec engine.

I try this with OpenSSL 0.9.8 and I get a link error:

   /tmp/ccuqAevP.o(.text+0x12c): In function `main': 
   : undefined reference to `ENGINE_load_ubsec'
   collect2: ld returned 1 exit status

This symbol is in e_ubsec.c, but when I include the corresponding .o
file, I get the
same error.  That's because the symbol is not defined in e_ubsec.o,
because it is
inside a conditional:

   #ifdef OPENSSL_NO_DYNAMIC_ENGINE

This symbol is not defined, because I chose the shared-library
configuration.

How can I use the built-in uBSec engine in a shared-library environment?

Thanks.


   
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to