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 1 commit 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 |
Description
Ensure close_notify is sent after user_canceled during quiet shutdown
Fixes #11131
Testing
How did you test?
Checklist