Skip to content

sspi: enable channel-binding in mingw-w64 <9 builds - #22725

Closed
vszakats wants to merge 7 commits into
curl:masterfrom
vszakats:winmacro
Closed

vszakats wants to merge 7 commits into
curl:masterfrom
vszakats:winmacro

Conversation

@vszakats

@vszakats vszakats commented Aug 28, 2026

Copy link
Copy Markdown
Member

Drop SECPKG_ATTR_ENDPOINT_BINDINGS guards and declare the missing
macro and struct for mingw-w64 <9. To bring these builds on par with the
rest of supported Windows toolchains.

Follow-up to 0966233 #3321

@vszakats
vszakats marked this pull request as draft August 28, 2026 15:05
@vszakats vszakats changed the title sspi: try enabling some parts for mingw-w64 <9 [TEST] sspi: try enabling some parts for mingw-w64 <9 Aug 28, 2026
```
D:/a/curl/curl/lib/vauth/spnego_sspi.c:96:3: error: unknown type name 'SecPkgContext_Bindings'; did you mean 'SecPkgContext_Flags'?
   SecPkgContext_Bindings pkgBindings = { 0, NULL };
   ^~~~~~~~~~~~~~~~~~~~~~
   SecPkgContext_Flags
D:/a/curl/curl/lib/vauth/spnego_sspi.c:96:45: error: excess elements in scalar initializer
   SecPkgContext_Bindings pkgBindings = { 0, NULL };
                                             ^~~~
D:/a/curl/curl/lib/vauth/spnego_sspi.c:96:45: note: (near initialization for 'pkgBindings')
D:/a/curl/curl/lib/vauth/spnego_sspi.c:238:44: error: request for member 'BindingsLength' in something not a structure or union
       binding_buf->cbBuffer   = pkgBindings.BindingsLength;
                                            ^
D:/a/curl/curl/lib/vauth/spnego_sspi.c:239:44: error: request for member 'Bindings' in something not a structure or union
       binding_buf->pvBuffer   = pkgBindings.Bindings;
                                            ^
D:/a/curl/curl/lib/vauth/spnego_sspi.c:268:17: error: request for member 'Bindings' in something not a structure or union
   if(pkgBindings.Bindings)
                 ^
D:/a/curl/curl/lib/vauth/spnego_sspi.c:269:47: error: request for member 'Bindings' in something not a structure or union
     Curl_pSecFn->FreeContextBuffer(pkgBindings.Bindings);
                                               ^
```
https://github.com/curl/curl/actions/runs/33183414391/job/98890201288?pr=22725
@vszakats vszakats changed the title [TEST] sspi: try enabling some parts for mingw-w64 <9 sspi: enable SECPKG_ATTR_ENDPOINT_BINDINGS for mingw-w64 <9 Aug 28, 2026
@vszakats vszakats added authentication Windows Windows-specific labels Aug 28, 2026
@vszakats
vszakats marked this pull request as ready for review August 28, 2026 15:28
@vszakats
vszakats requested a balanced review from Copilot August 28, 2026 15:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enables SSPI channel binding with pre-v9 mingw-w64 headers by supplying missing compatibility definitions and removing obsolete guards.

Changes:

  • Adds fallback endpoint-binding SSPI declarations.
  • Enables Schannel context propagation for NTLM and SPNEGO across all Windows SSPI builds.
  • Reuses existing channel-binding query and cleanup paths.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
lib/curl_sspi.h Adds compatibility definitions for older headers.
lib/vtls/schannel.c Always exposes the Schannel context to SSPI.
lib/vauth/vauth.h Makes authentication context fields universally available with SSPI.
lib/vauth/spnego_sspi.c Enables SPNEGO endpoint bindings.
lib/vauth/ntlm_sspi.c Enables NTLM endpoint bindings.
lib/urldata.h Stores the SSL context for every Windows SSPI build.
lib/http_ntlm.c Propagates the SSL context into NTLM state.
lib/http_negotiate.c Propagates the SSL context into Negotiate state.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@vszakats vszakats changed the title sspi: enable SECPKG_ATTR_ENDPOINT_BINDINGS for mingw-w64 <9 sspi: enable channel-binding in mingw-w64 <9 builds Aug 28, 2026
Comment thread lib/curl_sspi.h Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.

@vszakats vszakats closed this in 273534c Aug 28, 2026
@vszakats
vszakats deleted the winmacro branch August 28, 2026 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants