creds: add sasl service name

The SASL service name, used in authentication, is part of curl's credentials
when authenticating to a server/proxy. Make it part of `struct Curl_creds`.

Change code to use `creds` to obtain a service name. By tying creds used
to the connection, connection reuse is also only allowed when the service
name matches.

Closes #21585
This commit is contained in:
Stefan Eissing 2026-05-13 12:02:48 +02:00 committed by Daniel Stenberg
parent b2476a0712
commit 5e99b73cf4
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
24 changed files with 98 additions and 79 deletions

View file

@ -1079,7 +1079,7 @@ process_state:
case SOCKS5_ST_GSSAPI_INIT: {
#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
/* GSSAPI stuff done non-blocking */
CURLcode result = Curl_SOCKS5_gssapi_negotiate(cf, data);
CURLcode result = Curl_SOCKS5_gssapi_negotiate(cf, data, sx->creds);
if(result) {
failf(data, "Unable to negotiate SOCKS5 GSS-API context.");
return CURLPX_GSSAPI;