aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/test_sha1.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/test_sha1.c')
-rw-r--r--src/microhttpd/test_sha1.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/microhttpd/test_sha1.c b/src/microhttpd/test_sha1.c
index 4426a3c7..c90f8918 100644
--- a/src/microhttpd/test_sha1.c
+++ b/src/microhttpd/test_sha1.c
@@ -249,9 +249,9 @@ check_result (const char *test_name,
249 { 249 {
250 char calc_str[SHA1_DIGEST_STRING_SIZE]; 250 char calc_str[SHA1_DIGEST_STRING_SIZE];
251 bin2hex (calculated, SHA1_DIGEST_SIZE, calc_str); 251 bin2hex (calculated, SHA1_DIGEST_SIZE, calc_str);
252 printf ( 252 printf ("PASSED: %s check %u: calculated digest %s matches " \
253 "PASSED: %s check %u: calculated digest %s matches expected digest.\n", 253 "expected digest.\n",
254 test_name, check_num, calc_str); 254 test_name, check_num, calc_str);
255 fflush (stdout); 255 fflush (stdout);
256 } 256 }
257 return failed ? 1 : 0; 257 return failed ? 1 : 0;
@@ -275,7 +275,7 @@ test1_str (void)
275 uint8_t digest[SHA1_DIGEST_SIZE]; 275 uint8_t digest[SHA1_DIGEST_SIZE];
276 276
277 MHD_SHA1_init (&ctx); 277 MHD_SHA1_init (&ctx);
278 MHD_SHA1_update (&ctx, (const uint8_t*) data_units1[i].str_l.str, 278 MHD_SHA1_update (&ctx, (const uint8_t *) data_units1[i].str_l.str,
279 data_units1[i].str_l.len); 279 data_units1[i].str_l.len);
280 MHD_SHA1_finish (&ctx, digest); 280 MHD_SHA1_finish (&ctx, digest);
281 num_failed += check_result (__FUNCTION__, i, digest, 281 num_failed += check_result (__FUNCTION__, i, digest,
@@ -321,8 +321,8 @@ test2_str (void)
321 size_t part_s = data_units1[i].str_l.len / 4; 321 size_t part_s = data_units1[i].str_l.len / 4;
322 322
323 MHD_SHA1_init (&ctx); 323 MHD_SHA1_init (&ctx);
324 MHD_SHA1_update (&ctx, (const uint8_t*) data_units1[i].str_l.str, part_s); 324 MHD_SHA1_update (&ctx, (const uint8_t *) data_units1[i].str_l.str, part_s);
325 MHD_SHA1_update (&ctx, (const uint8_t*) data_units1[i].str_l.str + part_s, 325 MHD_SHA1_update (&ctx, (const uint8_t *) data_units1[i].str_l.str + part_s,
326 data_units1[i].str_l.len - part_s); 326 data_units1[i].str_l.len - part_s);
327 MHD_SHA1_finish (&ctx, digest); 327 MHD_SHA1_finish (&ctx, digest);
328 num_failed += check_result (__FUNCTION__, i, digest, 328 num_failed += check_result (__FUNCTION__, i, digest,