Changes from Todd's code review.

This commit is contained in:
jrblixt
2017-05-16 10:04:30 -06:00
parent 606aca9916
commit 6acd5dafa7
4 changed files with 74 additions and 74 deletions

View File

@ -3108,7 +3108,7 @@ int DeriveKeys(WOLFSSL* ssl)
XMEMCPY(shaInput + idx, ssl->arrays->serverRandom, RAN_LEN);
idx += RAN_LEN;
XMEMCPY(shaInput + idx, ssl->arrays->clientRandom, RAN_LEN);
if (ret == 0) { /* ret could be PREFIX_ERROR. */
if (ret == 0) {
ret = wc_ShaUpdate(sha, shaInput,
(KEY_PREFIX + SECRET_LEN + 2 * RAN_LEN) - KEY_PREFIX + j);
}
@ -3237,7 +3237,7 @@ static int MakeSslMasterSecret(WOLFSSL* ssl)
idx += RAN_LEN;
XMEMCPY(shaInput + idx, ssl->arrays->serverRandom, RAN_LEN);
idx += RAN_LEN;
if (ret == 0) { /* ret could be PREFIX_ERROR. */
if (ret == 0) {
ret = wc_ShaUpdate(sha, shaInput, idx);
}
if (ret == 0) {