Skip to content

Commit ffd0897

Browse files
only send ext info once after SSH_MSG_NEWKEYS
1 parent 8c0c7fd commit ffd0897

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/internal.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4080,7 +4080,7 @@ static int DoKexInit(WOLFSSH* ssh, byte* buf, word32 len, word32* idx)
40804080
if (ret == WS_SUCCESS) {
40814081
/* Only checking for this is we are server. Our client does
40824082
* not have anything to say to a server, yet. */
4083-
if (side == WOLFSSH_ENDPOINT_SERVER) {
4083+
if (side == WOLFSSH_ENDPOINT_SERVER && !ssh->extInfoSent) {
40844084
byte extInfo;
40854085

40864086
/* Match the client accepts extInfo. */
@@ -13216,6 +13216,10 @@ int SendExtInfo(WOLFSSH* ssh)
1321613216
}
1321713217

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

0 commit comments

Comments
 (0)