OPENSSL_thread_stop() equivalent

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

OPENSSL_thread_stop() equivalent

Dipak B
Hi,

Had to downgrade the OpenSSL used in an application from 1.1.0k to 1.0.2s.

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.

Did try the documents, change history and source code for help but could not figure out much in short time spent.

My assumption is that above call deallocates memory and other structures used by OpenSSL. Seems to be generic call to be used at end of threads.

Could anyone please explain me this call and it's replacement? Or point me in the right direction?

Thank you.

Reply | Threaded
Open this post in threaded view
|

Re: OPENSSL_thread_stop() equivalent

OpenSSL - User mailing list
  • Had to downgrade the OpenSSL used in an application from 1.1.0k to 1.0.2s.

 

That’s too bad, given 1.0.2 is going to become unsupported at year-end.  Was it because the application wasn’t ready to handle opaque structures?

 

>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.

 

 

Reply | Threaded
Open this post in threaded view
|

Re: OPENSSL_thread_stop() equivalent

Matt Caswell-2


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:

ERR_remove_thread_state()

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:

https://www.openssl.org/docs/man1.1.1/man3/OPENSSL_thread_stop.html

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

Matt