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

Fix DCE symbol name logic on macOS #348

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ def get_output(*args, **kwargs):
ENABLE_SUPPORT_DETECTION = \
(os.environ.get('GSSAPI_SUPPORT_DETECT', 'true').lower() == 'true')

wrap_iov_symbol_name = 'gss_wrap_iov'
if ENABLE_SUPPORT_DETECTION:
import ctypes.util

Expand Down Expand Up @@ -205,6 +206,9 @@ def get_output(*args, **kwargs):

GSSAPI_LIB = ctypes.CDLL(os.path.join(main_path, main_lib))

if hasattr(GSSAPI_LIB, '__ApplePrivate_gss_wrap_iov'):
wrap_iov_symbol_name = '__ApplePrivate_gss_wrap_iov'


def make_extension(name_fmt, module, **kwargs):
"""Helper method to remove the repetition in extension declarations."""
Expand Down Expand Up @@ -323,9 +327,7 @@ def gssapi_modules(lst):
extension_file('rfc5588', 'gss_store_cred'),
extension_file('rfc5801', 'gss_inquire_saslname_for_mech'),
extension_file('cred_imp_exp', 'gss_import_cred'),
extension_file('dce',
'__ApplePrivate_gss_wrap_iov' if osx_has_gss_framework
else 'gss_wrap_iov'),
extension_file('dce', wrap_iov_symbol_name),
extension_file('dce_aead', 'gss_wrap_aead'),
extension_file('iov_mic', 'gss_get_mic_iov'),
extension_file('ggf', 'gss_inquire_sec_context_by_oid'),
Expand Down