Skip to content

fix(engine,session): require EncryptMethod (98) = 0 on the Logon acknowledgement - #196

Merged
joaquinbejar merged 1 commit into
mainfrom
fix-ack-encrypt-method
Oct 20, 2026
Merged

joaquinbejar merged 1 commit into
mainfrom
fix-ack-encrypt-method

Conversation

@joaquinbejar

Copy link
Copy Markdown
Owner

Summary

Codex's remaining P2 from #188/#192. EncryptMethod (98) is a required field of the Logon (FIX44.xml, doc/fix_operations.md), but neither the engine's initiator nor the #93 poll driver checked it on the acknowledgement: an ack without 98 established the session.

Changes

  • ironfix_session::header::check_encrypt_method and EncryptMethodProblem: 98 must be present and 0. It reports SessionRejectReason 1 (absent) or 5 (another method) with RefTagID 98, in the existing text.
  • The engine initiator now refuses such an ack with a session Reject and a Logout, and fails with EngineError::LogonRejected, as it does for a bad 108.
  • The acceptor uses the same check. Its Logon refusal is unchanged: a Logout with the same text. The only difference is that a non-UTF-8 value is now echoed lossily instead of shown as absent.
  • The poll driver runs the same check, in the same order.
  • doc/fix_operations.md, initiator step 6, documents it.

Behaviour change

An initiator now refuses a Logon acknowledgement without 98, or with a 98 other than 0. A conforming counterparty always sends 98=0.

Testing

  • initiator_tests::test_ack_encrypt_method_missing_or_unsupported_fails_handshake covers both an absent 98 and 98=1.
  • poll_driver_peer::test_ack_without_encrypt_method_is_rejected_and_ends_the_session covers the poll driver.
  • cargo test --workspace --all-features: 2647 passed, 0 failed. fmt, clippy -D warnings, doc and check-spanish are clean.

Refs #93

@joaquinbejar joaquinbejar added bug Something isn't working session ironfix-session / store / transport / engine labels Oct 20, 2026
@joaquinbejar joaquinbejar self-assigned this Oct 20, 2026
@joaquinbejar
joaquinbejar merged commit 45b7582 into main Oct 20, 2026
43 of 53 checks passed
@joaquinbejar
joaquinbejar deleted the fix-ack-encrypt-method branch October 20, 2026 16:49

@joaquinbejar joaquinbejar left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

APPROVE. The required EncryptMethod check resolves the remaining finding from PR188 and PR192. The 17 independent engine handshakes, three protocol probes, 275 session tests, seven peer tests, interop and formatting checks pass. No new findings. Submitted as COMMENT because GitHub prevents the author account from approving its own pull request.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.13208% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
ironfix-example/examples/poll_driver/mod.rs 0.00% 10 Missing ⚠️
Files with missing lines Coverage Δ
ironfix-engine/src/acceptor.rs 88.08% <100.00%> (-0.08%) ⬇️
ironfix-engine/src/initiator.rs 80.09% <100.00%> (+0.67%) ⬆️
ironfix-session/src/header.rs 100.00% <100.00%> (ø)
ironfix-example/examples/poll_driver/mod.rs 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working session ironfix-session / store / transport / engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants