Skip to content

Commit 5783e61

Browse files
check highwater after first decrypt too still
1 parent 6baf318 commit 5783e61

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

src/internal.c

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9934,6 +9934,14 @@ int DoReceive(WOLFSSH* ssh)
99349934
ssh->error = ret;
99359935
return WS_FATAL_ERROR;
99369936
}
9937+
9938+
ret = HighwaterCheck(ssh, WOLFSSH_HWSIDE_RECEIVE);
9939+
if (ret != WS_SUCCESS) {
9940+
WLOG(WS_LOG_DEBUG, "PR: First HighwaterCheck fail");
9941+
ssh->error = ret;
9942+
ret = WS_FATAL_ERROR;
9943+
break;
9944+
}
99379945
}
99389946
NO_BREAK;
99399947

@@ -10018,6 +10026,14 @@ int DoReceive(WOLFSSH* ssh)
1001810026
}
1001910027
}
1002010028
ssh->processReplyState = PROCESS_PACKET;
10029+
10030+
ret = HighwaterCheck(ssh, WOLFSSH_HWSIDE_RECEIVE);
10031+
if (ret != WS_SUCCESS) {
10032+
WLOG(WS_LOG_DEBUG, "PR: HighwaterCheck fail");
10033+
ssh->error = ret;
10034+
ret = WS_FATAL_ERROR;
10035+
break;
10036+
}
1002110037
NO_BREAK;
1002210038

1002310039
case PROCESS_PACKET:
@@ -10028,15 +10044,6 @@ int DoReceive(WOLFSSH* ssh)
1002810044
ret == WS_REKEYING || ret == WS_WANT_READ)) {
1002910045
ret = WS_FATAL_ERROR;
1003010046
}
10031-
10032-
if (ret == WS_SUCCESS) {
10033-
ret = HighwaterCheck(ssh, WOLFSSH_HWSIDE_RECEIVE);
10034-
if (ret != WS_SUCCESS) {
10035-
WLOG(WS_LOG_DEBUG, "PR: HighwaterCheck fail");
10036-
ssh->error = ret;
10037-
ret = WS_FATAL_ERROR;
10038-
}
10039-
}
1004010047
break;
1004110048

1004210049
default:

0 commit comments

Comments
 (0)