Skip to content

tls.c: send missing_extension alert on TLS 1.3 SNI absence#10332

Merged
SparkiDev merged 1 commit into
wolfSSL:masterfrom
jackctj117:SNI
May 26, 2026
Merged

tls.c: send missing_extension alert on TLS 1.3 SNI absence#10332
SparkiDev merged 1 commit into
wolfSSL:masterfrom
jackctj117:SNI

Conversation

@jackctj117

Copy link
Copy Markdown
Contributor

This pull request updates the alert handling logic in the TLSX_SNI_VerifyParse function to improve compliance with TLS 1.3 requirements. Specifically, it changes the type of alert sent when the SNI (Server Name Indication) extension is absent or does not match, sending a missing_extension alert for TLS 1.3 and above, while maintaining the previous behavior for earlier versions.

Alert handling improvements for TLS 1.3:

  • Updated TLSX_SNI_VerifyParse in src/tls.c to send a missing_extension alert instead of handshake_failure when the SNI extension is missing or has no match, but only for TLS 1.3 and above. For earlier versions, the function still sends handshake_failure. [1] [2]

@jackctj117 jackctj117 self-assigned this Apr 27, 2026
Copilot AI review requested due to automatic review settings April 27, 2026 21:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR adjusts TLS alert behavior in TLSX_SNI_VerifyParse to better align with TLS 1.3 expectations by sending a different fatal alert when SNI is missing or doesn’t match.

Changes:

  • For TLS 1.3+, send missing_extension instead of handshake_failure when SNI is absent.
  • For TLS 1.3+, also send missing_extension instead of handshake_failure when SNI has NO_MATCH.
  • Preserve handshake_failure behavior for pre–TLS 1.3.

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

Comment thread src/tls.c
Comment thread src/tls.c
Comment thread src/tls.c
@github-actions

github-actions Bot commented Apr 27, 2026

Copy link
Copy Markdown

MemBrowse Memory Report

No memory changes detected for:

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #10332

Scan targets checked: wolfssl-bugs, wolfssl-src

No new issues found in the changed files. ✅

@ColtonWilley

ColtonWilley commented May 1, 2026

Copy link
Copy Markdown
Contributor

Jenkins retest this please.

@dgarske

dgarske commented May 18, 2026

Copy link
Copy Markdown
Member

Jenkins retest this please. PRB-fsanitize-addr-v3 -> FAIL: scripts/resume.test
The triage shows this was a timeout

@dgarske dgarske assigned jackctj117 and SparkiDev and unassigned jackctj117 May 18, 2026
Comment thread src/tls.c
@SparkiDev SparkiDev merged commit 91f3e7e into wolfSSL:master May 26, 2026
447 checks passed
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.

7 participants