Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -4080,7 +4080,7 @@ static int DoKexInit(WOLFSSH* ssh, byte* buf, word32 len, word32* idx)
if (ret == WS_SUCCESS) {
/* Only checking for this is we are server. Our client does
* not have anything to say to a server, yet. */
if (side == WOLFSSH_ENDPOINT_SERVER) {
if (side == WOLFSSH_ENDPOINT_SERVER && !ssh->extInfoSent) {
byte extInfo;

/* Match the client accepts extInfo. */
Expand Down Expand Up @@ -13216,6 +13216,10 @@ int SendExtInfo(WOLFSSH* ssh)
}

if (ret == WS_SUCCESS) {
ssh->sendExtInfo = 0;
ssh->extInfoSent = 1; /* RFC 8308 section 2.4 ext. info should only be
* sent after SSH_MSG_NEWKEYS or after
* SSH_MSG_USERAUTH_SUCCESS. Not on re-key */
ret = wolfSSH_SendPacket(ssh);
}

Expand Down
1 change: 1 addition & 0 deletions wolfssh/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,7 @@ struct WOLFSSH {
byte sendTerminalRequest;
byte userAuthPkDone;
byte sendExtInfo;
byte extInfoSent; /* track if the ext info has already been sent */
byte* peerSigId;
word32 peerSigIdSz;

Expand Down
Loading