janbar / openssl-cmake

Build OpenSSL with CMake on MacOS, Win32, Win64 and cross compile for Android, IOS
Other
277 stars 144 forks source link

OpenSSL Initialization Failure Due to Manually Mapped DLLs Not Recognized by GetModuleHandleExA #35

Open pinwhell opened 1 month ago

pinwhell commented 1 month ago

Say we stop using LoadLibraryA instead we emulate it, for OpenSSL modules, when we attempt to initialize OpenSSL, its failing to robustly initialize on that Context, the reason exaclty becouse of ossl_init_load_crypto_nodelete, who returns false inside Crypto Initialize routine, becouse of the fact that WinApi GetModuleHandleExA is not aware of the manually mapped modules, how to approach this problem? notice that appart from that, when redirecting to another legit module, and forcing the function to return true, everything initialize as expected and OpenSSL works as normal (Sanity Tested Extensively).