Browse Source

fix for compilation with LTC_DEBUG

Steffen Jaeckel 8 years ago
parent
commit
67ca1c0b9a
2 changed files with 4 additions and 4 deletions
  1. 2 2
      src/mac/blake2/blake2bmac_test.c
  2. 2 2
      src/mac/blake2/blake2smac_test.c

+ 2 - 2
src/mac/blake2/blake2bmac_test.c

@@ -295,13 +295,13 @@ int blake2bmac_test(void)
         blake2bmac_process(&st, (unsigned char*)inp + 14, 1);
         blake2bmac_process(&st, (unsigned char*)inp + 14, 1);
         blake2bmac_process(&st, (unsigned char*)inp + 15, ilen - 15);
         blake2bmac_process(&st, (unsigned char*)inp + 15, ilen - 15);
         blake2bmac_done(&st, out, &olen);
         blake2bmac_done(&st, out, &olen);
-        if (compare_testvector(out, olen, mac, mlen, "BLAKE2B MAC multi", i) != 0) return CRYPT_FAIL_TESTVECTOR;
+        if (compare_testvector(out, olen, mac, mlen, "BLAKE2B MAC multi", ilen) != 0) return CRYPT_FAIL_TESTVECTOR;
       }
       }
       /* process in one go */
       /* process in one go */
       blake2bmac_init(&st, olen, key, klen);
       blake2bmac_init(&st, olen, key, klen);
       blake2bmac_process(&st, (unsigned char*)inp, ilen);
       blake2bmac_process(&st, (unsigned char*)inp, ilen);
       blake2bmac_done(&st, out, &olen);
       blake2bmac_done(&st, out, &olen);
-      if (compare_testvector(out, olen, mac, mlen, "BLAKE2B MAC single", i) != 0) return CRYPT_FAIL_TESTVECTOR;
+      if (compare_testvector(out, olen, mac, mlen, "BLAKE2B MAC single", ilen) != 0) return CRYPT_FAIL_TESTVECTOR;
    }
    }
    return CRYPT_OK;
    return CRYPT_OK;
 #endif
 #endif

+ 2 - 2
src/mac/blake2/blake2smac_test.c

@@ -295,13 +295,13 @@ int blake2smac_test(void)
         blake2smac_process(&st, (unsigned char*)inp + 14, 1);
         blake2smac_process(&st, (unsigned char*)inp + 14, 1);
         blake2smac_process(&st, (unsigned char*)inp + 15, ilen - 15);
         blake2smac_process(&st, (unsigned char*)inp + 15, ilen - 15);
         blake2smac_done(&st, out, &olen);
         blake2smac_done(&st, out, &olen);
-        if (compare_testvector(out, olen, mac, mlen, "BLAKE2S MAC multi", i) != 0) return CRYPT_FAIL_TESTVECTOR;
+        if (compare_testvector(out, olen, mac, mlen, "BLAKE2S MAC multi", ilen) != 0) return CRYPT_FAIL_TESTVECTOR;
       }
       }
       /* process in one go */
       /* process in one go */
       blake2smac_init(&st, olen, key, klen);
       blake2smac_init(&st, olen, key, klen);
       blake2smac_process(&st, (unsigned char*)inp, ilen);
       blake2smac_process(&st, (unsigned char*)inp, ilen);
       blake2smac_done(&st, out, &olen);
       blake2smac_done(&st, out, &olen);
-      if (compare_testvector(out, olen, mac, mlen, "BLAKE2S MAC single", i) != 0) return CRYPT_FAIL_TESTVECTOR;
+      if (compare_testvector(out, olen, mac, mlen, "BLAKE2S MAC single", ilen) != 0) return CRYPT_FAIL_TESTVECTOR;
    }
    }
    return CRYPT_OK;
    return CRYPT_OK;
 #endif
 #endif