fix(libSceHttp2): accept SSL options on a context #13734

Merged
SnekPolylepis merged 2 commits from upstream-pr/13734 into main 2026-10-31 21:51:27 +00:00
SnekPolylepis commented 2026-10-31 03:20:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by SnekPolylepis on 2026-10-31T03:20:00Z.


What

sceHttp2SslEnableOption and sceHttp2SslDisableOption now accept a context id as well as a template or request. Divinity: Original Sin II (PPSA06866) calls sceHttp2SslEnableOption on its context about 2 s after launch and aborted there (#13715). The flags are stored in the context's settings, which sceHttp2CreateTemplate already copies into each new template. Flags outside 0x3d still throw, a cookie box still throws, and a terminated context returns INVALID_ID.

Source: prosper accepts both calls on any live object. The inheritance by templates created later, and whether existing templates see the change, are not established by any source; both are recorded in docs/dev/debt/libSceHttp2.md.

Fixes #13715.

Tested

Windows 11, WinLibs GCC 15.2.0, Release, BUILD_TESTING=ON: ctest -R http2 passes 8/8. guest_http2 now checks that both calls return 0 on a live context, throw for unsupported flags and a cookie box, and return INVALID_ID after sceHttp2Term. Not run on the title: per #13715 the title then reaches its loading screen and stops on a separate AGC depth-copy error.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: Fixes #13715
  • Unblocks: PPSA06866, no Game bring-up discussion yet (#13715)
  • GPUs tested: n/a
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5094030672 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13734). Originally posted by [SnekPolylepis](https://github.com/SnekPolylepis) on 2026-10-31T03:20:00Z. --- ### What `sceHttp2SslEnableOption` and `sceHttp2SslDisableOption` now accept a context id as well as a template or request. Divinity: Original Sin II (PPSA06866) calls `sceHttp2SslEnableOption` on its context about 2 s after launch and aborted there (#13715). The flags are stored in the context's settings, which `sceHttp2CreateTemplate` already copies into each new template. Flags outside `0x3d` still throw, a cookie box still throws, and a terminated context returns `INVALID_ID`. Source: [prosper](https://github.com/mattias800/prosper/blob/b1bec57186a0/prosper/src/hle/net/hle_http2.cpp#L461-L478) accepts both calls on any live object. The inheritance by templates created later, and whether existing templates see the change, are not established by any source; both are recorded in `docs/dev/debt/libSceHttp2.md`. Fixes #13715. ### Tested Windows 11, WinLibs GCC 15.2.0, Release, `BUILD_TESTING=ON`: `ctest -R http2` passes 8/8. `guest_http2` now checks that both calls return 0 on a live context, throw for unsupported flags and a cookie box, and return `INVALID_ID` after `sceHttp2Term`. Not run on the title: per #13715 the title then reaches its loading screen and stops on a separate AGC depth-copy error. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: Fixes #13715 - [x] Unblocks: PPSA06866, no Game bring-up discussion yet (#13715) - [x] GPUs tested: n/a - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jotitadev commented 2026-10-31 04:11:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-31T04:11:16Z.

Review: COMMENTED


Linux run of this head (a97eb24fed), merged onto main 6475267b45 (local only). Ubuntu 26.04 LTS (kernel 7.0), Intel Core i7-8700, GCC 15.2.0, Ninja, Release, BUILD_TESTING=ON.

  • guest_http2 passes 3 of 3; ctest -R http2 7/7; public_headers passes.
  • Negative control: same tree with Export.cpp back to main (test kept): guest_http2 aborts 3 of 3 with sceHttp2SslEnableOption not implemented.

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5721150814 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13734#pullrequestreview-5721150814). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-31T04:11:16Z. **Review:** COMMENTED --- Linux run of this head (`a97eb24fed`), merged onto `main` `6475267b45` (local only). Ubuntu 26.04 LTS (kernel 7.0), Intel Core i7-8700, GCC 15.2.0, Ninja, Release, `BUILD_TESTING=ON`. - `guest_http2` passes 3 of 3; `ctest -R http2` 7/7; `public_headers` passes. - Negative control: same tree with `Export.cpp` back to `main` (test kept): `guest_http2` aborts 3 of 3 with `sceHttp2SslEnableOption not implemented`. Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
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
boykopovar/AnyPS5!13734
No description provided.