[openssl-users] Openssl static build linked in DLL does not unload on win32
Dan Heinz
dheinz at softwarekey.com
Wed Jan 4 23:11:27 UTC 2017
Using openssl 1.1.0c.
I have a test application that is a win32 console app that calls a win32 DLL which has the openssl libraries linked in statically.
The test applications uses late-binding to the DLL and calls LoadLibrary for the DLL, one test function in the DLL, and then FreeLibrary on the DLL.
The test function in the DLL does the following:
RSA *rsa = NULL;
rsa = RSA_new();
RSA_free(rsa);
OPENSSL_thread_stop();
OPENSSL_cleanup();
return 0;
When FreeLibrary is called on the DLL, dllmain in never called with any messages. A subsequent call to LoadLibrary also fails to call dllmain and when the test function is called RSA_new() fails. This leads me to believe the DLL is never freed.
I have tried building openssl with and without no-threads with the same results. My build parameters are:
perl Configure %TEMP_ARCHITECTURE% --prefix=%RootPath_ThirdParty%\%OPENSSL_VERSION% -DPURIFY -DOPENSSL_NO_COMP -D_USING_V110_SDK71_ no-shared no-threads no-asm no-idea no-mdc2 no-rc5 no-ssl3 no-zlib no-comp
What am I missing?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20170104/f1ac973d/attachment.html>
More information about the openssl-users
mailing list