Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #35: Pin libcrypto and libssl dylibs only on Catalina #36

Merged
merged 2 commits into from Nov 21, 2019
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -5,7 +5,7 @@ jobs:
working_directory: ~/oscrypto
macos:
# This is the last version using macOS 10.12, which has Python 2.6
xcode: 9.2.0
xcode: 9.0.1
steps:
- restore_cache:
keys:
@@ -1,6 +1,9 @@
# coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function

import platform
import sys

import re
from ctypes.util import find_library

@@ -21,10 +24,14 @@
'version_info',
]


libcrypto_path = _backend_config().get('libcrypto_path')
if libcrypto_path is None:
libcrypto_path = find_library('crypto')
# if we are on catalina, we want to strongly version libcrypto since unversioned libcrypto has a non-stable ABI
if sys.platform == 'darwin' and platform.mac_ver()[0].startswith('10.15') and \
libcrypto_path.endswith('libcrypto.dylib'):
# libcrypto.42.dylib is in libressl-2.6 which as a OpenSSL 1.0.1-compatible API
libcrypto_path = libcrypto_path.replace('libcrypto.dylib', 'libcrypto.42.dylib')
if not libcrypto_path:
raise LibraryNotFoundError('The library libcrypto could not be found')

@@ -1,6 +1,9 @@
# coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function

import platform
import sys

from ctypes.util import find_library

from .. import _backend_config
@@ -21,6 +24,10 @@
libssl_path = _backend_config().get('libssl_path')
if libssl_path is None:
libssl_path = find_library('ssl')
# if we are on catalina, we want to strongly version libssl since unversioned libcrypto has a non-stable ABI
if sys.platform == 'darwin' and platform.mac_ver()[0].startswith('10.15') and libssl_path.endswith('libssl.dylib'):
# libssl.44.dylib is in libressl-2.6 which as a OpenSSL 1.0.1-compatible API
libssl_path = libssl_path.replace('libssl.dylib', 'libssl.44.dylib')
if not libssl_path:
raise LibraryNotFoundError('The library libssl could not be found')

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.