-
Notifications
You must be signed in to change notification settings - Fork 919
Add a runtime option to enable or disable the secure renegotiation check. #9596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
🛟 Devin Lifeguard found 2 likely issues in this PR
@kareem-wolfssl |
There was a problem hiding this 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 adds a runtime option to enable or disable the secure renegotiation (SCR) check in wolfSSL. The feature allows clients to control whether to enforce RFC 9325 requirements that servers acknowledge the secure renegotiation extension. Additionally, it implements sending a no_renegotiation alert when rejecting renegotiation attempts on servers without secure renegotiation support.
Key changes:
- Adds
scr_check_enabledbit field to the WOLFSSL structure with getter/setter API functions - Implements logic to send
no_renegotiationalert when server receives ClientHello after handshake completion without secure renegotiation support - Makes the existing SCR check in DoServerHello conditional on the new
scr_check_enabledflag
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| wolfssl/ssl.h | Adds API declarations for wolfSSL_get_scr_check_enabled and wolfSSL_set_scr_check_enabled |
| wolfssl/internal.h | Adds scr_check_enabled bit field to WOLFSSL structure |
| src/ssl.c | Implements getter/setter functions for the SCR check flag |
| src/internal.c | Initializes scr_check_enabled to 1 (enabled by default); adds no_renegotiation alert logic; makes SCR check conditional on the flag |
| tests/api.c | Adds comprehensive test for the SCR check enable/disable functionality |
| doc/dox_comments/header_files/ssl.h | Adds documentation for the new API functions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
Send no_renegotiation alert when rejecting renegotation attempt due to renegotiation being disabled as defined in RFC 5246 section 7.2.2.
Fixes zd#19378
Testing
Built in tests
Checklist