Look for libcrypto in both /opt/tools and /opt/local on Illumos-based distros.

This commit is contained in:
C. R. Oldham 2017-05-05 09:04:35 -06:00
parent fc26fb8a05
commit a4f7aa145e

View File

@ -38,9 +38,10 @@ def _load_libcrypto():
# Solaris-like distribution that use pkgsrc have
# libraries in a non standard location.
# (SmartOS, OmniOS, OpenIndiana, ...)
lib = glob.glob(os.path.join(
'/opt/local/lib',
'libcrypto.so*'))
# This could be /opt/tools/lib (Global Zone)
# or /opt/local/lib (non-Global Zone), thus the
# two checks below
lib = glob.glob('/opt/local/lib/libcrypto.so*') + glob.glob('/opt/tools/lib/libcrypto.so*')
lib = lib[0] if len(lib) > 0 else None
if lib:
return cdll.LoadLibrary(lib)