Skip to content

Conversation

@Frauschi
Copy link
Contributor

@Frauschi Frauschi commented Jan 5, 2026

  • Make sure no KeyShare is sent from the client when DH is disabled in PSK mode
  • Fix server error in Suite matching in case no KeyShare is present

Found while testing PSK-only handshakes on embedded devices where client-side KeyShare generation is costly.

* Make sure no KeyShare is sent from the client when DH is disabled in PSK mode
* Fix server error in Suite matching in case no KeyShare is present
@wolfSSL-Bot
Copy link

Can one of the admins verify this patch?

@dgarske
Copy link
Contributor

dgarske commented Jan 5, 2026

Okay to test.

@Frauschi
Copy link
Contributor Author

Frauschi commented Jan 7, 2026

After checking the failing tests and digging deeper in the behavior of the PskKeyExchangeModes extension, I conclude that this PR in the current form does not work.

As the PskKeyExchangeModes extension is also used to indicate to the server the desired PSK modes for a future SessionTicket, it is also sent when no actual PSK for the current session is provided. Hence, even when the noPskDheKe option is enabled, we cannot simply disable the generation of the KeyShare (and necessarily the SupportedGroups) extensions for the ClientHello. We may only do that if the ClientHello actually contains a PreSharedKey extension. To implement this, however, more thorough refactoring of the TLSX_PopulateExtensions() method would be necessary, which is probably not worth the effort at the moment.

@Frauschi Frauschi closed this Jan 7, 2026
@Frauschi Frauschi deleted the psk_keyshare_fix branch January 9, 2026 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants