more printf() clean-up
* remove last occurences in non-test code * minimize in tests
This commit is contained in:
parent
8b7edf5478
commit
24e69b2956
@ -242,8 +242,7 @@ int eax_test(void)
|
|||||||
}
|
}
|
||||||
if ((res != 1) || compare_testvector(outct, tests[x].msglen, tests[x].plaintext, tests[x].msglen, "EAX", x)) {
|
if ((res != 1) || compare_testvector(outct, tests[x].msglen, tests[x].plaintext, tests[x].msglen, "EAX", x)) {
|
||||||
#ifdef LTC_TEST_DBG
|
#ifdef LTC_TEST_DBG
|
||||||
printf("\n\nEAX: Failure-decrypt\n");
|
printf("\n\nEAX: Failure-decrypt - res = %d\n", res);
|
||||||
printf("\nres = %d\n\n", res);
|
|
||||||
#endif
|
#endif
|
||||||
return CRYPT_FAIL_TESTVECTOR;
|
return CRYPT_FAIL_TESTVECTOR;
|
||||||
}
|
}
|
||||||
|
@ -191,8 +191,7 @@ int ocb_test(void)
|
|||||||
}
|
}
|
||||||
if ((res != 1) || compare_testvector(outct, tests[x].ptlen, tests[x].pt, tests[x].ptlen, "OCB", x)) {
|
if ((res != 1) || compare_testvector(outct, tests[x].ptlen, tests[x].pt, tests[x].ptlen, "OCB", x)) {
|
||||||
#ifdef LTC_TEST_DBG
|
#ifdef LTC_TEST_DBG
|
||||||
printf("\n\nOCB: Failure-decrypt\n");
|
printf("\n\nOCB: Failure-decrypt - res = %d\n", res);
|
||||||
printf("\nres = %d\n\n", res);
|
|
||||||
#endif
|
#endif
|
||||||
return CRYPT_FAIL_TESTVECTOR;
|
return CRYPT_FAIL_TESTVECTOR;
|
||||||
}
|
}
|
||||||
|
@ -201,8 +201,7 @@ int ocb3_test(void)
|
|||||||
}
|
}
|
||||||
if ((res != 1) || compare_testvector(outct, tests[x].ptlen, tests[x].pt, tests[x].ptlen, "OCB3", x)) {
|
if ((res != 1) || compare_testvector(outct, tests[x].ptlen, tests[x].pt, tests[x].ptlen, "OCB3", x)) {
|
||||||
#ifdef LTC_TEST_DBG
|
#ifdef LTC_TEST_DBG
|
||||||
printf("\n\nOCB3: Failure-decrypt\n");
|
printf("\n\nOCB3: Failure-decrypt - res = %d\n", res);
|
||||||
printf("\nres = %d\n\n", res);
|
|
||||||
#endif
|
#endif
|
||||||
return CRYPT_FAIL_TESTVECTOR;
|
return CRYPT_FAIL_TESTVECTOR;
|
||||||
}
|
}
|
||||||
|
@ -128,18 +128,6 @@ int hkdf(int hash_idx, const unsigned char *salt, unsigned long saltlen,
|
|||||||
XFREE(extracted);
|
XFREE(extracted);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
{
|
|
||||||
int j;
|
|
||||||
printf("\nPRK: 0x");
|
|
||||||
for(j=0; j < hashsize; j++) {
|
|
||||||
printf("%02x ", extracted[j]);
|
|
||||||
}
|
|
||||||
for(j=0; j < hashsize; j++) {
|
|
||||||
printf("%02x ", extracted[j]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
err = hkdf_expand(hash_idx, info, infolen, extracted, hashsize, out, outlen);
|
err = hkdf_expand(hash_idx, info, infolen, extracted, hashsize, out, outlen);
|
||||||
zeromem(extracted, hashsize);
|
zeromem(extracted, hashsize);
|
||||||
XFREE(extracted);
|
XFREE(extracted);
|
||||||
|
@ -273,10 +273,6 @@ int hkdf_test(void)
|
|||||||
|
|
||||||
if(compare_testvector(OKM, cases[i].OKM_l, cases[i].OKM, (size_t)cases[i].OKM_l, "HKDF", cases[i].num)) {
|
if(compare_testvector(OKM, cases[i].OKM_l, cases[i].OKM, (size_t)cases[i].OKM_l, "HKDF", cases[i].num)) {
|
||||||
failed++;
|
failed++;
|
||||||
#if LTC_TEST_DBG > 1
|
|
||||||
} else {
|
|
||||||
printf("LTC_HKDF-%s test #%d: Passed\n", cases[i].Hash, cases[i].num);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -176,8 +176,7 @@ int pkcs_5_test (void)
|
|||||||
cases_5_2[i].c, hash,
|
cases_5_2[i].c, hash,
|
||||||
DK, &dkLen)) != CRYPT_OK) {
|
DK, &dkLen)) != CRYPT_OK) {
|
||||||
#ifdef LTC_TEST_DBG
|
#ifdef LTC_TEST_DBG
|
||||||
printf("\nPKCS#5_2 test #%d: Failed/1\n", i);
|
printf("\npkcs_5_alg2() #%d: Failed/1 (%s)\n", i, error_to_string(err));
|
||||||
printf("err=%d\n", err);
|
|
||||||
#endif
|
#endif
|
||||||
++failed;
|
++failed;
|
||||||
}
|
}
|
||||||
@ -194,8 +193,7 @@ int pkcs_5_test (void)
|
|||||||
cases_5_1[i].c, hash,
|
cases_5_1[i].c, hash,
|
||||||
DK, &dkLen)) != CRYPT_OK) {
|
DK, &dkLen)) != CRYPT_OK) {
|
||||||
#ifdef LTC_TEST_DBG
|
#ifdef LTC_TEST_DBG
|
||||||
printf("\nPKCS#5_1 test #%d: Failed/1\n", i);
|
printf("\npkcs_5_alg1() #%d: Failed/1 (%s)\n", i, error_to_string(err));
|
||||||
printf("err=%d\n", err);
|
|
||||||
#endif
|
#endif
|
||||||
++failed;
|
++failed;
|
||||||
}
|
}
|
||||||
@ -212,8 +210,7 @@ int pkcs_5_test (void)
|
|||||||
cases_5_1o[i].c, hash,
|
cases_5_1o[i].c, hash,
|
||||||
DK, &dkLen)) != CRYPT_OK) {
|
DK, &dkLen)) != CRYPT_OK) {
|
||||||
#ifdef LTC_TEST_DBG
|
#ifdef LTC_TEST_DBG
|
||||||
printf("\nPKCS#5_1o test #%d: Failed/1\n", i);
|
printf("\npkcs_5_alg1_openssl() #%d: Failed/1 (%s)\n", i, error_to_string(err));
|
||||||
printf("err=%d\n", err);
|
|
||||||
#endif
|
#endif
|
||||||
++failed;
|
++failed;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user