account for wolfSSH always sending carriage return and new line

pull/213/head
Jacob Barthelmeh 2020-03-17 18:42:48 -06:00
parent 2c60365307
commit 6dd22d29e6
1 changed files with 1 additions and 4 deletions

View File

@ -2235,12 +2235,9 @@ static int DoKexInit(WOLFSSH* ssh, byte* buf, word32 len, word32* idx)
}
if (ret == WS_SUCCESS) {
byte SSH_PROTO_EOL_SZ = 1;
byte SSH_PROTO_EOL_SZ = 2;
strSz = (word32)WSTRLEN(sshProtoIdStr) - SSH_PROTO_EOL_SZ;
if (strSz > 1 && sshProtoIdStr[strSz - 1] == '\r') {
strSz--; /* subtract 1 more for CR */
}
c32toa(strSz, scratchLen);
ret = wc_HashUpdate(&ssh->handshake->hash, enmhashId,
scratchLen, LENGTH_SZ);