ctypescrypto icon indicating copy to clipboard operation
ctypescrypto copied to clipboard

Look for libcrypto bundled with Windows python releases; provide option to use something else

Open zougloub opened this issue 4 years ago • 1 comments

This is adding:

  • a new code path for finding the libcrypto DLL that exists in Windows installations, if the previous search fails
  • a way to USE another library altogether, which helps in case the lib isn't named "crypto" / isn't in PATH

New code path tested with python 3.10b3 on Windows.

zougloub avatar Jun 26 '21 20:06 zougloub

Thanks, good idea. It seems that in the time when I've wrote this code Windows python didn't bundle version of OpenSSL library, which is new enough for my purposes. If library in recent version of python does work. it surely should be included into search list.

But it looks like on windows we are looking in the default locations only for libeay32.dll, not for libcrypto.dll. If python does ship libcrypto.dll, probably it means that there can be other windows builds of OpenSSL which use libcrypto.dll and libssl.dll instead of libeay32.dll and ssleay32.dll. May be it is better to append python installation dir to os.environ['PATH'] and search for both libeay32 and libcrypto dlls using find_library.

vbwagner avatar Jun 27 '21 14:06 vbwagner