Rev667, Fix cygwin openssl loading for real

This commit is contained in:
HelloZeroNet 2015-12-21 11:29:38 +01:00
parent 394a8b16b7
commit 35b0019be2
4 changed files with 22 additions and 26 deletions

View file

@ -8,7 +8,7 @@ class Config(object):
def __init__(self, argv): def __init__(self, argv):
self.version = "0.3.4" self.version = "0.3.4"
self.rev = 665 self.rev = 667
self.argv = argv self.argv = argv
self.action = None self.action = None
self.createParser() self.createParser()

View file

@ -195,13 +195,12 @@ ssl = None
def openLibrary(): def openLibrary():
global ssl global ssl
try: try:
dll_paths = [ if sys.platform.startswith("win"):
"src/lib/opensslVerify/libeay32.dll", dll_path = "src/lib/opensslVerify/libeay32.dll"
"/usr/local/ssl/lib/libcrypto.so", elif sys.platform == "cygwin":
"/bin/cygcrypto-1.0.0.dll" dll_path = "/bin/cygcrypto-1.0.0.dll"
] else:
for dll_path in dll_paths : dll_path = "/usr/local/ssl/lib/libcrypto.so"
if os.path.isfile(dll_path):
ssl = _OpenSSL(dll_path) ssl = _OpenSSL(dll_path)
assert ssl assert ssl
except Exception, err: except Exception, err:

View file

@ -431,14 +431,12 @@ class _OpenSSL:
def openLibrary(): def openLibrary():
global OpenSSL global OpenSSL
try: try:
dll_paths = [ if sys.platform.startswith("win"):
"src/lib/opensslVerify/libeay32.dll", dll_path = "src/lib/opensslVerify/libeay32.dll"
"/usr/local/ssl/lib/libcrypto.so", elif sys.platform == "cygwin":
"/bin/cygcrypto-1.0.0.dll" dll_path = "/bin/cygcrypto-1.0.0.dll"
] else:
for dll_path in dll_paths : dll_path = "/usr/local/ssl/lib/libcrypto.so"
print dll_path
if os.path.isfile(dll_path):
ssl = _OpenSSL(dll_path) ssl = _OpenSSL(dll_path)
assert ssl assert ssl
except Exception, err: except Exception, err:

View file

@ -11,13 +11,12 @@ def openLibrary():
import ctypes import ctypes
import ctypes.util import ctypes.util
try: try:
dll_paths = [ if sys.platform.startswith("win"):
"src/lib/opensslVerify/libeay32.dll", dll_path = "src/lib/opensslVerify/libeay32.dll"
"/usr/local/ssl/lib/libcrypto.so", elif sys.platform == "cygwin":
"/bin/cygcrypto-1.0.0.dll" dll_path = "/bin/cygcrypto-1.0.0.dll"
] else:
for dll_path in dll_paths: dll_path = "/usr/local/ssl/lib/libcrypto.so"
if os.path.isfile(dll_path):
ssl = ctypes.CDLL(dll_path, ctypes.RTLD_GLOBAL) ssl = ctypes.CDLL(dll_path, ctypes.RTLD_GLOBAL)
assert ssl assert ssl
except: except: