]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* modules/aaa/mod_auth_digest.c (set_algorithm): Note that
authorJoe Orton <jorton@apache.org>
Mon, 6 Jul 2026 12:51:01 +0000 (12:51 +0000)
committerJoe Orton <jorton@apache.org>
Mon, 6 Jul 2026 12:51:01 +0000 (12:51 +0000)
  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

modules/aaa/mod_auth_digest.c

index 320919331eb25cbeb27752d059d5b58b7b7fbecd..61f3b7f02cb4e805a7dfd8b21b4df590726ce00d 100644 (file)
@@ -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;
 }