Server Does Not Set expectMsgId to MSGID_NEWKEYS

In the server code, the server is not setting the expectedMsgId to
MSGID_NEWKEYS before sending its new keys message. Update DoKexDhReply()
to set expectMsgId to MSGID_NEWKEYS.

Affected function: DoKeyDhReply.
Issue: F-1275
pull/921/head
John Safranek 2026-04-13 15:05:48 -07:00
parent b71670f797
commit e9d288ec60
1 changed files with 4 additions and 1 deletions

View File

@ -12914,8 +12914,11 @@ int SendKexDhReply(WOLFSSH* ssh)
ret = BundlePacket(ssh);
}
if (ret == WS_SUCCESS)
if (ret == WS_SUCCESS) {
ssh->handshake->expectMsgId = MSGID_NEWKEYS;
WLOG_EXPECT_MSGID(ssh->handshake->expectMsgId);
ret = SendNewKeys(ssh);
}
if (ret == WS_SUCCESS && ssh->sendExtInfo) {
ret = SendExtInfo(ssh);