Skip to content

Commit

Permalink
Merge pull request #7407 from mrdeep1/key_share
Browse files Browse the repository at this point in the history
Handle PSK-Only negotiation with key_share not being sent in Server Hello
  • Loading branch information
SparkiDev authored Apr 22, 2024
2 parents cfe645c + 7b22681 commit e1b66ca
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -14925,6 +14925,12 @@ int TLSX_Parse(WOLFSSL* ssl, const byte* input, word16 length, byte msgType,
else if (!isRequest && ssl->options.haveEMS && !pendingEMS)
ssl->options.haveEMS = 0;
#endif
#if defined(WOLFSSL_TLS13) && !defined(NO_PSK)
if (IsAtLeastTLSv1_3(ssl->version) && msgType == server_hello &&
IS_OFF(seenType, TLSX_ToSemaphore(TLSX_KEY_SHARE))) {
ssl->options.noPskDheKe = 1;
}
#endif

if (ret == 0)
ret = SNI_VERIFY_PARSE(ssl, isRequest);
Expand Down

0 comments on commit e1b66ca

Please sign in to comment.