svn commit: r1935946 - httpd/httpd/trunk/modules/aaa

[email protected] Mon, 06 Jul 2026 12:51:01 -0000
Newsgroups gmane.comp.apache.cvs
Message-ID <178334226162.444272.17828159552336637618@svn03-he-fi>
Author: jorton
Date: Mon Jul  6 12:51:01 2026
New Revision: 1935946

Log:
* 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

Modified:
   httpd/httpd/trunk/modules/aaa/mod_auth_digest.c

Modified: httpd/httpd/trunk/modules/aaa/mod_auth_digest.c
==============================================================================
--- httpd/httpd/trunk/modules/aaa/mod_auth_digest.c	Mon Jul  6 12:50:48 2026	(r1935945)
+++ httpd/httpd/trunk/modules/aaa/mod_auth_digest.c	Mon Jul  6 12:51:01 2026	(r1935946)
@@ -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_parm
 
 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;
 }