Skip to content

[AI] Fix issue #182: Prevent -version flag from overriding finishWithCloseNotify in DTLS #225

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 the issue where the -version parameter with DTLS protocols was overriding the finishWithCloseNotify configuration value
  • Removes the automatic setting of finishWithCloseNotify to true for DTLS protocols
  • Allows users to control this setting through XML configuration files while still using the -version parameter

Changes

  • Modified ProtocolVersionDelegate.applyDelegate() to not override finishWithCloseNotify when DTLS is specified
  • Added comprehensive tests to verify the behavior with both default and explicitly set values

Test plan

  • Added unit tests for DTLS12 and DTLS10 versions
  • Tests verify that default false value is preserved
  • Tests verify that explicitly set values (both true and false) are preserved
  • All existing tests continue to pass
  • Code formatted with spotless

Context

This fixes issue #182 where users reported that setting <finishWithCloseNotify>false</finishWithCloseNotify> in their XML configuration was being ignored when using -version DTLS12 parameter.

The root cause was that ProtocolVersionDelegate was unconditionally setting finishWithCloseNotify to true for all DTLS protocols, overriding any user-specified configuration.

…Notify in DTLS

When using the -version parameter with DTLS protocols, the ProtocolVersionDelegate
was unconditionally setting finishWithCloseNotify to true, overriding any value
that may have been set via XML configuration files.

This fix removes the automatic override, allowing users to control the
finishWithCloseNotify setting through their XML configuration files while
still using the -version parameter for DTLS protocols.

Changes:
- Removed config.setFinishWithCloseNotify(true) from DTLS configuration in ProtocolVersionDelegate
- Added tests to verify finishWithCloseNotify values are preserved for DTLS versions
- Tests confirm both default (false) and explicitly set values are maintained
@ic0ns ic0ns changed the title Fix issue #182: Prevent -version flag from overriding finishWithCloseNotify in DTLS [AI] Fix issue #182: Prevent -version flag from overriding finishWithCloseNotify in DTLS 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.

1 participant