Browse Source

Fixed some doxy for digest auth

Evgeny Grin (Karlson2k) 2 năm trước cách đây
mục cha
commit
8bd8cd0ace
2 tập tin đã thay đổi với 9 bổ sung7 xóa
  1. 4 3
      src/include/microhttpd.h
  2. 5 4
      src/microhttpd/digestauth.c

+ 4 - 3
src/include/microhttpd.h

@@ -5521,7 +5521,8 @@ enum MHD_DigestAuthResult
   MHD_DAUTH_NONCE_WRONG = -33,
 
   /**
-   * The 'response' is wrong. May indicate an attack attempt.
+   * The 'response' is wrong. Typically it means that wrong password used.
+   * May indicate an attack attempt.
    */
   MHD_DAUTH_RESPONSE_WRONG = -34
 };
@@ -5592,8 +5593,8 @@ MHD_digest_auth_check3 (struct MHD_Connection *connection,
  *                            if this function succeeds, then this buffer has
  *                            #MHD_digest_get_hash_size(algo3) bytes of
  *                            userdigest upon return
- * @param userdigest_bin the size of the @a userdigest_bin buffer, must be
- *                       at least #MHD_digest_get_hash_size(algo3) bytes long
+ * @param bin_buf_size the size of the @a userdigest_bin buffer, must be
+ *                     at least #MHD_digest_get_hash_size(algo3) bytes long
  * @return MHD_YES on success,
  *         MHD_NO if @a userdigest_bin is too small or if @a algo3 algorithm is
  *         not supported (or external error has occurred,

+ 5 - 4
src/microhttpd/digestauth.c

@@ -1923,8 +1923,8 @@ calc_userdigest (struct DigestAlgorithm *da,
  *                            if this function succeeds, then this buffer has
  *                            #MHD_digest_get_hash_size(algo3) bytes of
  *                            userdigest upon return
- * @param userdigest_bin the size of the @a userdigest_bin buffer, must be
- *                       at least #MHD_digest_get_hash_size(algo3) bytes long
+ * @param bin_buf_size the size of the @a userdigest_bin buffer, must be
+ *                     at least #MHD_digest_get_hash_size(algo3) bytes long
  * @return MHD_YES on success,
  *         MHD_NO if @a userdigest_bin is too small or if @a algo3 algorithm is
  *         not supported (or external error has occurred,
@@ -3545,8 +3545,9 @@ queue_auth_required_response3_inner (struct MHD_Connection *connection,
 #endif /* HAVE_MESSAGES */
     return MHD_NO;
   }
-  malgo3 &= (enum MHD_DigestAuthMultiQOP)
-            (~((enum MHD_DigestAuthMultiQOP) MHD_DIGEST_AUTH_ALGO3_NON_SESSION));
+  malgo3 &=
+    (enum MHD_DigestAuthMultiQOP)
+    (~((enum MHD_DigestAuthMultiQOP) MHD_DIGEST_AUTH_ALGO3_NON_SESSION));
 #ifdef MHD_MD5_SUPPORT
   if (0 != (((unsigned int) malgo3) & MHD_DIGEST_BASE_ALGO_MD5))
     s_algo = MHD_DIGEST_AUTH_ALGO3_MD5;