Rev667, Fix cygwin openssl loading for real
This commit is contained in:
parent
394a8b16b7
commit
35b0019be2
4 changed files with 22 additions and 26 deletions
|
@ -195,14 +195,13 @@ ssl = None
|
|||
def openLibrary():
|
||||
global ssl
|
||||
try:
|
||||
dll_paths = [
|
||||
"src/lib/opensslVerify/libeay32.dll",
|
||||
"/usr/local/ssl/lib/libcrypto.so",
|
||||
"/bin/cygcrypto-1.0.0.dll"
|
||||
]
|
||||
for dll_path in dll_paths :
|
||||
if os.path.isfile(dll_path):
|
||||
ssl = _OpenSSL(dll_path)
|
||||
if sys.platform.startswith("win"):
|
||||
dll_path = "src/lib/opensslVerify/libeay32.dll"
|
||||
elif sys.platform == "cygwin":
|
||||
dll_path = "/bin/cygcrypto-1.0.0.dll"
|
||||
else:
|
||||
dll_path = "/usr/local/ssl/lib/libcrypto.so"
|
||||
ssl = _OpenSSL(dll_path)
|
||||
assert ssl
|
||||
except Exception, err:
|
||||
ssl = _OpenSSL(ctypes.util.find_library('ssl') or ctypes.util.find_library('crypto') or ctypes.util.find_library('libcrypto') or 'libeay32')
|
||||
|
|
|
@ -431,15 +431,13 @@ class _OpenSSL:
|
|||
def openLibrary():
|
||||
global OpenSSL
|
||||
try:
|
||||
dll_paths = [
|
||||
"src/lib/opensslVerify/libeay32.dll",
|
||||
"/usr/local/ssl/lib/libcrypto.so",
|
||||
"/bin/cygcrypto-1.0.0.dll"
|
||||
]
|
||||
for dll_path in dll_paths :
|
||||
print dll_path
|
||||
if os.path.isfile(dll_path):
|
||||
ssl = _OpenSSL(dll_path)
|
||||
if sys.platform.startswith("win"):
|
||||
dll_path = "src/lib/opensslVerify/libeay32.dll"
|
||||
elif sys.platform == "cygwin":
|
||||
dll_path = "/bin/cygcrypto-1.0.0.dll"
|
||||
else:
|
||||
dll_path = "/usr/local/ssl/lib/libcrypto.so"
|
||||
ssl = _OpenSSL(dll_path)
|
||||
assert ssl
|
||||
except Exception, err:
|
||||
ssl = _OpenSSL(ctypes.util.find_library('ssl') or ctypes.util.find_library('crypto') or ctypes.util.find_library('libcrypto') or 'libeay32')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue