mirror of
https://github.com/curl/curl.git
synced 2026-08-24 14:03:35 +03:00
digest: Use hostname to generate spn instead of realm
In https://www.rfc-editor.org/rfc/rfc2831#section-2.1.2 digest-uri-value should be serv-type "/" host , where host is: The DNS host name or IP address for the service requested. The DNS host name must be the fully-qualified canonical name of the host. The DNS host name is the preferred form; see notes on server processing of the digest-uri. Realm may not be the host, so we must specify the host explicitly. Note this change only affects the non-SSPI digest code. The digest code used by SSPI builds already uses the hostname to generate the spn. Ref: https://github.com/curl/curl/issues/11369 Closes https://github.com/curl/curl/pull/11395
This commit is contained in:
parent
945db0d958
commit
7703ca7f86
4 changed files with 7 additions and 7 deletions
|
|
@ -420,7 +420,7 @@ CURLcode Curl_auth_create_digest_md5_message(struct Curl_easy *data,
|
|||
msnprintf(&HA1_hex[2 * i], 3, "%02x", digest[i]);
|
||||
|
||||
/* Generate our SPN */
|
||||
spn = Curl_auth_build_spn(service, realm, NULL);
|
||||
spn = Curl_auth_build_spn(service, data->conn->host.name, NULL);
|
||||
if(!spn)
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue