From: Joe Orton Date: Mon, 6 Jul 2026 12:51:01 +0000 (+0000) Subject: * modules/aaa/mod_auth_digest.c (set_algorithm): Note that X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6bb2685379211df37b8296d46701396807a323f1;p=thirdparty%2Fapache%2Fhttpd.git * modules/aaa/mod_auth_digest.c (set_algorithm): Note that conf->algorithm is a constant ("MD5") so there is no point in overriding it at runtime. Simplify error case. GitHub: PR #661 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1935946 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/aaa/mod_auth_digest.c b/modules/aaa/mod_auth_digest.c index 320919331e..61f3b7f02c 100644 --- a/modules/aaa/mod_auth_digest.c +++ b/modules/aaa/mod_auth_digest.c @@ -86,7 +86,7 @@ typedef struct digest_config_struct { authn_provider_list *providers; apr_time_t nonce_lifetime; int check_nc; - const char *algorithm; + const char *algorithm; /* currently a constant (MD5). */ char *uri_list; } digest_config_rec; @@ -556,15 +556,11 @@ static const char *set_nc_check(cmd_parms *cmd, void *config, int flag) static const char *set_algorithm(cmd_parms *cmd, void *config, const char *alg) { - if (!ap_cstr_casecmp(alg, "MD5-sess")) { - return "AuthDigestAlgorithm: ERROR: algorithm `MD5-sess' " - "is not implemented"; - } - else if (ap_cstr_casecmp(alg, "MD5")) { - return apr_pstrcat(cmd->pool, "Invalid algorithm in AuthDigestAlgorithm: ", alg, NULL); + if (ap_cstr_casecmp(alg, "MD5")) { + return apr_pstrcat(cmd->pool, "Unsupported algorithm in AuthDigestAlgorithm: ", alg, NULL); } - ((digest_config_rec *) config)->algorithm = alg; + /* conf->algorithm remains the constant, "MD5". */ return NULL; }