Also try to load OpenSSL dll from Python/DDLs directory
This commit is contained in:
parent
0bbeede975
commit
bd5c2b1daa
1 changed files with 12 additions and 7 deletions
|
@ -10,18 +10,23 @@ find_library_original = ctypes.util.find_library
|
||||||
|
|
||||||
def getOpensslPath():
|
def getOpensslPath():
|
||||||
if sys.platform.startswith("win"):
|
if sys.platform.startswith("win"):
|
||||||
lib_path = os.path.join(os.getcwd(), "tools/openssl/libeay32.dll")
|
lib_paths = [
|
||||||
|
os.path.join(os.getcwd(), "tools/openssl/libeay32.dll"),
|
||||||
|
os.path.join(os.path.dirname(sys.executable), "DLLs/libcrypto-1_1-x64.dll"),
|
||||||
|
os.path.join(os.path.dirname(sys.executable), "DLLs/libcrypto-1_1.dll")
|
||||||
|
]
|
||||||
elif sys.platform == "cygwin":
|
elif sys.platform == "cygwin":
|
||||||
lib_path = "/bin/cygcrypto-1.0.0.dll"
|
lib_paths = ["/bin/cygcrypto-1.0.0.dll"]
|
||||||
elif os.path.isfile("../lib/libcrypto.so"): # ZeroBundle OSX
|
elif os.path.isfile("../lib/libcrypto.so"): # ZeroBundle OSX
|
||||||
lib_path = "../lib/libcrypto.so"
|
lib_paths = ["../lib/libcrypto.so"]
|
||||||
elif os.path.isfile("/opt/lib/libcrypto.so.1.0.0"): # For optware and entware
|
elif os.path.isfile("/opt/lib/libcrypto.so.1.0.0"): # For optware and entware
|
||||||
lib_path = "/opt/lib/libcrypto.so.1.0.0"
|
lib_paths = ["/opt/lib/libcrypto.so.1.0.0"]
|
||||||
else:
|
else:
|
||||||
lib_path = "/usr/local/ssl/lib/libcrypto.so"
|
lib_paths = ["/usr/local/ssl/lib/libcrypto.so"]
|
||||||
|
|
||||||
if os.path.isfile(lib_path):
|
for lib_path in lib_paths:
|
||||||
return lib_path
|
if os.path.isfile(lib_path):
|
||||||
|
return lib_path
|
||||||
|
|
||||||
if "ANDROID_APP_PATH" in os.environ:
|
if "ANDROID_APP_PATH" in os.environ:
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue