2025-06-22 Niels Möller <nisse@lysator.liu.se>
+ * testsuite/testutils.c (test_mac): Print name of mac algorithm on
+ failure.
+
* gosthash94.c (gosthash94_init): Trim memset call, no need to
clear block buffer.
* md2.c (md2_init): Likewise.
if (!MEMEQ (digest->length, digest->data, hash))
{
- fprintf (stderr, "test_mac failed, msg: ");
+ fprintf (stderr, "test_mac %s failed, msg: ", mac->name);
print_hex (msg->length, msg->data);
fprintf(stderr, "Output:");
print_hex (mac->digest_size, hash);
mac->digest (ctx, hash);
if (!MEMEQ (digest->length, digest->data, hash))
{
- fprintf (stderr, "test_mac: failed on re-use, msg: ");
+ fprintf (stderr, "test_mac %s failed on re-use, msg: ", mac->name);
print_hex (msg->length, msg->data);
fprintf(stderr, "Output:");
print_hex (mac->digest_size, hash);
mac->digest (ctx, hash);
if (!MEMEQ (digest->length, digest->data, hash))
{
- fprintf (stderr, "test_mac failed on byte-by-byte, msg: ");
+ fprintf (stderr, "test_mac %s failed on byte-by-byte, msg: ", mac->name);
print_hex (msg->length, msg->data);
fprintf(stderr, "Output:");
print_hex (16, hash);