Skip to content

Fix a few TLS compliance issues#10594

Open
kareem-wolfssl wants to merge 4 commits into
wolfSSL:masterfrom
kareem-wolfssl:zd21873
Open

Fix a few TLS compliance issues#10594
kareem-wolfssl wants to merge 4 commits into
wolfSSL:masterfrom
kareem-wolfssl:zd21873

Conversation

@kareem-wolfssl
Copy link
Copy Markdown
Contributor

Description

Fixes zd#21873

Testing

Built in tests

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@kareem-wolfssl kareem-wolfssl self-assigned this Jun 4, 2026
Copilot AI review requested due to automatic review settings June 4, 2026 00:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR tightens TLS compliance-related behavior in the core handshake and exporter paths, primarily by enforcing correct timing/validity constraints for keying material export and session ticket usage.

Changes:

  • Refuse wolfSSL_export_keying_material() calls until the handshake has fully completed (per RFC 8446 / RFC 5705 intent).
  • Suppress use of expired stored session tickets (fall back to full handshake instead of attempting resumption).
  • Map BUFFER_E to decode_error in TranslateErrorToAlert().

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/ssl.c Adds a “handshake complete” gate before exporting keying material.
src/internal.c Adds client-side session ticket expiry suppression and extends alert translation for buffer errors.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/internal.c
Comment on lines +31492 to +31496
if (LowResTimer() >=
(ssl->session->bornOn + ssl->session->timeout)) {
WOLFSSL_MSG("Stored session ticket expired; full handshake");
ssl->options.resuming = 0;
}
Comment thread src/ssl.c
Comment on lines +6029 to +6033
if (ssl->options.handShakeDone == 0 ||
ssl->options.handShakeState != HANDSHAKE_DONE) {
WOLFSSL_MSG("Handshake not complete; refusing keying-material export");
return WOLFSSL_FAILURE;
}
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.

2 participants