commit 39b9f6cf6d67667aebb4d113a50796e680e83684
parent 0b9d022e8e20bdee6a8abba011763a823d7a4e97
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Sun, 14 Aug 2022 18:09:59 +0300
digestauth: warn about RFC2069 used with SHA-256
Diffstat:
1 file changed, 11 insertions(+), 0 deletions(-)
diff --git a/src/microhttpd/digestauth.c b/src/microhttpd/digestauth.c
@@ -2083,6 +2083,13 @@ digest_auth_check_all_inner (struct MHD_Connection *connection,
#endif /* HAVE_MESSAGES */
return MHD_DAUTH_WRONG_QOP;
}
+#ifdef HAVE_MESSAGES
+ if ((MHD_DIGEST_AUTH_QOP_NONE == c_qop) &&
+ (0 == (((unsigned int) c_algo) & MHD_DIGEST_BASE_ALGO_MD5)))
+ MHD_DLOG (connection->daemon,
+ _ ("RFC2069 with SHA-256 algorithm is non-standard " \
+ "extension.\n"));
+#endif /* HAVE_MESSAGES */
digest_size = digest_get_size (&da);
@@ -2921,6 +2928,10 @@ MHD_queue_auth_required_response3 (struct MHD_Connection *connection,
MHD_DLOG (connection->daemon,
_ ("The 'userhash' and 'charset' ('prefer_utf8') parameters " \
"are not compatible with RFC2069 and ignored.\n"));
+ if (0 == (((unsigned int) s_algo) & MHD_DIGEST_BASE_ALGO_MD5))
+ MHD_DLOG (connection->daemon,
+ _ ("RFC2069 with SHA-256 algorithm is non-standard " \
+ "extension.\n"));
#endif
userhash_support = 0;
prefer_utf8 = 0;