Merge pull request #769 from JacobBarthelmeh/Testing

Testing
This commit is contained in:
toddouska
2017-03-09 10:17:48 -08:00
committed by GitHub
4 changed files with 15 additions and 10 deletions

View File

@ -7107,7 +7107,8 @@ int do_mp_jacobi(mp_int* a, mp_int* n, int* c);
int do_mp_jacobi(mp_int* a, mp_int* n, int* c)
{
int k, s, r, res;
int k, s, res;
int r = 0; /* initialize to help static analysis out */
mp_digit residue;
/* if a < 0 return MP_VAL */

View File

@ -830,15 +830,11 @@ int wc_HKDF(int type, const byte* inKey, word32 inKeySz,
saltSz = hashSz;
}
do {
ret = wc_HmacSetKey(&myHmac, type, localSalt, saltSz);
if (ret != 0)
break;
if (ret == 0)
ret = wc_HmacUpdate(&myHmac, inKey, inKeySz);
if (ret != 0)
break;
if (ret == 0)
ret = wc_HmacFinal(&myHmac, prk);
} while (0);
if (ret == 0) {
while (outIdx < outSz) {

View File

@ -4229,6 +4229,10 @@ static int mp_div_d (mp_int * a, mp_digit b, mp_int * c, mp_digit * d)
q.used = a->used;
q.sign = a->sign;
}
else {
mp_init(&q); /* initialize to help static analysis */
}
w = 0;
for (ix = a->used - 1; ix >= 0; ix--) {
@ -4251,8 +4255,8 @@ static int mp_div_d (mp_int * a, mp_digit b, mp_int * c, mp_digit * d)
if (c != NULL) {
mp_clamp(&q);
mp_exch(&q, c);
mp_clear(&q);
}
mp_clear(&q);
return res;
}

View File

@ -709,6 +709,10 @@ int wc_PKCS12_parse(WC_PKCS12* pkcs12, const char* psw,
}
}
if (pkcs12->safe == NULL) {
WOLFSSL_MSG("No PKCS12 safes to parse");
return BAD_FUNC_ARG;
}
/* Decode content infos */
ci = pkcs12->safe->CI;