Merge pull request #215 from libtom/pr/lint-20170509
Another fixes related to #199
This commit is contained in:
commit
55a7eead7f
@ -54,7 +54,7 @@ int ccm_memory(int cipher,
|
||||
int err;
|
||||
unsigned long len, L, x, y, z, CTRlen;
|
||||
#ifdef LTC_FAST
|
||||
LTC_FAST_TYPE fastMask = -1; /* initialize fastMask at all zeroes */
|
||||
LTC_FAST_TYPE fastMask = ~0; /* initialize fastMask at all zeroes */
|
||||
#endif
|
||||
unsigned char mask = 0xff; /* initialize mask at all zeroes */
|
||||
|
||||
|
@ -19,17 +19,13 @@
|
||||
|
||||
static const struct {
|
||||
int len;
|
||||
unsigned char poly_div[MAXBLOCKSIZE],
|
||||
poly_mul[MAXBLOCKSIZE];
|
||||
unsigned char poly_mul[MAXBLOCKSIZE];
|
||||
} polys[] = {
|
||||
{
|
||||
8,
|
||||
{ 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D },
|
||||
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1B }
|
||||
}, {
|
||||
16,
|
||||
{ 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43 },
|
||||
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87 }
|
||||
}
|
||||
|
@ -265,7 +265,7 @@ int hkdf_test(void)
|
||||
cases[i].info, cases[i].info_l,
|
||||
cases[i].IKM, cases[i].IKM_l,
|
||||
OKM, cases[i].OKM_l)) != CRYPT_OK) {
|
||||
#if 0
|
||||
#ifdef LTC_TEST_DBG
|
||||
printf("LTC_HKDF-%s test #%d, %s\n", cases[i].Hash, i, error_to_string(err));
|
||||
#endif
|
||||
return err;
|
||||
@ -273,7 +273,7 @@ int hkdf_test(void)
|
||||
|
||||
if(XMEMCMP(OKM, cases[i].OKM, (size_t)cases[i].OKM_l) != 0) {
|
||||
failed++;
|
||||
#if 0
|
||||
#ifdef LTC_TEST_DBG
|
||||
{
|
||||
unsigned int j;
|
||||
printf("\nLTC_HKDF-%s test #%d:\n", cases[i].Hash, cases[i].num);
|
||||
@ -288,10 +288,10 @@ int hkdf_test(void)
|
||||
printf("\n");
|
||||
return CRYPT_ERROR;
|
||||
}
|
||||
#endif
|
||||
#if 0
|
||||
#if LTC_TEST_DBG > 1
|
||||
} else {
|
||||
printf("LTC_HKDF-%s test #%d: Passed\n", cases[i].Hash, cases[i].num);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user