Merge pull request #1916 from rllola/ld-library-path-openssl
Ld library path openssl
This commit is contained in:
commit
1ad44ace0a
1 changed files with 8 additions and 0 deletions
|
@ -32,6 +32,14 @@ def getLibraryPath():
|
||||||
except Exception, err:
|
except Exception, err:
|
||||||
logging.debug("OpenSSL lib not found in: %s (%s)" % (lib_dir, err))
|
logging.debug("OpenSSL lib not found in: %s (%s)" % (lib_dir, err))
|
||||||
|
|
||||||
|
if "LD_LIBRARY_PATH" in os.environ:
|
||||||
|
lib_dir_paths = os.environ["LD_LIBRARY_PATH"].split(":")
|
||||||
|
for path in lib_dir_paths:
|
||||||
|
try:
|
||||||
|
return [lib for lib in os.listdir(path) if "libcrypto.so.1.0" in lib][0]
|
||||||
|
except Exception, err:
|
||||||
|
logging.debug("OpenSSL lib not found in: %s (%s)" % (path, err))
|
||||||
|
|
||||||
return (
|
return (
|
||||||
ctypes.util.find_library('ssl.so.1.0') or ctypes.util.find_library('ssl') or
|
ctypes.util.find_library('ssl.so.1.0') or ctypes.util.find_library('ssl') or
|
||||||
ctypes.util.find_library('crypto') or ctypes.util.find_library('libcrypto') or 'libeay32'
|
ctypes.util.find_library('crypto') or ctypes.util.find_library('libcrypto') or 'libeay32'
|
||||||
|
|
Loading…
Reference in a new issue