mirror of https://github.com/wolfSSL/wolfssh.git
Keep a rekey out of the mem-IO test harnesses
Filling the reply queue sends enough to cross a lowered highwater mark. The rekey that fires sends a KEXINIT the 256-byte mem buffer cannot hold. - Disable the highwater; a bigger buffer only moves the cliff. - Both harnesses, since the buffer is the same size on each.pull/1214/head
parent
69bfbccbf9
commit
cabbc53f8f
|
|
@ -418,6 +418,9 @@ static void InitChannelOpenHarnessClient(ChannelOpenHarness* harness,
|
|||
MemIoInit(&harness->io, in, inSz, harness->out, sizeof(harness->out));
|
||||
wolfSSH_SetIOReadCtx(harness->ssh, &harness->io);
|
||||
wolfSSH_SetIOWriteCtx(harness->ssh, &harness->io);
|
||||
/* A rekey cannot fit the 256-byte mem buffer, so keep a build-time
|
||||
* DEFAULT_HIGHWATER_MARK from firing one mid-test. */
|
||||
AssertIntEQ(wolfSSH_SetHighwater(harness->ssh, 0), WS_SUCCESS);
|
||||
harness->ssh->connectState = CONNECT_SERVER_USERAUTH_ACCEPT_DONE;
|
||||
}
|
||||
#endif /* WOLFSSH_FWD && !NO_WOLFSSH_CLIENT */
|
||||
|
|
@ -444,6 +447,9 @@ static void InitChannelOpenHarness(ChannelOpenHarness* harness,
|
|||
MemIoInit(&harness->io, in, inSz, harness->out, sizeof(harness->out));
|
||||
wolfSSH_SetIOReadCtx(harness->ssh, &harness->io);
|
||||
wolfSSH_SetIOWriteCtx(harness->ssh, &harness->io);
|
||||
/* A rekey cannot fit the 256-byte mem buffer, so keep a build-time
|
||||
* DEFAULT_HIGHWATER_MARK from firing one mid-test. */
|
||||
AssertIntEQ(wolfSSH_SetHighwater(harness->ssh, 0), WS_SUCCESS);
|
||||
harness->ssh->acceptState = ACCEPT_SERVER_USERAUTH_SENT;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue