Fix libeay32 and UCRT DLL search

Change-Id: I440b640e43aea9f985751b393f79824d7f8c9ad9
This commit is contained in:
Alessandro Pilotti 2018-08-14 01:22:28 +03:00
parent 53a4ee450b
commit bb2e3484d6
1 changed files with 9 additions and 7 deletions

View File

@ -21,14 +21,16 @@ import sys
clib_path = ctypes.util.find_library("c")
if sys.platform == "win32":
openssl_lib_path = "libeay32.dll"
if clib_path is None:
clib_path = ctypes.util.find_library("ucrtbase")
else:
openssl_lib_path = ctypes.util.find_library("ssl")
if clib_path:
clib = ctypes.CDLL(clib_path)
else:
clib = ctypes.cdll.ucrtbase
openssl = ctypes.CDLL(openssl_lib_path)
clib = ctypes.CDLL(clib_path)
openssl = ctypes.cdll.libeay32
else:
clib = ctypes.CDLL(clib_path)
openssl_lib_path = ctypes.util.find_library("ssl")
openssl = ctypes.CDLL(openssl_lib_path)
class RSA(ctypes.Structure):