Re: balsa crashing when using TLS



On Mon, 16 Sep 2002 16:24:59 Brian Stafford wrote:
> On Mon 11:25, 16 September 2002 Glenn Trigg wrote:
> 
>>> Have you built the thread-safe libESMTP?  Also, is OpenSSL built in 
>>> the thread safe form?
>>> 
>>> Obvious, I know, but worth checking.
>> 
>> Not so easy to check either - I'm using the standard Debian Woody 
>> packages for both those libraries. Is there a way to tell from the 
>> library itsself?
>> 
>> A strings on the library shows symbols like pthread_mutex_lock and 
>> pthread_mutex_unlock showing. Is that a good sign?
> 
> Yes, these calls to the posix threads support are ifdefed out in the 
> non  MT safe libesmtp.
> 
>> But I don't see any symbols like these showing in the libssl library.
> 
> OpenSSL provides an API to register callback functions for mutex 
> locking/unlocking.  THe MT safe version of libESMTP provides the 
> callbacks.  I don't know if the non MT safe OpenSSL stubs these out or 
> not.  Assuming stubs are not provided you'd have an MT safe openssl.
> 
> I don't know what the MT issues are with OpenSSL.  Does anyone know if 
> its necessary to explicitly protext some OpenSSL APIs with mutexes?

I discovered after sending the last email that there are thread type 
symbols showing up in the libcrypto library, rather than libssl. I.e...

> strings /usr/lib/libcrypto.so|fgrep -i thread                      ~
CRYPTO_thread_id
thread=%lu,  thread=%lu, file=%s, line=%d, info="
gcc -fPIC -DTHREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DNO_IDEA 
-DNO_MDC2 -DNO_RC5 -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall

The last line there is handy to have compiled into the library!

Glenn



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]