aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/internal.h')
-rw-r--r--src/microhttpd/internal.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h
index 3fa773a7..adb69b32 100644
--- a/src/microhttpd/internal.h
+++ b/src/microhttpd/internal.h
@@ -250,11 +250,15 @@ enum MHD_ConnectionEventLoopInfo
250/** 250/**
251 * The maximum size of MHD-generated nonce when printed with hexadecimal chars. 251 * The maximum size of MHD-generated nonce when printed with hexadecimal chars.
252 * 252 *
253 * This is equal to "(32 bytes for SHA-256 nonce plus 6 bytes for timestamp) 253 * This is equal to "(32 bytes for SHA-256 (or SHA-512/256) nonce plus 6 bytes
254 * multiplied by two hex chars per byte". 254 * for timestamp) multiplied by two hex chars per byte".
255 * Please keep it in sync with digestauth.c 255 * Please keep it in sync with digestauth.c
256 */ 256 */
257#if defined(MHD_SHA256_SUPPORT) || defined(MHD_SHA512_256_SUPPORT)
257#define MAX_DIGEST_NONCE_LENGTH ((32 + 6) * 2) 258#define MAX_DIGEST_NONCE_LENGTH ((32 + 6) * 2)
259#else /* !MHD_SHA256_SUPPORT && !MHD_SHA512_256_SUPPORT */
260#define MAX_DIGEST_NONCE_LENGTH ((16 + 6) * 2)
261#endif /* !MHD_SHA256_SUPPORT && !MHD_SHA512_256_SUPPORT */
258 262
259/** 263/**
260 * A structure representing the internal holder of the 264 * A structure representing the internal holder of the
@@ -280,7 +284,7 @@ struct MHD_NonceNc
280 uint64_t nmask; 284 uint64_t nmask;
281 285
282 /** 286 /**
283 * Nonce value: 287 * Nonce value
284 */ 288 */
285 char nonce[MAX_DIGEST_NONCE_LENGTH + 1]; 289 char nonce[MAX_DIGEST_NONCE_LENGTH + 1];
286 290