NSS Apache Module

2003-07-29 Thread Shawn Carnell
Has anyone else tried to build an apache module that uses NSS?  I have.
It's not going so well.
Though i can get the module to load, its logging behavior is suspect
(only the timestamp and other prefix information are output; apache
seems oblivious to the value of arguments to ap_log_error).  I think
this bespeaks of more sinister problems afoot.   NSS requires about a
dozen other shared objects.  I think i'm now seeing apache dump core
based on a misplaced shared object but i'm having trouble determining
the exact cause.
I've spent lots of time looking at truss output.  I haven't had much
luck running apache in gdb (http://httpd.apache.org/dev/debugging.html);
if you've done done this before, i'd really appreciate a moment of your
time just to get a few pointers.  Oh, i'm developing on Solaris.
Thanks!
Shawn



Re: NSS Apache Module

2003-07-29 Thread Julien Pierre
Shawn,

Shawn Carnell wrote:
Has anyone else tried to build an apache module that uses NSS?  I have.
It's not going so well.
For what purpose are you trying to use NSS ?
Are you trying to implement the SSL front-end of Apache with NSS (ie. an 
alternative to the old mod_ssl) ?

And what version of Apache are you writing the module to ? Is it the 
non-threaded 1.x or the threaded 2.0x ?
Though i can get the module to load, its logging behavior is suspect
(only the timestamp and other prefix information are output; apache
seems oblivious to the value of arguments to ap_log_error).  I think
this bespeaks of more sinister problems afoot.   NSS requires about a
dozen other shared objects.  I think i'm now seeing apache dump core
based on a misplaced shared object but i'm having trouble determining
the exact cause.
I've spent lots of time looking at truss output.  I haven't had much
luck running apache in gdb (http://httpd.apache.org/dev/debugging.html);
if you've done done this before, i'd really appreciate a moment of your
time just to get a few pointers.  Oh, i'm developing on Solaris.
Traditionally, on Solaris, we have been using the Sun compiler to build 
NSS. While NSS may build with GCC, we never did that inside Netscape.
If you have access to the Sun C compiler, it would be a good idea to 
compile NSS with it.

The dbx debugger is also better than gdb, if you have access to it.

I'm not familiar with the logging in Apache. I have written NSAPI 
modules for the Netscape server products which used NSS, and this was 
not a problem.

One thing that you may be running into is symbol conflict.
Use the nm command on all the .so files from apache and NSS and see if 
there are any conflicting symbols. If so, they will need to be renamed.