mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-07-31 10:19:48 +03:00
Fix crypto imports on macOS Big Sur
This commit is contained in:
parent
e3a194acb4
commit
a2869af082
|
@ -23,11 +23,11 @@ def _find_ssl_lib():
|
||||||
# https://www.shh.sh/2020/01/04/python-abort-trap-6.html
|
# https://www.shh.sh/2020/01/04/python-abort-trap-6.html
|
||||||
if sys.platform == 'darwin':
|
if sys.platform == 'darwin':
|
||||||
release, _version_info, _machine = platform.mac_ver()
|
release, _version_info, _machine = platform.mac_ver()
|
||||||
ten, major, *minor = release.split('.')
|
ver, major, *_ = release.split('.')
|
||||||
# macOS 10.14 "mojave" is the last known major release
|
# macOS 10.14 "mojave" is the last known major release
|
||||||
# to support unversioned libssl.dylib. Anything above
|
# to support unversioned libssl.dylib. Anything above
|
||||||
# needs specific versions
|
# needs specific versions
|
||||||
if major and int(major) > 14:
|
if int(ver) > 10 or int(ver) == 10 and int(major) > 14:
|
||||||
lib = (
|
lib = (
|
||||||
ctypes.util.find_library('libssl.46') or
|
ctypes.util.find_library('libssl.46') or
|
||||||
ctypes.util.find_library('libssl.44') or
|
ctypes.util.find_library('libssl.44') or
|
||||||
|
|
Loading…
Reference in New Issue
Block a user