diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-08-14 18:09:59 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-08-15 16:21:44 +0300 |
commit | 39b9f6cf6d67667aebb4d113a50796e680e83684 (patch) | |
tree | 4ec99fd23551bf1c3751cabd7e9631e4c596e0d8 | |
parent | 0b9d022e8e20bdee6a8abba011763a823d7a4e97 (diff) | |
download | libmicrohttpd-39b9f6cf6d67667aebb4d113a50796e680e83684.tar.gz libmicrohttpd-39b9f6cf6d67667aebb4d113a50796e680e83684.zip |
digestauth: warn about RFC2069 used with SHA-256
-rw-r--r-- | src/microhttpd/digestauth.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/microhttpd/digestauth.c b/src/microhttpd/digestauth.c index f01dfc0a..3efc0288 100644 --- a/src/microhttpd/digestauth.c +++ b/src/microhttpd/digestauth.c | |||
@@ -2083,6 +2083,13 @@ digest_auth_check_all_inner (struct MHD_Connection *connection, | |||
2083 | #endif /* HAVE_MESSAGES */ | 2083 | #endif /* HAVE_MESSAGES */ |
2084 | return MHD_DAUTH_WRONG_QOP; | 2084 | return MHD_DAUTH_WRONG_QOP; |
2085 | } | 2085 | } |
2086 | #ifdef HAVE_MESSAGES | ||
2087 | if ((MHD_DIGEST_AUTH_QOP_NONE == c_qop) && | ||
2088 | (0 == (((unsigned int) c_algo) & MHD_DIGEST_BASE_ALGO_MD5))) | ||
2089 | MHD_DLOG (connection->daemon, | ||
2090 | _ ("RFC2069 with SHA-256 algorithm is non-standard " \ | ||
2091 | "extension.\n")); | ||
2092 | #endif /* HAVE_MESSAGES */ | ||
2086 | 2093 | ||
2087 | digest_size = digest_get_size (&da); | 2094 | digest_size = digest_get_size (&da); |
2088 | 2095 | ||
@@ -2921,6 +2928,10 @@ MHD_queue_auth_required_response3 (struct MHD_Connection *connection, | |||
2921 | MHD_DLOG (connection->daemon, | 2928 | MHD_DLOG (connection->daemon, |
2922 | _ ("The 'userhash' and 'charset' ('prefer_utf8') parameters " \ | 2929 | _ ("The 'userhash' and 'charset' ('prefer_utf8') parameters " \ |
2923 | "are not compatible with RFC2069 and ignored.\n")); | 2930 | "are not compatible with RFC2069 and ignored.\n")); |
2931 | if (0 == (((unsigned int) s_algo) & MHD_DIGEST_BASE_ALGO_MD5)) | ||
2932 | MHD_DLOG (connection->daemon, | ||
2933 | _ ("RFC2069 with SHA-256 algorithm is non-standard " \ | ||
2934 | "extension.\n")); | ||
2924 | #endif | 2935 | #endif |
2925 | userhash_support = 0; | 2936 | userhash_support = 0; |
2926 | prefer_utf8 = 0; | 2937 | prefer_utf8 = 0; |