forked from wolfSSL/wolfssl
Changes from Todd's code review.
This commit is contained in:
@@ -3108,7 +3108,7 @@ int DeriveKeys(WOLFSSL* ssl)
|
|||||||
XMEMCPY(shaInput + idx, ssl->arrays->serverRandom, RAN_LEN);
|
XMEMCPY(shaInput + idx, ssl->arrays->serverRandom, RAN_LEN);
|
||||||
idx += RAN_LEN;
|
idx += RAN_LEN;
|
||||||
XMEMCPY(shaInput + idx, ssl->arrays->clientRandom, 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,
|
ret = wc_ShaUpdate(sha, shaInput,
|
||||||
(KEY_PREFIX + SECRET_LEN + 2 * RAN_LEN) - KEY_PREFIX + j);
|
(KEY_PREFIX + SECRET_LEN + 2 * RAN_LEN) - KEY_PREFIX + j);
|
||||||
}
|
}
|
||||||
@@ -3237,7 +3237,7 @@ static int MakeSslMasterSecret(WOLFSSL* ssl)
|
|||||||
idx += RAN_LEN;
|
idx += RAN_LEN;
|
||||||
XMEMCPY(shaInput + idx, ssl->arrays->serverRandom, RAN_LEN);
|
XMEMCPY(shaInput + idx, ssl->arrays->serverRandom, RAN_LEN);
|
||||||
idx += RAN_LEN;
|
idx += RAN_LEN;
|
||||||
if (ret == 0) { /* ret could be PREFIX_ERROR. */
|
if (ret == 0) {
|
||||||
ret = wc_ShaUpdate(sha, shaInput, idx);
|
ret = wc_ShaUpdate(sha, shaInput, idx);
|
||||||
}
|
}
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
|
Reference in New Issue
Block a user