Latest idea to force usage of custom engine

Frederick Gotham cauldwell.thomas at gmail.com
Thu Nov 7 09:44:18 UTC 2019


Frederick wrote:
>      
>      CRYPTO_THREAD_write_lock(rand_meth_lock);
>      CRYPTO_THREAD_write_lock(rand_engine_lock);


This is what's causing the segfault in libpthread.so

I can only imagine that the same thread is trying to re-lock a single-lock 
mutex. So my code should be something like:


int already_locked_meth = is_already_locked(rand_meth_lock);
int already_locked_engine = is_already_locked(rand_engine_lock);

if (!already_locked_meth)
    	CRYPTO_THREAD_write_lock(rand_meth_lock);    	

if (!already_locked_engine)
    	CRYPTO_THREAD_write_lock(rand_engine_lock);


/* DO STUFF */

if (!already_locked_meth)
    	CRYPTO_THREAD_unlock(rand_meth_lock);    	

if (!already_locked_engine)
    	CRYPTO_THREAD_unlock(rand_engine_lock);







More information about the openssl-users mailing list