Merge branch 'master' of github.com:cyassl/cyassl
This commit is contained in:
commit
4a5a251e80
@ -1565,10 +1565,8 @@ void fp_montgomery_reduce(fp_int *a, fp_int *m, fp_digit mp)
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(USE_MEMSET)
|
||||
/* now zero the buff */
|
||||
XMEMSET(c, 0, sizeof c);
|
||||
#endif
|
||||
pa = m->used;
|
||||
|
||||
/* copy the input */
|
||||
@ -1576,11 +1574,6 @@ void fp_montgomery_reduce(fp_int *a, fp_int *m, fp_digit mp)
|
||||
for (x = 0; x < oldused; x++) {
|
||||
c[x] = a->dp[x];
|
||||
}
|
||||
#if !defined(USE_MEMSET)
|
||||
for (; x < 2*pa+1; x++) {
|
||||
c[x] = 0;
|
||||
}
|
||||
#endif
|
||||
MONT_START;
|
||||
|
||||
for (x = 0; x < pa; x++) {
|
||||
|
@ -1419,6 +1419,7 @@ int CyaSSL_Init(void)
|
||||
}
|
||||
} else {
|
||||
rsaKey = 1;
|
||||
(void)rsaKey; /* for no ecc builds */
|
||||
}
|
||||
FreeRsaKey(&key);
|
||||
}
|
||||
|
@ -160,6 +160,9 @@ static void doPRF(byte* digest, word32 digLen, const byte* secret,word32 secLen,
|
||||
return;
|
||||
if (digLen > MAX_PRF_DIG)
|
||||
return;
|
||||
|
||||
XMEMSET(md5_result, 0, digLen);
|
||||
XMEMSET(sha_result, 0, digLen);
|
||||
|
||||
XMEMCPY(md5_half, secret, half);
|
||||
XMEMCPY(sha_half, secret + half - secLen % 2, half);
|
||||
|
Loading…
Reference in New Issue
Block a user