So, here is the deal. I've got a threaded application running. And my threads happen to use openssl calls. I've implemented thread protection as recommended by open ssl documentation. Basically pthread mutex locks. And it works. But then I bencmark my stuff by hitting it a bunch. And I get an error like:
md_rand.c:311: failed assertion `md_c[1] == md_count[1]'
The program gets an ABRT signal and exits normally according to project builder. But I can't seem to catch the signal and I don't want the app to quit.
So, I look at the openssl source code for version g I see:
for file md_rand.c line 311
#if !defined(THREADS) && !defined(WIN32)
assert(md_c[1] == md_count[1]);
#endif
I know I'm not on windows. But what about threads?
Now, I've linked in these openssl libraries in pb:
/usr/lib/libssl.dylib
/usr/lib/libcrypto.dylib
And the openssl headers are in /usr/include and my stuff links just fine. But my app uses threads and the code snippet implies that apple's build is not a thread build? I know in the Makefile for openssl there is a THREADS= flag. was this not set? I'd like to avoid having to use my own build in case Apple updates or something. Any suggestions or am I just on drugs?
