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

@ -38,7 +38,8 @@ static bool t1304_set_creds(const char *user, const char *passwd,
{
Curl_creds_unlink(pcreds);
if(user || passwd)
return !Curl_creds_create(user, passwd, NULL, NULL, CREDS_NONE, pcreds);
return !Curl_creds_create(user, passwd, NULL, NULL, NULL, CREDS_NONE,
pcreds);
else
return TRUE;
}