FIXED - CRYPTO_set_dynlock_* mystery ... (was: Engine Issue: nShield 500)

2008-11-21 Thread Max Pala
I have a single file with the code for OpenSSL and pthreads, both static and dynamic locks.. Shall we include it into OpenSSL ? void OpenSSL_pthread_init( void ); .. that would make it more usable for the average developer! :D Later, Max Sander Temme wrote: On Nov 21, 2008, at 8:

Re: CRYPTO_set_dynlock_* mystery ... (was: Engine Issue: nShield 500)

2008-11-21 Thread Max Pala
Sander Temme wrote: /opt/nfast/toolkits/openssl/openssl098e-patch.txt I found a 'openssl098-patch.txt' is that ok ? Should apply cleanly to newer versions of OpenSSL, with patch -p1. It creates a static lock for CHIL to use so it doesn't need the dynamic ones available. It did. I persona

Re: CRYPTO_set_dynlock_* mystery ... (was: Engine Issue: nShield 500)

2008-11-21 Thread Max Pala
Hi Geoff, I actually tried the same approach, I had a small test function that I call at the start of each thread that initializes, locks, unlocks and destroys the dyn locks.. and the functions are properly called. unsigned long lock, lock2 = 0; printf("About to test\n");

Re: CRYPTO_set_dynlock_* mystery ... (was: Engine Issue: nShield 500)

2008-11-21 Thread Max Pala
Hi Sander, I definitely did - now I do initialize all the static locks in OpenSSL *and* the dynamic functions. But they are never called by the chil - the assert fails and the SIGABRT is sent to my daemon forcing it to exit. For some reason it seems the dynamic locking functions do not function

Re: CRYPTO_set_dynlock_* mystery ... (was: Engine Issue: nShield 500)

2008-11-21 Thread Max Pala
Hello Przemek, thanks for the advice - I already tried to use a mutex to protect the OCSP_basic_sign(), but I wanted to avoid it as this will just use only one thread at a time. It seems that nCipher is best used with a simple fork() daemon... if it wasn't for the shared memories, still today

CRYPTO_set_dynlock_* mystery ... (was: Engine Issue: nShield 500)

2008-11-20 Thread Max Pala
to do that by using pthreads ? Ciao, Max Sander Temme wrote: On Nov 19, 2008, at 11:24 PM, Max Pala wrote: The software that I am writing is a multi-threaded OCSP responder. Please make sure you initialize the engine correctly, and set up your locking callbacks before you actually

Re: Engine Issue: nShield 500

2008-11-20 Thread Max Pala
efc in ?? () #29 0x0807eed8 in ?? () #30 0x08085558 in ?? () #31 0x0010 in ?? () #32 0x in ?? () Any Idea ??? Later, Max Sander Temme wrote: On Nov 19, 2008, at 11:24 PM, Max Pala wrote: The software that I am writing is a multi-threaded OCSP responder. Please make sure you initia

Re: Engine Issue: nShield 500

2008-11-19 Thread Max Pala
Hello Sande, The software that I am writing is a multi-threaded OCSP responder. Sander Temme wrote: What software are you running that makes he calls into OpenSSL? -- Best Regards, Massimiliano Pala --o Massim

Engine Issue: nShield 500

2008-11-19 Thread Max Pala
Hi all, I am running into some problems with the nShield 500 HSM. It seems that their ENGINE implementation is not very stable... If I run the software with more than 12 threads, I get the following error: ../setup.c:517: nfast_hwch_doneconnection: Assertion `hwctx->conndatas[r