Merge "utils: Fix for OpenSSL library name change"

This commit is contained in:
Zuul
2019-12-10 11:21:59 +00:00
committed by Gerrit Code Review

View File

@@ -26,7 +26,12 @@ if sys.platform == "win32":
else:
clib = ctypes.cdll.ucrtbase
openssl = ctypes.cdll.libeay32
# Note(mbivolan): The library name has changed in OpenSSL 1.1.0
# Keeping the old name for backward compatibility
try:
openssl = ctypes.cdll.libeay32
except Exception:
openssl = ctypes.cdll.libcrypto
else:
clib = ctypes.CDLL(clib_path)
openssl_lib_path = ctypes.util.find_library("ssl")