Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit cf9a337

Browse files
Fix DCE symbol name logic on macOS
Only use the private Apple symbol name for the DCE extension detection when using the actual GSS.Framework target. This will allow compiling this library against a custom MIT krb5 or Heimdal library on macOS with support for the normal IOV wrapping functions. Signed-off-by: Jordan Borean <jborean93@gmail.com>
1 parent 6e0b6b1 commit cf9a337

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

‎setup.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ def get_output(*args, **kwargs):
156156
ENABLE_SUPPORT_DETECTION = \
157157
(os.environ.get('GSSAPI_SUPPORT_DETECT', 'true').lower() == 'true')
158158

159+
wrap_iov_symbol_name = 'gss_wrap_iov'
159160
if ENABLE_SUPPORT_DETECTION:
160161
import ctypes.util
161162

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

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

209+
if hasattr(GSSAPI_LIB, '__ApplePrivate_gss_wrap_iov'):
210+
wrap_iov_symbol_name = '__ApplePrivate_gss_wrap_iov'
211+
208212

209213
def make_extension(name_fmt, module, **kwargs):
210214
"""Helper method to remove the repetition in extension declarations."""
@@ -323,9 +327,7 @@ def gssapi_modules(lst):
323327
extension_file('rfc5588', 'gss_store_cred'),
324328
extension_file('rfc5801', 'gss_inquire_saslname_for_mech'),
325329
extension_file('cred_imp_exp', 'gss_import_cred'),
326-
extension_file('dce',
327-
'__ApplePrivate_gss_wrap_iov' if osx_has_gss_framework
328-
else 'gss_wrap_iov'),
330+
extension_file('dce', wrap_iov_symbol_name),
329331
extension_file('dce_aead', 'gss_wrap_aead'),
330332
extension_file('iov_mic', 'gss_get_mic_iov'),
331333
extension_file('ggf', 'gss_inquire_sec_context_by_oid'),

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /