XGameRuntime: match intermediate and issuing CA pins across certificate chains #1493
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1503"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by hajduzsolt on 2026-11-24T17:02:37Z.
Runtime fix verified with unit tests and RX 9070 XT smoke run.
What is in it
crates/xcl/src/hle/xgameruntime/networking.rs: incheck_thumbprints, searchchain_sha1s.get(1..)forthumbprint_type: 1(XNetworkingThumbprintType::Issuer) so pins against any intermediate CA or issuing certificate in the chain match.crates/xcl/src/hle/xgameruntime/networking.rs: add unit testissuer_pin_matches_any_intermediate_or_issuing_cert_in_chainverifying multi-intermediate certificate chains (depth 4) with leaf, multiple intermediate CAs, and root pins.Tested
cargo test)cargo test --workspace -- --test-threads=2: 744 passed, 0 failed, 12 ignoredcargo test -p xcl --lib hle::xgameruntime::networking::tests: 8 passed, 0 failedRegression run
main:
PR:
Not tested
AI use
networking.rs, synthetic unit test authoring, and workspace test validation.Imported from ivall/xcl. Originally posted by gut0to on 2026-11-24T17:16:21Z.
Review: COMMENTED
AI-assisted review (GPT-6): I checked this behavior against the XNetworkingThumbprintType documentation and the new test.
Imported from ivall/xcl. Originally posted by gut0to on 2026-11-24T17:16:22Z.
Code review location:
crates/xcl/src/hle/xgameruntime/networking.rs; line 433This range includes the terminal root, and the test below accepts that root as an Issuer pin. The API defines Root (type 2) separately from Issuer (type 1), with Issuer covering issuer or intermediate certificates. Please exclude the terminal root from type-1 matching and handle it only through type 2. AI-assisted review: I verified this against the XNetworkingThumbprintType documentation and the new test.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T18:53:42Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodifiedmain.)Thanks!
Imported from ivall/xcl. Originally posted by hajduzsolt on 2026-11-24T19:15:09Z.
Thanks for catching this. Issuer pins now search only certificates between the leaf and root; tests cover root exclusion and short or empty chains.
cargo test --workspace -- --test-threads=2passed (723 library tests passed, 21 ignored).upstream-sync referenced this pull request2026-11-25 04:08:41 +00:00
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T05:26:19Z.
Empirical test report (
739a6c64)Tested #1503 at commit
739a6c64b1cd8e25824fa35b3c5aaf3fdc04a688from a clean, detached checkout.Hardware / environment
10.0.26200.9974on an AMD CPU (family 23, model 113, stepping 0, 12 logical processors).rustc 1.100.0 (0ef1bc386 2026-11-09), hostx86_64-pc-windows-msvc. DXC reported1.9.2609.5 (01b62ad47). Cargo used the unoptimized test profile with debug info and incremental compilation disabled.XCL_ADAPTER=NONE_CPU_ONLYandRUST_TEST_NOCAPTURE=1. Both commands ran outsideInvoke-ArcTest.ps1without acquiring the Arc GPU mutex.Commands and results
cargo test --workspace --no-runexited 0 and built the workspace test binaries.cargo test -p xcl --lib hle::xgameruntime::networking::tests::issuer_pin_matches_any_intermediate_or_issuing_cert_in_chain -- --nocapture --exactexited 0. The log recorded 1 passed, 0 failed, 0 ignored, 0 skipped, and 743 filtered out.Observed behavior
The regression test passed with synthetic 20-byte thumbprints in a leaf-to-root chain. An issuer pin matched either of two intermediate certificates. Issuer pins targeting the leaf, root, or an unrelated certificate produced a mismatch. A root thumbprint supplied as an issuer pin also failed to match in a leaf-and-root chain, a one-entry chain, and an empty chain. Leaf and root pins matched their respective endpoints.
Not tested
The full GPU workspace suite, game smoke runs, and live TLS certificate verification were omitted. The focused test covered the in-memory thumbprint matcher.
AI use
Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against
pr1503-focused.logand published.upstream-sync referenced this pull request2026-11-25 14:08:43 +00:00
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T05:40:26Z.
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
Imported from ivall/xcl. Originally posted by upipibi on 2026-11-26T05:42:26Z.
NVIDIA test report for
739a6c6: RTX 3070 8 GB (Ampere, driver 616.56), Windows 11 26100, Rust 1.100.0, debug.cargo test -p xcl --lib -- --skip hle::xaudio2 --test-threads=4(thehle::xaudio2tests hang on this machine, onmaintoo):no wave64). The newissuer_pin_matches_any_intermediate_or_issuing_cert_in_chainpasses.Lib tests only; no title run.
AI-assisted (Claude Code, Claude Opus 5.5).
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-12-01T02:32:54Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:57:02Z.
Triage (#1607) – head
739a6c6#2376 made the same change (an Issuer pin matches any certificate between the leaf and the root) and is closed without being merged; main still compares only chain[1].
No problems found in the diff. A behaviour change to note: with a two-certificate chain [leaf, root], an Issuer pin no longer matches the root (the test asserts this).
Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.