config.idnode.in_class = &config_class;
config.ui_quicktips = 1;
config.http_auth = HTTP_AUTH_DIGEST;
- config.http_auth_algo = HTTP_AUTH_ALGO_SHA512_256;
+ config.http_auth_algo = HTTP_AUTH_ALGO_MD5;
config.proxy = 0;
config.realm = strdup("tvheadend");
config.info_area = strdup("login,storage,time");
if (hc->hc_nonce == NULL)
http_get_nonce(hc);
char *opaque = http_get_opaque(hc, realm);
- htsbuf_qprintf(&hdrs, "WWW-Authenticate: Digest realm=\"%s\"", realm);
+ htsbuf_qprintf(&hdrs, "WWW-Authenticate: Digest realm=\"%s\", qop=auth", realm);
if (config.http_auth_algo != HTTP_AUTH_ALGO_MD5)
htsbuf_qprintf(&hdrs, ", algorithm=%s",
config.http_auth_algo == HTTP_AUTH_ALGO_SHA256 ?
"SHA-256" : "SHA-512-256");
- htsbuf_qprintf(&hdrs, ", qop=\"auth\", nonce=\"%s\"", hc->hc_nonce);
+ htsbuf_qprintf(&hdrs, ", nonce=\"%s\"", hc->hc_nonce);
htsbuf_qprintf(&hdrs, ", opaque=\"%s\"\r\n", opaque);
free(opaque);
} else {
if ((mdctx = EVP_MD_CTX_create()) == NULL)
return NULL;
- if (EVP_DigestInit_ex(mdctx, md, NULL) != 0)
+ if (EVP_DigestInit_ex(mdctx, md, NULL) != 1)
goto __error;
- if (EVP_DigestUpdate(mdctx, str, strlen(str)) != 0)
+ if (EVP_DigestUpdate(mdctx, str, strlen(str)) != 1)
goto __error;
- if (EVP_DigestFinal_ex(mdctx, hash, NULL))
+ if (EVP_DigestFinal_ex(mdctx, hash, NULL) != 1)
goto __error;
for (i = 0; i < len; i++)
sprintf(ret + i*2, fmt, hash[i]);