Merge branch 'fix/incorrect_sha256_auth_digest' into 'master'

fix(esp_http_client): fix incorrect digest calculation for SHA256 auth digest

See merge request espressif/esp-idf!44827
This commit is contained in:
Aditya Patwardhan
2026-01-07 07:42:42 +05:30

View File

@@ -156,8 +156,7 @@ char *http_auth_digest(const char *username, const char *password, esp_http_auth
ESP_LOGD(TAG, "%s %s %s %s", "Digest", username, auth_data->realm, password);
if ((strcasecmp(auth_data->algorithm, "md5-sess") == 0) ||
(strcasecmp(auth_data->algorithm, "SHA256") == 0) ||
(strcasecmp(auth_data->algorithm, "SHA-256") == 0)) {
(strcasecmp(auth_data->algorithm, "SHA-256-sess") == 0)) {
if (digest_func(ha1, "%s:%s:%016llx", ha1, auth_data->nonce, auth_data->cnonce) <= 0) {
goto _digest_exit;
}