diff options
Diffstat (limited to 'src/microhttpd/digestauth.c')
-rw-r--r-- | src/microhttpd/digestauth.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/microhttpd/digestauth.c b/src/microhttpd/digestauth.c index 35dd0264..71561332 100644 --- a/src/microhttpd/digestauth.c +++ b/src/microhttpd/digestauth.c | |||
@@ -2034,6 +2034,19 @@ digest_auth_check_all_inner (struct MHD_Connection *connection, | |||
2034 | return MHD_DAUTH_WRONG_QOP; | 2034 | return MHD_DAUTH_WRONG_QOP; |
2035 | /* 'qop' valid */ | 2035 | /* 'qop' valid */ |
2036 | 2036 | ||
2037 | /* Check 'algorithm' */ | ||
2038 | if (1) | ||
2039 | { | ||
2040 | const enum MHD_DigestAuthAlgo3 r_algo = get_rq_algo (params); | ||
2041 | const enum MHD_DigestBaseAlgo p_algo = da->algo; | ||
2042 | if ( (! ((MHD_DIGEST_AUTH_ALGO3_MD5 == r_algo) && | ||
2043 | (MHD_DIGEST_BASE_ALGO_MD5 == p_algo))) && | ||
2044 | (! ((MHD_DIGEST_AUTH_ALGO3_SHA256 == r_algo) && | ||
2045 | (MHD_DIGEST_BASE_ALGO_SHA256 == p_algo))) ) | ||
2046 | return MHD_DAUTH_WRONG_ALGO; | ||
2047 | } | ||
2048 | /* 'algorithm' valid */ | ||
2049 | |||
2037 | /* ** Do basic nonce and nonce-counter checks (size, timestamp) ** */ | 2050 | /* ** Do basic nonce and nonce-counter checks (size, timestamp) ** */ |
2038 | /* Get 'nc' digital value */ | 2051 | /* Get 'nc' digital value */ |
2039 | unq_res = get_unquoted_param (¶ms->nc, tmp1, ptmp2, &tmp2_size, | 2052 | unq_res = get_unquoted_param (¶ms->nc, tmp1, ptmp2, &tmp2_size, |