mirror of https://github.com/wolfSSL/wolfssh.git
account for wolfSSH always sending carriage return and new line
parent
2c60365307
commit
6dd22d29e6
|
@ -2235,12 +2235,9 @@ static int DoKexInit(WOLFSSH* ssh, byte* buf, word32 len, word32* idx)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret == WS_SUCCESS) {
|
if (ret == WS_SUCCESS) {
|
||||||
byte SSH_PROTO_EOL_SZ = 1;
|
byte SSH_PROTO_EOL_SZ = 2;
|
||||||
|
|
||||||
strSz = (word32)WSTRLEN(sshProtoIdStr) - SSH_PROTO_EOL_SZ;
|
strSz = (word32)WSTRLEN(sshProtoIdStr) - SSH_PROTO_EOL_SZ;
|
||||||
if (strSz > 1 && sshProtoIdStr[strSz - 1] == '\r') {
|
|
||||||
strSz--; /* subtract 1 more for CR */
|
|
||||||
}
|
|
||||||
c32toa(strSz, scratchLen);
|
c32toa(strSz, scratchLen);
|
||||||
ret = wc_HashUpdate(&ssh->handshake->hash, enmhashId,
|
ret = wc_HashUpdate(&ssh->handshake->hash, enmhashId,
|
||||||
scratchLen, LENGTH_SZ);
|
scratchLen, LENGTH_SZ);
|
||||||
|
|
Loading…
Reference in New Issue