[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 09/15: test_digestauth2: test the new option
From: |
gnunet |
Subject: |
[libmicrohttpd] 09/15: test_digestauth2: test the new option |
Date: |
Sat, 30 Jul 2022 21:29:31 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit 0b70234172886f76f4f9ba4463400b9e8f1fae02
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Tue Jul 26 20:59:51 2022 +0300
test_digestauth2: test the new option
---
src/testcurl/test_digestauth2.c | 34 +++++++++++++++++++---------------
1 file changed, 19 insertions(+), 15 deletions(-)
diff --git a/src/testcurl/test_digestauth2.c b/src/testcurl/test_digestauth2.c
index c00dd1b1..7951546c 100644
--- a/src/testcurl/test_digestauth2.c
+++ b/src/testcurl/test_digestauth2.c
@@ -979,31 +979,35 @@ testDigestAuth (void)
{
struct MHD_Daemon *d;
uint16_t port;
- uint8_t salt[8];
struct CBC cbc;
char buf[2048];
CURL *c;
int failed = 0;
- if (! gen_good_rnd (salt, sizeof(salt)))
- {
- fprintf (stderr, "WARNING: the random buffer (used as salt value) is not "
- "initialised completely, nonce generation may be "
- "predictable in this test.\n");
- fflush (stderr);
- }
-
if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT))
port = 0;
else
port = 4210;
- d = MHD_start_daemon (MHD_USE_ERROR_LOG,
- port, NULL, NULL,
- &ahc_echo, NULL,
- MHD_OPTION_DIGEST_AUTH_RANDOM, sizeof (salt), salt,
- MHD_OPTION_NONCE_NC_SIZE, 300,
- MHD_OPTION_END);
+ if (1)
+ {
+ uint8_t salt[8]; /* Use local variable to test MHD "copy" function */
+ if (! gen_good_rnd (salt, sizeof(salt)))
+ {
+ fprintf (stderr, "WARNING: the random buffer (used as salt value) is not
"
+ "initialised completely, nonce generation may be "
+ "predictable in this test.\n");
+ fflush (stderr);
+ }
+
+ d = MHD_start_daemon (MHD_USE_ERROR_LOG,
+ port, NULL, NULL,
+ &ahc_echo, NULL,
+ MHD_OPTION_DIGEST_AUTH_RANDOM_COPY,
+ sizeof (salt), salt,
+ MHD_OPTION_NONCE_NC_SIZE, 300,
+ MHD_OPTION_END);
+ }
if (d == NULL)
return 1;
if (0 == port)
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [libmicrohttpd] 10/15: test_digestauth2: added testing of 'userdigest', (continued)
- [libmicrohttpd] 10/15: test_digestauth2: added testing of 'userdigest', gnunet, 2022/07/30
- [libmicrohttpd] 01/15: digestauth: added dynamic detection and use of the algo specified by client, gnunet, 2022/07/30
- [libmicrohttpd] 15/15: MHD_digest_auth_check3(): return failed parameter if it is known, gnunet, 2022/07/30
- [libmicrohttpd] 14/15: microhttpd.h: sorted Digest Auth functions and enums, gnunet, 2022/07/30
- [libmicrohttpd] 04/15: configure: control more parameters with 'build-type', gnunet, 2022/07/30
- [libmicrohttpd] 06/15: microhttpd: improved description for MHD_OPTION_DIGEST_AUTH_RANDOM, gnunet, 2022/07/30
- [libmicrohttpd] 08/15: daemon.c: changed fill value for unused members, gnunet, 2022/07/30
- [libmicrohttpd] 11/15: test_digestauth2: added testing of Auth v2 API, gnunet, 2022/07/30
- [libmicrohttpd] 13/15: test_digestauth2: added testing of RFC2069 mode, gnunet, 2022/07/30
- [libmicrohttpd] 12/15: digestauth: implemented support for RFC 2069, gnunet, 2022/07/30
- [libmicrohttpd] 09/15: test_digestauth2: test the new option,
gnunet <=