Skip to content

Commit

Permalink
Find openssl lib in LD_LIBRARY_PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
rllola committed Mar 5, 2019
1 parent 174e8d3 commit 4e388e5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/util/SslPatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ def getLibraryPath():
except Exception, err:
logging.debug("OpenSSL lib not found in: %s (%s)" % (lib_dir, err))

if "LD_LIBRARY_PATH" in os.environ:
try:
return [lib for lib in os.listdir(os.environ["LD_LIBRARY_PATH"]) if "libcrypto.so.1.0" in lib][0]
except Exception, err:
logging.debug("OpenSSL lib not found in: %s (%s)" % (lib_dir, err))

return (
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'
Expand Down

0 comments on commit 4e388e5

Please sign in to comment.