curl on macOS with OpenSSL and GSSAPI fails Kerberos SPNEGO requests due to channel binding · Issue #19109 · curl/curl · GitHub
Skip to content You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert curl on macOS with OpenSSL and GSSAPI fails Kerberos SPNEGO requests due to channel binding #19109 New issue Copy link New issue Copy link Closed Closed curl on macOS with OpenSSL and GSSAPI fails Kerberos SPNEGO requests due to channel binding #19109 Copy link Labels appleOS specific to an Apple operating system specific to an Apple operating system known-issue Description rsesek opened on Oct 17, 2025 Issue body actions I did this When building curl on macOS --with-openssl and --with-gssapi , requests to an corporate HTTP service that uses Kerberos SPNEGO for authentication fail.
This does not happen when built --with-secure-transport rather than OpenSSL (which macOS's built-in curl does). OpenSSL 3.5.4 was obtained via MacPorts. Running the curl command with -v printed this error message: gss_init_sec_context() failed: An unsupported mechanism was requested. unknown mech-code 0 for mech unknown. I ran a git bisect between a last-known-good curl version (8.7.1) and the version in MacPorts that stopped working (8.13.0), which identified commit 0a5ea09a910e ("spnego_gssapi: implement TLS channel bindings for openssl") as the breaking change.
The PR #13098 associated with that commit notes, "This change require krb5 >= 1.19, otherwise channel bindings won't be forwarded through SPNEGO." However, macOS does not use MIT Kerberos but rather a fork of Heimdal . And while upstream Heimdal merged a PR to support channel binding, this has not been integrated into Apple's fork. It seems that macOS GSSAPI/Kerberos does not have the needed channel binding support for SPNEGO.
A potential fix might be to condition setting the channel binding data in libcurl on the presence of the GSS_C_CHANNEL_BOUND_FLAG define in the gssapi.h header. I expected the following No response curl/libcurl version Fails on both: curl 8.10.0-DEV (aarch64-apple-darwin25.0.0) libcurl/8.10.0-DEV OpenSSL/3.5.4 zlib/1.3.1 brotli/1.1.0 zstd/1.5.7 libidn2/2.3.8 libpsl/0.21.5 nghttp2/1.67.1 Release-Date: [unreleased] Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM PSL SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd curl 8.16.0-DEV (aarch64-apple-darwin25.0.0) libcurl/8.16.0-DEV OpenSSL/3.5.4 zlib/1.3.1 brotli/1.1.0 zstd/1.5.7 libidn2/2.3.8 libpsl/0.21.5 nghttp2/1.67.1 Release-Date: [unreleased] Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp ws wss Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM PSL SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd operating system Tested on macOS 15.7.1 and 26.0.1 Darwin mactest1 25.0.0 Darwin Kernel Version 25.0.0: Wed Sep 17 21:41:50 PDT 2025; root:xnu-12377.1.9~141/RELEASE_ARM64_T6030 arm64 Activity bagder commented on Oct 17, 2025 bagder on Oct 17, 2025 Member More actions I would recommend trying the MIT Kerberos route first.
We recently dropped Heimdal support in 8be9a26 so that feels like a tougher direction now. bagder added appleOS specific to an Apple operating system specific to an Apple operating system on Oct 17, 2025 michael-o commented on Oct 18, 2025 michael-o on Oct 18, 2025 Contributor More actions I am a bit surprised and confused by the channel binding change was merged by being enabled by default. @bagder I am also suprised that Heimdal support was dropped.
That will piss off a lot of people on managed Macs which cannot install MIT Kerberos, but need the integration into the OS especially when Apple Heimdal maintains a ticket cache that may be unreadable to MIT Kerberos. I need to get a colleague with such a Mac around to test the change. Note: I use anything but Mac, so I can't tell. bagder commented on Oct 18, 2025 bagder on Oct 18, 2025 Member More actions I am a bit surprised and confused by the channel binding change was merged by being enabled by default Yet we've seen no proposed improvements about it.
I don't claim we always do things right and we need feedback and help from people with knowledge to guide us right. I am also suprised that Heimdal support was dropped I too am disappointed we had to take that route. I had higher hopes for and expectations on Heimdal. That will piss off a lot of people on managed Macs which cannot install MIT Kerberos And yet not a single such person (before you here) has A) spoken up to keep the support and more importantly B) stepped up to fix the problems.
In my view, that's how they show they don't care very much. michael-o commented on Oct 18, 2025 michael-o on Oct 18, 2025 Contributor More actions I am a bit surprised and confused by the channel binding change was merged by being enabled by default Yet we've seen no proposed improvements about it. I don't claim we always do things right and we need feedback and help from people with knowledge to guide us right. I am also suprised that Heimdal support was dropped I too am disappointed we had to take that route.
I had higher hopes for and expectations on Heimdal. That will piss off a lot of people on managed Macs which cannot install MIT Kerberos And yet not a single such person (before you here) has A) spoken up to keep the support and more importantly B) stepped up to fix the problems. In my view, that's how they show they don't care very much. That's sad and I have to agree with you. I am excited to see the fallout. I will try to test with colleagues next couple of weeks. bagder added known-issue on Oct 20, 2025 vszakats commented on Oct 20, 2025 vszakats on Oct 20, 2025 Member More actions Looking into this, I cannot confirm Apple uses Heimdal.
It rather seems they use an old MIT Kerberos version (1.7-prerelease, from 2010). The source code, that matches headers found in the latest macOS SDK, and macOS install: https://github.com/apple-oss-distributions/KerberosLibraries More info: #19166 (comment) Is there an evidence for Heimdal I missed? It makes no difference with regards to this issue, but it may avoid some confusion knowing which implementation is used by Apple, esp. since it's the one curl still intends to support.
The channel binding feature is also missing from GNU GSS, which also remains supported (though it also leaks memory: 9442dd4 #19008 ). edit: this leaves Heimdal being the default on FreeBSD (that I know of), which may cause some friction: #18932 (comment) edit 2: that said, Apple deprecated its GSS support in 2011 (in OS X Lion), and it doesn't seem to be the most prudent thing to rely on the built-in support, instead of a fresh version of it. michael-o commented on Oct 20, 2025 michael-o on Oct 20, 2025 Contributor More actions Looking into this, I cannot confirm Apple uses Heimdal.
It rather seems they use an old MIT Kerberos version (from 2010). The source code, that matches headers found in the latest macOS SDK, and macOS install: https://github.com/apple-oss-distributions/KerberosLibraries More info: #19166 (comment) Is there an evidence I missed? I makes no difference with regards to this issue, but it may avoid some confusion knowing which implementation is used by Apple, esp. since it's the one curl still intends to support.
The channel binding feature is also missing from GNU GSS, which also remains supported (though it also leaks memory). edit: this leaves Heimdal being the default on FreeBSD (that I know of), which may cause some friction: #18932 (comment) edit 2: that said, Apple deprecated its GSS support in 2011 (in OS X Lion), and it doesn't seem to be the most prudent thing to rely on the built-in support, instead of a f
The rest of this page is on the live site.