OPENSSL_thread_stop() equivalent

Matt Caswell matt at
Wed Aug 7 08:25:03 UTC 2019

On 07/08/2019 01:36, Salz, Rich via openssl-users wrote:
>>Due to this I have to remove the usage of OPENSSL_thread_stop(), want to know
> the equivalent call in OpenSSL 1.0.2s? if applicable. 
> 1.0.2 has no concept/support for threads, so you probably don’t need to do anything.

That's not entirely true. 1.0.2 does support threads, but does so through
various callback mechanisms. It also has a pseudo thread local storage concept
in the error mechanism.

In 1.0.2, instead of OPENSSL_thread_stop(), you should call:


However the conditions are slightly different in 1.0.2.

1.1.x will usually detect thread exit automatically and you don't need to call
OPENSSL_thread_stop() at all. For all the details see the OPENSSL_thread_stop()
man page:

None of the capability to automatically detect thread exit exists in 1.0.2.


More information about the openssl-users mailing list