"Steve Bazyl" <[EMAIL PROTECTED]> writes:

> [1  <text/plain; iso-8859-1 (7bit)>]
> We're having a really strange problem with the openssl crypto library -- it
> keeps segfaulting down in SHA1_Update when called from an NSAPI plugin
> (running in NES 3.6).
> 
> I've tried building the library with optimizations off and all that fun
> stuff, and have run the test suite which it passes with flying colors.  I've
> also written various pieces of test code which drive the crypto lib with
> both static and dynamic linking, all works fine.  However, every time we run
> it inside NES, it crashes.
> 
> I've reduced it down to a simple piece of test code which promptly crashes
> the web server when invoked.
> 
> #include <stdio.h>
> #include <stdlib.h>
> #include <string.h>
> #include <time.h>
> #include <nsapi.h>
> 
> NSAPI_PUBLIC int openssl_test( pblock *param, Session *sn, Request *rq )
> {
>   char seed[] = "some arbitrary data to seed the random number generator";
> 
>   printf ( "seeding..." );
>   RAND_seed( seed, sizeof seed - 1); // Probably don't need the -1, but I'm
> getting paranoid :)
>   printf ( "done\n" );
>   return REQ_PROCEED;
> }
Steve,

I'd guess the problem is that Netscape already has a SHA1_Update()
function and that you're getting that called instead of the
OpenSSL SHA1_Update() function.

I don't have an NES on hand, but Navigator certainly has a SHA1_Update()
function already.

As for why it worked with SSLeay? That's puzzling, I admit. Perhaps
the function name changed or was only recently exposed to dynamic
linkage or something.

Try #defining SHA1_Update() to something else in the OpenSSL build
and see if that fixes the problem.

-Ekr



______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to