Skip to content

Commit cc17941

Browse files
adjust test case to account for re-keying return
1 parent 813ec26 commit cc17941

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/api.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,14 +1057,16 @@ static void test_wolfSSH_SFTP_SendReadPacket(void)
10571057
outSz = WOLFSSH_MAX_SFTP_RW / 2;
10581058
rxSz = wolfSSH_SFTP_SendReadPacket(ssh, handle, handleSz,
10591059
ofst, out, outSz);
1060-
AssertIntGT(rxSz, 0);
1061-
AssertIntLE(rxSz, outSz);
1060+
if (wolfSSH_get_error(ssh) != WS_REKEYING) {
1061+
AssertIntGT(rxSz, 0);
1062+
AssertIntLE(rxSz, outSz);
1063+
}
10621064

10631065
/* read all */
10641066
outSz = WOLFSSH_MAX_SFTP_RW;
10651067
rxSz = wolfSSH_SFTP_SendReadPacket(ssh, handle, handleSz,
10661068
ofst, out, outSz);
1067-
if (rxSz != WS_REKEYING) {
1069+
if (wolfSSH_get_error(ssh) != WS_REKEYING) {
10681070
AssertIntGT(rxSz, 0);
10691071
AssertIntLE(rxSz, outSz);
10701072
}

0 commit comments

Comments
 (0)