Repository navigation
XNetworking: read CERT_CHAIN_CONTEXT at its real offsets - #47
Merged
Merged
Conversation
extract_chain_certs read cChain / rgpChain at +16 / +24 and cElement / rgpElement at +20 / +24. In wincrypt.h both structs have cbSize and an 8-byte CERT_TRUST_STATUS first, so the counts sit at +12 and the arrays at +16. At +24 of the chain context is cLowerQualityChainContext, so the walk found no chain and XNetworkingVerifyServerCertificate failed every thumbprint pin with CERT_E_UNTRUSTEDROOT. The chain is now read through small repr(C) structs. The test builds a chain byte by byte at the documented offsets; the old code returns no certificates for it.
Collaborator
|
Thanks, merged! The offsets match |
rootw0rm
pushed a commit
to rootw0rm/xcl
that referenced
this pull request
Nov 27, 2026
…wports/scissors/topo) into ListDrawRecord List slots xcl-dev#34 (SetGraphicsRootSignature), xcl-dev#50 (OMSetRenderTargets), xcl-dev#47 (IASetIndexBuffer), plus PC-side xcl-dev#20/xcl-dev#21/xcl-dev#22 (topology, viewports, scissors) store into ListDrawRecord. SetPipelineState (xcl-dev#25) now merges instead of overwriting so PSO-first or state-first order both keep the full record. Store-only: no draw, no validation, no execute; triangle/ bias FAILs stay failing. Evidence: new draw_s2_list_state_recorded_pre_draw fails pre-change (S2 symbols absent at HEAD: grep count 0) and passes post; full lib 806 passed, 0 failed, 1 ignored; both cargo checks clean; title null 4 FAILs identical to HEAD-baseline worktree run (triangle, present, bias-xcl-dev#94, all D3D12.X GPU-only, + pre-existing files:delete also on HEAD), delta 0; Vulkan 3 (triangle, bias-xcl-dev#94 + same files:delete); retail HOLDS (exit 139 @ exe+0x2237320, SIGSEGV fault 0, 20 stubs, xgr XAsync/XNetworking/XUser, 0 d3d12).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
extract_chain_certsreadcChain/rgpChainat +16 / +24 andcElement/rgpElementat +20 / +24. Both structs start withcbSizeand an 8-byteCERT_TRUST_STATUS, so inwincrypt.hthe counts are at +12 and the arrays at +16. The walk found no chain, andXNetworkingVerifyServerCertificatefailed every thumbprint pin withCERT_E_UNTRUSTEDROOT. This only affects titles that pass pins; without pins the chain's certificates are not compared.The chain is now read through small
repr(C)structs, like the other CryptoAPI structs in the file, so no newwindows-sysfeature is needed. #37 fixed the same thing and was closed by its author. This is a smaller version of that fix.Validation
chain_certs_read_at_the_sdk_offsetsbuilds a chain byte by byte at the documented offsets. It fails onmain(no certificates come back) and passes with the fix.cargo test -p xcl --lib: 330 passed, 0 failed, on Windows GNU under Wine. I did not run the e2e or GPU tests.