Skip to content

[AI] Fix DTLS config override issue with finishWithCloseNotify #223

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ic0ns
Copy link
Contributor

@ic0ns ic0ns commented Jun 26, 2025

Summary

  • Fixes issue where -version DTLS12 parameter always sets finishWithCloseNotify to true, overriding XML configuration
  • Adds new -close_notify parameter for explicit control of this setting
  • Preserves XML configuration values when using -version parameter

Changes

  1. Modified ProtocolVersionDelegate: Removed automatic setting of finishWithCloseNotify for DTLS versions
  2. Added CloseNotifyDelegate: New delegate to handle -close_notify parameter explicitly
  3. Updated Command Configs: Added CloseNotifyDelegate to both TLS-Server and TLS-Client
  4. Added Tests: Comprehensive tests for the new delegate and verification that DTLS doesn't override settings

Test plan

  • Added unit test for CloseNotifyDelegate
  • Added test to verify DTLS version doesn't override finishWithCloseNotify
  • All existing tests pass
  • Code formatted with spotless

Usage

Users can now:

  • Use XML config: <finishWithCloseNotify>false</finishWithCloseNotify> works with -version DTLS12
  • Use command line: -close_notify true/false to override any config setting
  • Omit both for default behavior (false)

Fixes #182

When using -version DTLS12 parameter, finishWithCloseNotify was always set to true,
overriding any XML configuration. This fix:

- Removes automatic setting of finishWithCloseNotify in ProtocolVersionDelegate for DTLS
- Adds new -close_notify parameter to explicitly control this setting
- Preserves backward compatibility while allowing XML config to work as expected

Fixes #182
@ic0ns ic0ns changed the title Fix DTLS config override issue with finishWithCloseNotify [AI] Fix DTLS config override issue with finishWithCloseNotify Jun 26, 2025
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.

Issue with defaultServerConnection and finishWithCloseNotify Settings in DTLS
1 participant