Windows Timer Threads & OpenSSL_thread_stop() : Resending

Dipak B deepak.redmi2 at gmail.com
Wed Jan 31 01:38:36 UTC 2024


Dear Matt & Community members,

>From previous conversations on this group, I know that
OpenSSL_thread_stop() should be called just before a thread gets destroyed
for Windows application statically linked to OSSL.

Above call should not be called in case there is thread re-use.

I have an application which uses only libcrypto on Windows timer threads
and this application is statically linked to OpenSSL.

As per documentation, Windows timer threads originate from the default
thread pool and they do not cause DLL_Thread_Detach() notification.

Since this is thread pool, re-use of Threads is implied.

So, how does one use libcrypto with such threads?

If I call OpenSSL_thread_stop() on this window timer thread and if Windows
runs my code again on this thread later, I know that there is some
initialisation that will never happen again (As per earlier conversation)

Is calling openssl_thread_stop() on windows Timer thread using only
libcrypto (non ssl) functionality fine?

Or should one not use Windows timer threads with OSSL if application is
statically linked.

I am looking out for any  workarounds if this scenario is a problem in
first place.

Regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mta.openssl.org/pipermail/openssl-users/attachments/20240131/34105d1a/attachment.htm>


More information about the openssl-users mailing list