Merge pull request #52842 from s0undt3ch/2019.2.1

`libcrypto.OpenSSL_version_num` might be a callable
This commit is contained in:
Gareth J. Greenaway 2019-05-06 10:00:36 -07:00 committed by GitHub
commit cc7a0d1326
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -66,7 +66,10 @@ def _init_libcrypto():
try:
# If we're greater than OpenSSL 1.1.0, no need to to the init
if libcrypto.OpenSSL_version_num < 0x10100000:
openssl_version_num = libcrypto.OpenSSL_version_num
if callable(openssl_version_num):
openssl_version_num = openssl_version_num()
if openssl_version_num < 0x10100000:
libcrypto.OPENSSL_init_crypto()
except AttributeError:
# Support for OpenSSL < 1.1 (OPENSSL_API_COMPAT < 0x10100000L)