XGameRuntime: check all intermediate certificates for Issuer thumbprint pins #2366

Closed
spook40 wants to merge 1 commit from upstream-pr/2376 into main
spook40 commented 2026-11-25 17:23:15 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by spook40 on 2026-11-25T17:23:15Z.


Part of #1489 (XCL-BT-050).

What is in it

  • Update check_thumbprints in crates/xcl/src/hle/xgameruntime/networking.rs so XNetworkingThumbprintType::Issuer (1) checks every intermediate certificate in the chain (1..chain_sha1s.len() - 1) instead of only index 1, while continuing to exclude the leaf (0) and root (len - 1) certificates.
  • Add issuer_pin_matches_any_intermediate_certificate unit test covering 4-certificate chains (matching both intermediates, rejecting leaf and root as Issuer pins) and 2-certificate chains with no intermediates.

Tested

  • Environment: Windows 11, NVIDIA GeForce RTX 3060 Ti, Rust debug build
  • cargo test -p xcl networking::tests -- --test-threads=4 (8 passed, 0 failed)
  • cargo test --workspace --test "*" -- --test-threads=4 (all integration test targets passed)

Regression run

  • cargo test --workspace -- --test-threads=4 (1220 passed; 1 pre-existing unrelated failure in gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier)

Not tested

  • Live TLS handshake against an Xbox Live endpoint with a multi-intermediate certificate chain (no live Xbox Live session available offline).

AI use

  • Gemini helped locate XCL-BT-050, draft the slice check and unit test in crates/xcl/src/hle/xgameruntime/networking.rs, and draft this PR description. All changes and tests were reviewed and run locally.
<!-- greyfinch-sync:ivall/xcl:issue:6609919691 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2376). Originally posted by [spook40](https://github.com/spook40) on 2026-11-25T17:23:15Z. --- Part of #1489 (`XCL-BT-050`). **What is in it** - Update `check_thumbprints` in `crates/xcl/src/hle/xgameruntime/networking.rs` so `XNetworkingThumbprintType::Issuer` (`1`) checks every intermediate certificate in the chain (`1..chain_sha1s.len() - 1`) instead of only index `1`, while continuing to exclude the leaf (`0`) and root (`len - 1`) certificates. - Add `issuer_pin_matches_any_intermediate_certificate` unit test covering 4-certificate chains (matching both intermediates, rejecting leaf and root as `Issuer` pins) and 2-certificate chains with no intermediates. **Tested** - Environment: Windows 11, NVIDIA GeForce RTX 3060 Ti, Rust debug build - `cargo test -p xcl networking::tests -- --test-threads=4` (8 passed, 0 failed) - `cargo test --workspace --test "*" -- --test-threads=4` (all integration test targets passed) **Regression run** - `cargo test --workspace -- --test-threads=4` (1220 passed; 1 pre-existing unrelated failure in `gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier`) **Not tested** - Live TLS handshake against an Xbox Live endpoint with a multi-intermediate certificate chain (no live Xbox Live session available offline). **AI use** - Gemini helped locate `XCL-BT-050`, draft the slice check and unit test in `crates/xcl/src/hle/xgameruntime/networking.rs`, and draft this PR description. All changes and tests were reviewed and run locally.
upstream-sync closed this pull request 2026-11-25 18:04:20 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!2366
No description provided.