You say "it should fall back to automatically searching the default path

to load the engine shared lib (libubsec.so)".  I guess this isn't
happening.

I found the uBSec shared library in /usr/lib/engines/libubsec.so.  I
added the following
code to my test program to load it via the dynamic engine:

   Engine = ENGINE_by_id ("dynamic");
   Return = ENGINE_ctrl_cmd_string (Engine, "SO_PATH",
"/usr/lib/engines/libubsec.so", 0);
   Return = ENGINE_ctrl_cmd_string (Engine, "LOAD", NULL, 0);

All of those functions return success.  Then I call:

   Return = ENGINE_set_default (Engine, ENGINE_METHOD_ALL);

And I get an error.  The dump of errors says:

error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared
library (dso_dlfcn.c:162)   ->
filename(/home/armckinn/svn/os/tmp/usr/lib/engines/libubsec.so): 
/home/armckinn/svn/os/tmp/usr/lib/engines/libubsec.so: 
cannot open shared object file: 
No such file or directory  

error:25070067:DSO support routines:DSO_load:could not load the shared
library (dso_lib.c:244)  

error:260B6084:engine routines:DYNAMIC_LOAD:dso not found
(eng_dyn.c:450)  

error:2606A074:engine routines:ENGINE_by_id:no such engine
(eng_list.c:411)
   -> id=ubsec  

error:2506406A:DSO support routines:DLFCN_BIND_FUNC:could not bind to
the requested symbol name (dso_dlfcn.c:261)   
-> symname(ubsec_bytes_to_bits): /usr/lib/engines/libubsec.so: undefined
symbol: ubsec_bytes_to_bits  

error:2506C06A:DSO support routines:DSO_bind_func:could not bind to the
requested symbol name (dso_lib.c:294)  

error:80069067:ubsec engine:UBSEC_INIT:dso failure (e_ubsec.c:427)  

error:260B806D:engine routines:ENGINE_TABLE_REGISTER:init failed
(eng_table.c:161)

-----Original Message-----
From: Geoff Thorpe [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 25, 2005 9:25 PM
To: openssl-dev@openssl.org
Cc: Martin Del Vecchio
Subject: Re: Problem using Broadcom uBSec engine in 0.9.8

On October 25, 2005 11:06 am, Martin Del Vecchio wrote:
> I'm still looking for help with this problem.
>
> The uBSec support works in 0.9.7g with static linking.
> The uBSec support works in 0.9.7g with shared libraries.
> The uBSec support works in 0.9.8  with static linking.
> The uBSec support fails in 0.9.8  with shared libraries.

[snip]

> Here is the command line I use to build the test program:
>
> gcc -o test test.c  -I include ./libssl.a ./libcrypto.a -ldl
>
> It feels like this is such a major bug that it can't possibly be real,

> and I must be doing something wrong.

The problem is that if you do a "shared" build, the engines are built as
shared-libraries too - that is, this is now the case but wasn't under
0.9.7. Your code is calling ENGINE_load_ubsec() which doesn't exist in
libcrypto, because when you call ENGINE_by_id("ubsec") it should fall
back to automatically searching the default path to load the engine
shared lib (libubsec.so). Let me know if this isn't the case, but from
an initial glance that seems to be what you're hitting.

Cheers,
Geoff

--
Geoff Thorpe
[EMAIL PROTECTED]
http://www.geoffthorpe.net/

Self-interest and materialistic desire are parts of who we are, but not
all. To base a social and economic system on these traits is dangerously
fundamentalist.
  -- Joel Bakan

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to