commit 49afeb465cd01889b73e13027bed6c1c865478e1
parent 416f211c0ea482b59d1dda06ac6b2965cd2d3a75
Author: Christian Grothoff <grothoff@gnunet.org>
Date: Tue, 9 Dec 2025 11:58:20 +0100
fix typo causing linker issue
Diffstat:
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
@@ -7180,7 +7180,7 @@ AS_IF([test "x${enable_sha512_256}" = "xtlslib" ],
[Define to 1 if libmicrohttpd is compiled with SHA-512/256 hashing by TLS library.])
]
)
-AM_CONDITIONAL([MHD_SUPPORT_SHA512_256], [[test "x${enable_sha512_256}" = "xbuildin" || test "x${enable_sha512_256}" = "xtlslib"]])
+AM_CONDITIONAL([MHD_SUPPORT_SHA512_256], [[test "x${enable_sha512_256}" = "xbuiltin" || test "x${enable_sha512_256}" = "xtlslib"]])
AM_CONDITIONAL([MHD_SHA512_256_EXTR], [[test "x${found_sha512_256_tls}" = "xyes"]])
AM_CONDITIONAL([MHD_SHA512_256_OPENSSL], [[test "x$mhd_cv_openssl_sha512_256" = "xyes"]])
AM_CONDITIONAL([MHD_SHA512_MBEDTLS], [[test "x$mhd_cv_mbedtls_sha512" = "xyes"]])
diff --git a/src/mhd2/mhd_rng.c b/src/mhd2/mhd_rng.c
@@ -99,8 +99,9 @@ mhd_rng (size_t buf_size,
{
#if defined(MHD_SUPPORT_OPENSSL)
/* OpenSSL - RAND_bytes() */
+ mhd_assert (buf_size < INT_MAX);
if (1 == RAND_bytes ((unsigned char *) buf,
- buf_size))
+ (int) buf_size))
return true;
#endif
#if defined(MHD_SUPPORT_GNUTLS)
@@ -167,7 +168,7 @@ mhd_rng (size_t buf_size,
}
break; /* failure */
}
- offset += ret;
+ offset += (size_t) ret;
if (offset == buf_size)
return true;
}