Ensure close_notify is sent after user_canceled during quiet shutdown - #11225
Ensure close_notify is sent after user_canceled during quiet shutdown#11225holtrop-wolfssl wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
This PR ensures that when a user_canceled alert is sent, a subsequent close_notify is still emitted during quiet shutdown, aligning shutdown behavior with the protocol expectation described in the TLS spec and addressing #11131.
Changes:
- Track whether a
user_canceledhas been sent (or queued) so quiet shutdown can still send the requiredclose_notify. - Update
wolfSSL_shutdown()quiet-shutdown path to flush/emitclose_notifywhenuser_canceledoccurred. - Add a regression test covering quiet shutdown behavior after
wolfSSL_SendUserCanceled().
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
wolfssl/internal.h |
Adds an options bit to record user_canceled state relevant to shutdown behavior. |
src/ssl_api_rw.c |
Implements the quiet-shutdown exception to still send close_notify after user_canceled. |
src/ssl.c |
Initializes the new options bit during SSL object reset/init. |
tests/api/test_ssl_rw.[ch] |
Registers and adds a new test validating the quiet shutdown + user_canceled behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
|
retest this please (build removed) |
|
retest this please (fatal: early EOF |
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #11225
Scan targets checked: wolfcrypt-rs-bugs, wolfssl-bugs, wolfssl-src
Findings: 2
2 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Reported findings require changes before merge.
3c40085 to
0ca9b0d
Compare
|
retest this please (org.jenkinsci.plugins.workflow.support.steps.AgentOfflineException: Unable to create live FilePath for wolf-linux-cloud-node-3kbiik; wolf-linux-cloud-node-3kbiik was marked offline: Connection was broken) |
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #11225
Scan targets checked: wolfcrypt-rs-bugs, wolfssl-bugs, wolfssl-src
Findings: 2
2 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Reported findings require changes before merge.
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #11225
Scan targets checked: wolfcrypt-rs-bugs, wolfssl-bugs, wolfssl-src
Findings: 4
4 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Reported findings require changes before merge.
559c0f7 to
84c25b7
Compare
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #11225
Scan targets checked: wolfcrypt-rs-bugs, wolfssl-bugs, wolfssl-src
Findings: 1
1 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Reported findings require changes before merge.
84c25b7 to
0d8e743
Compare
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #11225
Scan targets checked: wolfcrypt-rs-bugs, wolfssl-bugs, wolfssl-src
Findings: 1
1 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Reported findings require changes before merge.
0d8e743 to
8075889
Compare
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #11225
Scan targets checked: wolfcrypt-rs-bugs, wolfssl-bugs, wolfssl-src
Fenrir result: Approved ✅
No new issues found in the changed files.
Advisory only — this automated result does not count as a GitHub approval.
Fenrir's latest completed scan found no issues; clearing the prior automated change request.
|
retest this please (Finished: FAILURE) |
… - clean up logic
Description
Ensure close_notify is sent after user_canceled during quiet shutdown
Fixes #11131
Testing
How did you test?
Checklist