feat(http2): deliver TLS certificate verification callbacks #11586

Merged
JJenkx merged 8 commits from upstream-pr/11586 into main 2026-11-03 21:08:47 +00:00
JJenkx commented 2026-10-26 21:37:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-26T21:37:57Z.


What

sceHttp2SetSslCallback currently throws when a title registers a callback. Preserve the callback/user argument in inherited template/request settings and install an adapter on the actual libSceSsl connection. Deliver the SSL context ID, verification flags and usable peer-certificate handles; zero accepts and nonzero refuses the chain. Clearing the callback preserves ordinary certificate verification.

Reuse #11575's request-callout bookkeeping so a callback can inspect certificates, abort or delete its request without deadlocking. The adapter is detached after the handshake and request cleanup clears its lock reference. Redirected requests verify each new TLS connection. Unknown HTTP2 refusal/error mappings remain explicit failures, documented in debt.

The redirect prerequisite #11575 is now merged into main. The latest review correction removes only the test requiring SSL callback registration on context/cookie-box IDs to throw through an unimplemented path. Implemented registration, clearing, override, invalid-ID and live TLS callback coverage remains.

Tested

Independent re-check by XairRrR: exact documentation-follow-up head e5408c7638f9 merged onto main 5cb015caaaaf, Debian13/GCC14.2 Release; all9 guest_http2* groups plus guest_memory_pool_stats and public_headers pass11/11. Production code and tests remain unchanged from173968c4710.

Documentation-only review follow-up e5408c7638f restores the final newline and blank line before the next debt heading. No production/test source changes; prior runtime evidence remains pinned to its tested commits. Conventions against main 5cb015caaaa and whitespace checks pass.

Exact head 173968c47107bd7bf0182ab4c574b0aae9761b8b, incorporating main b28bb772177768f99874ca38f6252cd0139acf2a. Linux 7.2.11, Ryzen 9 7950X, GCC 16.2.1, Release, independently rebuilt production libSceHttp2 and selected tests.

  • Nine guest_http2* groups plus guest_memory_pool_stats, each repeated three times: 30 passes, zero skips. Includes real loopback TLS certificate verification callbacks, redirects, HTTP/2 transport, early response, roots, options/cookies and teardown.
  • public_headers, check_conventions.py --base b28bb772177768f99874ca38f6252cd0139acf2a and whitespace checks pass.
  • This update changes no callback implementation. B-Howell independently qualified this exact head on Windows 11 Pro 26300 with WinLibs GCC15.2.0r7/UCRT Release: 11 HTTP2/statistics groups each pass three runs (33 passes, zero skips), including callback/redirect groups; public_headers and conventions pass. The same head passes 10 groups three times (30 passes) on Ubuntu22.04/WSL2 with GCC11.4.0. These are their independently reported runs.

Review correction, exact pins, build and repeated-test logs/JUnit, SHA-256 dbbf8a55716a466cf29c06e0458d542f67549ac20104cdef7b1d910e5ba72433.

Earlier TLS callback qualification and prior Windows integrated-child evidence retain their original pins. FAR PPSA03766 reaches the underwater tutorial with this and #11611; that current-main-plus-prerequisites evidence uses historical head 394efb4c75, not this new test-only head. No new native title, console, GPU or performance claim.

Independent AMD recheck of current head e5408c7638: TechLevelZero report, merged onto a4eca2a, RX6300/RADV Mesa25.2.8 on Ubuntu. Reported950 passes,4 failures (zero new:3 also fail on main and1 unstable on main),3 skips, and no new validation IDs across453 GPU tests. This is attributed third-party evidence; the full suite was not all-green. The focused current-head HTTP2 and headers recheck above remains11/11 pass.

Independent Windows title screening reported by xXPBSXx: PPSA06465 on main 7feb37ee3e aborted after 22 seconds with sceHttp2SetSslCallback not implemented; this head e5408c7638 locally merged onto the same main ran for 580 seconds until the script stopped it, without that message or a recorded fatal error. Windows 10, RTX 4080 SUPER, one completed run per arm. Graphics were not reviewed and callback-path execution was not verified. This is attributed third-party startup screening; the live TLS callback tests above provide the callback behaviour evidence.

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 (#11575 merged)
  • Fixes: none
  • Unblocks: PPSA06652 #9639; PPSA03766 #10445 (TLS registration; #11611 additionally required for HTTP/1.x)
  • GPUs tested: n/a
  • AI-assisted: yes (Codex)
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5025037118 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11586). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-10-26T21:37:57Z. --- ### What `sceHttp2SetSslCallback` currently throws when a title registers a callback. Preserve the callback/user argument in inherited template/request settings and install an adapter on the actual libSceSsl connection. Deliver the SSL context ID, verification flags and usable peer-certificate handles; zero accepts and nonzero refuses the chain. Clearing the callback preserves ordinary certificate verification. Reuse #11575's request-callout bookkeeping so a callback can inspect certificates, abort or delete its request without deadlocking. The adapter is detached after the handshake and request cleanup clears its lock reference. Redirected requests verify each new TLS connection. Unknown HTTP2 refusal/error mappings remain explicit failures, documented in debt. The redirect prerequisite #11575 is now merged into main. The latest review correction removes only the test requiring SSL callback registration on context/cookie-box IDs to throw through an unimplemented path. Implemented registration, clearing, override, invalid-ID and live TLS callback coverage remains. ### Tested Independent re-check by [XairRrR](https://github.com/boykopovar/AnyPS5/pull/11586#pullrequestreview-5745035147): exact documentation-follow-up head `e5408c7638f9` merged onto main `5cb015caaaaf`, Debian13/GCC14.2 Release; all9 `guest_http2*` groups plus `guest_memory_pool_stats` and `public_headers` pass11/11. Production code and tests remain unchanged from173968c4710. Documentation-only review follow-up `e5408c7638f` restores the final newline and blank line before the next debt heading. No production/test source changes; prior runtime evidence remains pinned to its tested commits. Conventions against main `5cb015caaaa` and whitespace checks pass. Exact head `173968c47107bd7bf0182ab4c574b0aae9761b8b`, incorporating main `b28bb772177768f99874ca38f6252cd0139acf2a`. Linux 7.2.11, Ryzen 9 7950X, GCC 16.2.1, Release, independently rebuilt production libSceHttp2 and selected tests. - Nine `guest_http2*` groups plus `guest_memory_pool_stats`, each repeated three times: 30 passes, zero skips. Includes real loopback TLS certificate verification callbacks, redirects, HTTP/2 transport, early response, roots, options/cookies and teardown. - `public_headers`, `check_conventions.py --base b28bb772177768f99874ca38f6252cd0139acf2a` and whitespace checks pass. - This update changes no callback implementation. [B-Howell independently qualified this exact head on Windows 11 Pro 26300](https://github.com/boykopovar/AnyPS5/pull/11586#issuecomment-6583618116) with WinLibs GCC15.2.0r7/UCRT Release: 11 HTTP2/statistics groups each pass three runs (33 passes, zero skips), including callback/redirect groups; public_headers and conventions pass. The same head passes 10 groups three times (30 passes) on Ubuntu22.04/WSL2 with GCC11.4.0. These are their independently reported runs. [Review correction, exact pins, build and repeated-test logs/JUnit](https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/pr11586-review-173968c471-linux-20261102.tar.gz), SHA-256 `dbbf8a55716a466cf29c06e0458d542f67549ac20104cdef7b1d910e5ba72433`. Earlier [TLS callback qualification](https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/http2-ssl-internal-helper-linux-20261026.tar.gz) and [prior Windows integrated-child evidence](https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/owned-current-windows-20261030-repeat2.tar.gz) retain their original pins. FAR PPSA03766 reaches the underwater tutorial with this and #11611; that [current-main-plus-prerequisites evidence](https://github.com/boykopovar/AnyPS5/pull/14266#issuecomment-6583048034) uses historical head `394efb4c75`, not this new test-only head. No new native title, console, GPU or performance claim. Independent AMD recheck of current head `e5408c7638`: [TechLevelZero report](https://github.com/boykopovar/AnyPS5/pull/11586#issuecomment-6591979317), merged onto `a4eca2a`, RX6300/RADV Mesa25.2.8 on Ubuntu. Reported950 passes,4 failures (zero new:3 also fail on main and1 unstable on main),3 skips, and no new validation IDs across453 GPU tests. This is attributed third-party evidence; the full suite was not all-green. The focused current-head HTTP2 and headers recheck above remains11/11 pass. Independent [Windows title screening reported by xXPBSXx](https://github.com/boykopovar/AnyPS5/pull/11586#issuecomment-6596969997): PPSA06465 on main `7feb37ee3e` aborted after 22 seconds with `sceHttp2SetSslCallback not implemented`; this head `e5408c7638` locally merged onto the same main ran for 580 seconds until the script stopped it, without that message or a recorded fatal error. Windows 10, RTX 4080 SUPER, one completed run per arm. Graphics were not reviewed and callback-path execution was not verified. This is attributed third-party startup screening; the live TLS callback tests above provide the callback behaviour evidence. <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> ### 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: <!-- #PR, or none --> none (#11575 merged) - [x] Fixes: <!-- issue it closes as Fixes #N, or none --> none - [x] Unblocks: <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> PPSA06652 #9639; PPSA03766 #10445 (TLS registration; #11611 additionally required for HTTP/1.x) - [x] GPUs tested: <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> n/a - [x] AI-assisted: <!-- yes / no --> yes (Codex)
MarcZX10 commented 2026-10-26 22:12:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-26T22:12:12Z.

Review: APPROVED


Reviewed the feature delta against #11575: callback settings are snapshotted into the request, the adapter forwards the SSL context, verification flags, certificate handles and user argument, maps zero/nonzero to accept/refuse, and is detached after the TLS handshake. InvokeCallback releases the request lock for the user callback and restores it on both return and exception; the added cases exercise real certificate inspection, untrusted/host-name flags, refusal, clearing, snapshot/override, abort/delete, exceptions and redirected TLS hops. The PR correctly declares its dependency and documents unverified console scheduling/error mappings. The author reports all six Linux HTTP2 groups passing and a native title run reaching the separate HTTP/1.x transport gap; Windows is untested. Hosted policy checks pass, while product builds are skipped by path policy. I did not run the full transport suite locally.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5659806260 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11586#pullrequestreview-5659806260). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-26T22:12:12Z. **Review:** APPROVED --- Reviewed the feature delta against #11575: callback settings are snapshotted into the request, the adapter forwards the SSL context, verification flags, certificate handles and user argument, maps zero/nonzero to accept/refuse, and is detached after the TLS handshake. `InvokeCallback` releases the request lock for the user callback and restores it on both return and exception; the added cases exercise real certificate inspection, untrusted/host-name flags, refusal, clearing, snapshot/override, abort/delete, exceptions and redirected TLS hops. The PR correctly declares its dependency and documents unverified console scheduling/error mappings. The author reports all six Linux HTTP2 groups passing and a native title run reaching the separate HTTP/1.x transport gap; Windows is untested. Hosted policy checks pass, while product builds are skipped by path policy. I did not run the full transport suite locally.
XairRrR commented 2026-11-02 23:10:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-02T23:10:17Z.

Review: APPROVED


Reviewed — approved

sceHttp2SetSslCallback now saves the callback in the template and request settings and installs it on the libSceSsl connection for each TLS handshake. The checks, the HTTP2 tests and two negative controls all came out as expected, and I found nothing blocking.

What I ran

Head 173968c47107bd7bf0182ab4c574b0aae9761b8b, merged with --no-ff into main 5cb015caaaaf83f8ee431414ee6a457b5b307d49 (merged tree 165b2a148ec08a4fceb83e770550ec1c3f39275a). Debian 13 VM, Xeon Gold 6136, GCC 14.2.0, Release, Ninja, BUILD_TESTING=ON.

git diff --check 5cb015caaaaf83f8ee431414ee6a457b5b307d49...173968c47107bd7bf0182ab4c574b0aae9761b8b
python3 tools/check_conventions.py --base 5cb015caaaaf83f8ee431414ee6a457b5b307d49
ctest --test-dir build -j8 --test-load 32 --output-on-failure -R "^(guest_http2.*|guest_memory_pool_stats|public_headers)$" --repeat until-fail:3
ctest --test-dir build --output-on-failure -R "^(agc_driver_image_sample_lod_clamp_shader_lane|unwrap_self_UnwrapTest_test_new_output_inherits_the_destination_directory_group)$"
ldd build/tests/agc_driver_image_sample_lod_clamp_tests
# negative controls (see below), then restore and:
ninja -C build -j32 -l32 libSceHttp2 guest_http2_tests guest_http2_transport_tests
ctest --test-dir build -j8 --test-load 32 -R "^guest_http2"

Results

Check Result
git diff --check clean
check_conventions.py All conventions checks passed
Configure / build / libs OK (from the script's build)
All 9 guest_http2* tests, guest_memory_pool_stats, public_headers, 3 runs each 11/11 pass in every run. guest_http2_ssl_callbacks takes about 2.3 s; the slowest HTTP2 test is guest_http2_redirects at about 13.3 s.
agc_driver_image_sample_lod_clamp_shader_lane Fails, but it is not caused by this PR (see below)
unwrap_self_..._destination_directory_group Fails, but it is not caused by this PR (see below)
Rerun of the guest_http2 tests after restoring the merged tree 9/9 pass

The build script listed two new failures. Neither comes from this PR:

  • AGC test: the AGC test binary does not link libSceHttp2 (ldd shows no HTTP library), and the PR touches nothing under the AGC driver or the shader recompiler.
  • Python test: unwrap_self is a Python tool test that fails at os.chown(...) with EINVAL in the sandbox's /tmp. The PR changes no file under tools/.

The failure baseline was measured on an older main (096c45570f). I attribute both failures to main or to this environment.

Failure excerpts
AGC graphics: image_sample_lz through the S# that holds the LOD at 0 ... thread 0 component 1 is 0.000000, expected 0.062500
---
  File "tools/tests/test_unwrap_self.py", line 474, in test_new_output_inherits_the_destination_directory_group
    os.chown(directory, -1, group)
OSError: [Errno 22] Invalid argument

Negative control

  1. All production files from main. I restored Export.cpp, Transport.cpp, Transport.hpp and include/Http2.hpp from main. The test sources then fail to compile, because main's void* cbFunc parameter does not accept the typed callback (invalid conversion from 'int (*)(int, unsigned int, void* const*, int, void*)' to 'void*').
  2. Only the setter body from main. With the merged files, I put back only main's throwing body of sceHttp2SetSslCallback (the NotImplemented_nid_no_patch call). guest_http2 and guest_http2_ssl_callbacks abort, and guest_http2_redirects still passes. This is consistent with BunnyFl's earlier Windows control.
  3. Adapter never installed. With the merged files, I disabled only the sceSslSetVerifyCallback(ssl, Verify_nid_no_patch, this) installation at Transport.cpp:509. guest_http2_ssl_callbacks fails, so the test checks that the callback is actually delivered, not only that registering it is accepted.

After the controls I restored the merged files, rebuilt, and the guest_http2* tests passed again. git status --porcelain is empty.

Findings

Blocking

None.

Non-blocking

  • Missing final newline in docs/dev/debt/libSceHttp2.md. The PR's only change to the last line of the file (L52) removes the final newline; main ends the file with \n. It does no harm, but it adds an unrelated diff line and will annoy the next editor. Suggested fix: restore the trailing newline.
  • No blank line before the next heading. The new "libSceHttp2 SSL callbacks" entry (L49-L50) runs straight into ### Additional PS5 3.20 imports. Suggested fix: add a blank line between them, as the other sections do.

Code notes (no action needed)

  • Accept/refuse mapping. libSceSsl's RunCallback refuses only when the callback returns a negative value (libSceSsl/Export.cpp L925-L933). The adapter turns any nonzero result into -1 (Transport.cpp L376-L384), so the "nonzero refuses" rule in the debt entry holds; test mode 3 returns 7 and covers it.
  • Abort and delete from inside the callback.
    • The adapter binds *state.callbackLock before InvokeCallback releases the request mutex. When sceHttp2DeleteRequest → Stop() → Close() clears callbackLock and deletes the SSL connection during the callback, the frame still holds a valid lock reference.
    • libSceSsl keeps its Session alive through a shared_ptr in Establish, and Check() then throws "cancelled".
    • The exception unwinds through RunCallback, leaving session.verifying set, but Fail() deletes that connection, so the flag is never read again. Modes 6, 7 and 8 exercise these paths, and they pass.
  • Unsupported verification failures. When a callback is set and the chain fails a check no verify option names, libSceSsl throws (L988-L989). The new debt entry covers this ("unsupported verification failures throw").
  • Removed assertion. B-Howell asked to drop the test that required context/cookie-box registration to throw. It is gone, and the context/box Update() path in Export.cpp still throws.

Not verified

  • Windows/MinGW: not built here. Other people's Windows runs of this exact head are in the discussion.
  • Console behaviour: when the callback is scheduled and which HTTP2 error codes refusals map to are, as the debt entry says, unverified.
  • Title runs: none launched, by policy.
  • Vulkan validation: skipped by the script. It does not apply, because no AGC, shader recompiler or VideoOut file changed.
  • The external release tarballs linked in the description: not downloaded.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5744738832 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11586#pullrequestreview-5744738832). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-02T23:10:17Z. **Review:** APPROVED --- # Reviewed — approved `sceHttp2SetSslCallback` now saves the callback in the template and request settings and installs it on the libSceSsl connection for each TLS handshake. The checks, the HTTP2 tests and two negative controls all came out as expected, and I found nothing blocking. ## What I ran Head `173968c47107bd7bf0182ab4c574b0aae9761b8b`, merged with `--no-ff` into `main` `5cb015caaaaf83f8ee431414ee6a457b5b307d49` (merged tree `165b2a148ec08a4fceb83e770550ec1c3f39275a`). Debian 13 VM, Xeon Gold 6136, GCC 14.2.0, Release, Ninja, `BUILD_TESTING=ON`. ``` git diff --check 5cb015caaaaf83f8ee431414ee6a457b5b307d49...173968c47107bd7bf0182ab4c574b0aae9761b8b python3 tools/check_conventions.py --base 5cb015caaaaf83f8ee431414ee6a457b5b307d49 ctest --test-dir build -j8 --test-load 32 --output-on-failure -R "^(guest_http2.*|guest_memory_pool_stats|public_headers)$" --repeat until-fail:3 ctest --test-dir build --output-on-failure -R "^(agc_driver_image_sample_lod_clamp_shader_lane|unwrap_self_UnwrapTest_test_new_output_inherits_the_destination_directory_group)$" ldd build/tests/agc_driver_image_sample_lod_clamp_tests # negative controls (see below), then restore and: ninja -C build -j32 -l32 libSceHttp2 guest_http2_tests guest_http2_transport_tests ctest --test-dir build -j8 --test-load 32 -R "^guest_http2" ``` ## Results | Check | Result | |---|---| | `git diff --check` | clean | | `check_conventions.py` | All conventions checks passed | | Configure / build / `libs` | OK (from the script's build) | | All 9 `guest_http2*` tests, `guest_memory_pool_stats`, `public_headers`, 3 runs each | 11/11 pass in every run. `guest_http2_ssl_callbacks` takes about 2.3 s; the slowest HTTP2 test is `guest_http2_redirects` at about 13.3 s. | | `agc_driver_image_sample_lod_clamp_shader_lane` | Fails, but it is not caused by this PR (see below) | | `unwrap_self_..._destination_directory_group` | Fails, but it is not caused by this PR (see below) | | Rerun of the `guest_http2` tests after restoring the merged tree | 9/9 pass | The build script listed two new failures. Neither comes from this PR: - **AGC test:** the AGC test binary does not link `libSceHttp2` (`ldd` shows no HTTP library), and the PR touches nothing under the AGC driver or the shader recompiler. - **Python test:** `unwrap_self` is a Python tool test that fails at `os.chown(...)` with `EINVAL` in the sandbox's `/tmp`. The PR changes no file under `tools/`. The failure baseline was measured on an older `main` (`096c45570f`). I attribute both failures to `main` or to this environment. <details><summary>Failure excerpts</summary> ``` AGC graphics: image_sample_lz through the S# that holds the LOD at 0 ... thread 0 component 1 is 0.000000, expected 0.062500 --- File "tools/tests/test_unwrap_self.py", line 474, in test_new_output_inherits_the_destination_directory_group os.chown(directory, -1, group) OSError: [Errno 22] Invalid argument ``` </details> ## Negative control 1. **All production files from `main`.** I restored `Export.cpp`, `Transport.cpp`, `Transport.hpp` and `include/Http2.hpp` from `main`. The test sources then fail to compile, because `main`'s `void* cbFunc` parameter does not accept the typed callback (`invalid conversion from 'int (*)(int, unsigned int, void* const*, int, void*)' to 'void*'`). 2. **Only the setter body from `main`.** With the merged files, I put back only `main`'s throwing body of `sceHttp2SetSslCallback` (the `NotImplemented_nid_no_patch` call). `guest_http2` and `guest_http2_ssl_callbacks` abort, and `guest_http2_redirects` still passes. This is consistent with BunnyFl's earlier Windows control. 3. **Adapter never installed.** With the merged files, I disabled only the `sceSslSetVerifyCallback(ssl, Verify_nid_no_patch, this)` installation at `Transport.cpp:509`. `guest_http2_ssl_callbacks` fails, so the test checks that the callback is actually delivered, not only that registering it is accepted. After the controls I restored the merged files, rebuilt, and the `guest_http2*` tests passed again. `git status --porcelain` is empty. ## Findings ### Blocking None. ### Non-blocking - **Missing final newline in `docs/dev/debt/libSceHttp2.md`.** The PR's only change to the last line of the file ([L52](https://github.com/boykopovar/AnyPS5/blob/173968c47107bd7bf0182ab4c574b0aae9761b8b/docs/dev/debt/libSceHttp2.md#L52)) removes the final newline; `main` ends the file with `\n`. It does no harm, but it adds an unrelated diff line and will annoy the next editor. Suggested fix: restore the trailing newline. - **No blank line before the next heading.** The new "libSceHttp2 SSL callbacks" entry ([L49-L50](https://github.com/boykopovar/AnyPS5/blob/173968c47107bd7bf0182ab4c574b0aae9761b8b/docs/dev/debt/libSceHttp2.md#L49-L50)) runs straight into `### Additional PS5 3.20 imports`. Suggested fix: add a blank line between them, as the other sections do. ### Code notes (no action needed) - **Accept/refuse mapping.** libSceSsl's `RunCallback` refuses only when the callback returns a negative value ([libSceSsl/Export.cpp L925-L933](https://github.com/boykopovar/AnyPS5/blob/173968c47107bd7bf0182ab4c574b0aae9761b8b/core/libs/prx/libSceSsl/Export.cpp#L925-L933)). The adapter turns any nonzero result into `-1` ([Transport.cpp L376-L384](https://github.com/boykopovar/AnyPS5/blob/173968c47107bd7bf0182ab4c574b0aae9761b8b/core/libs/prx/libSceHttp2/Transport.cpp#L376-L384)), so the "nonzero refuses" rule in the debt entry holds; test mode 3 returns `7` and covers it. - **Abort and delete from inside the callback.** - The adapter binds `*state.callbackLock` before `InvokeCallback` releases the request mutex. When `sceHttp2DeleteRequest` → `Stop()` → `Close()` clears `callbackLock` and deletes the SSL connection during the callback, the frame still holds a valid lock reference. - libSceSsl keeps its `Session` alive through a `shared_ptr` in `Establish`, and `Check()` then throws "cancelled". - The exception unwinds through `RunCallback`, leaving `session.verifying` set, but `Fail()` deletes that connection, so the flag is never read again. Modes 6, 7 and 8 exercise these paths, and they pass. - **Unsupported verification failures.** When a callback is set and the chain fails a check no verify option names, libSceSsl throws ([L988-L989](https://github.com/boykopovar/AnyPS5/blob/173968c47107bd7bf0182ab4c574b0aae9761b8b/core/libs/prx/libSceSsl/Export.cpp#L988-L989)). The new debt entry covers this ("unsupported verification failures throw"). - **Removed assertion.** B-Howell asked to drop the test that required context/cookie-box registration to throw. It is gone, and the context/box `Update()` path in `Export.cpp` still throws. ## Not verified - Windows/MinGW: not built here. Other people's Windows runs of this exact head are in the discussion. - Console behaviour: when the callback is scheduled and which HTTP2 error codes refusals map to are, as the debt entry says, unverified. - Title runs: none launched, by policy. - Vulkan validation: skipped by the script. It does not apply, because no AGC, shader recompiler or VideoOut file changed. - The external release tarballs linked in the description: not downloaded. <!-- anyps5-bots job=2257 head=173968c47107bd7bf0182ab4c574b0aae9761b8b -->
XairRrR commented 2026-11-02 23:44:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-02T23:44:51Z.

Review: APPROVED


Re-checked — approved

The only new commit, e5408c7638, fixes both debt-doc whitespace nits from my last review. Nothing else in the PR changed, and the checks and HTTP2 tests still pass.

What changed since my last review

  • One new commit, e5408c7638 ("docs(http2): separate SSL callback debt sections"). It changes only docs/dev/debt/libSceHttp2.md, adding 2 lines and removing 1.
  • The five earlier commits are identical, according to the range-diff.
  • Production code and tests are unchanged since 173968c471, which I reviewed last time.
  • The author's reply on 2026-11-02 says the same thing, and the diff confirms it.

What I ran

Head e5408c7638f9f68f2e86dee1a8bdf55517b26bd2, merged with --no-ff into main 5cb015caaaaf83f8ee431414ee6a457b5b307d49 (merged tree 399e914006c1fcc62092ded1e8d26af9b750205d). Debian 13 VM, Xeon Gold 6136, GCC 14.2.0, Release, Ninja, BUILD_TESTING=ON.

git diff 173968c47107bd7bf0182ab4c574b0aae9761b8b e5408c7638f9f68f2e86dee1a8bdf55517b26bd2
git diff --check 5cb015caaaaf83f8ee431414ee6a457b5b307d49...e5408c7638f9f68f2e86dee1a8bdf55517b26bd2
python3 tools/check_conventions.py --base 5cb015caaaaf83f8ee431414ee6a457b5b307d49
ctest --test-dir build -j8 --test-load 32 --output-on-failure -R "^(guest_http2.*|guest_memory_pool_stats|public_headers)$"
Check Result
Delta since 173968c471 Only docs/dev/debt/libSceHttp2.md changed
git diff --check clean
check_conventions.py All conventions checks passed
Configure / build / libs OK (from the script's build)
All 9 guest_http2* tests, guest_memory_pool_stats, public_headers 11/11 pass (guest_http2_ssl_callbacks 2.4 s, guest_http2_redirects 13.6 s)
Script-reported failures (agc_driver_image_sample_lod_clamp_shader_lane, unwrap_self_..._destination_directory_group) The same two failures as at the previous head. Neither comes from this PR, for the reasons in my last review: no AGC or tools/ files changed.

Negative control: I did not repeat it. No test or production file changed since 173968c471, so the controls from my previous review still apply.

Previous findings

  • Resolved: missing final newline in docs/dev/debt/libSceHttp2.md. The file now ends with \n, and the merged diff against main no longer touches the last line.
  • Resolved: no blank line before ### Additional PS5 3.20 imports. There is now a blank line between the SSL callbacks entry and that heading (L49-L51).

New findings

Blocking

None.

Non-blocking

None.

Not verified

  • Windows/MinGW: not built here. The Windows runs in the discussion are for 173968c471 and earlier heads. Since then only the doc changed.
  • Console behaviour: as the debt entry says, callback scheduling and the HTTP2 error codes for refusals are unverified.
  • Title runs: none launched, by policy.
  • Vulkan validation: skipped by the script, and it does not apply here because no AGC, shader recompiler or VideoOut file changed.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5745035147 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11586#pullrequestreview-5745035147). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-02T23:44:51Z. **Review:** APPROVED --- # Re-checked — approved The only new commit, `e5408c7638`, fixes both debt-doc whitespace nits from my last review. Nothing else in the PR changed, and the checks and HTTP2 tests still pass. ## What changed since my last review - One new commit, `e5408c7638` ("docs(http2): separate SSL callback debt sections"). It changes only `docs/dev/debt/libSceHttp2.md`, adding 2 lines and removing 1. - The five earlier commits are identical, according to the range-diff. - Production code and tests are unchanged since `173968c471`, which I reviewed last time. - The author's reply on 2026-11-02 says the same thing, and the diff confirms it. ## What I ran Head `e5408c7638f9f68f2e86dee1a8bdf55517b26bd2`, merged with `--no-ff` into `main` `5cb015caaaaf83f8ee431414ee6a457b5b307d49` (merged tree `399e914006c1fcc62092ded1e8d26af9b750205d`). Debian 13 VM, Xeon Gold 6136, GCC 14.2.0, Release, Ninja, `BUILD_TESTING=ON`. ``` git diff 173968c47107bd7bf0182ab4c574b0aae9761b8b e5408c7638f9f68f2e86dee1a8bdf55517b26bd2 git diff --check 5cb015caaaaf83f8ee431414ee6a457b5b307d49...e5408c7638f9f68f2e86dee1a8bdf55517b26bd2 python3 tools/check_conventions.py --base 5cb015caaaaf83f8ee431414ee6a457b5b307d49 ctest --test-dir build -j8 --test-load 32 --output-on-failure -R "^(guest_http2.*|guest_memory_pool_stats|public_headers)$" ``` | Check | Result | |---|---| | Delta since `173968c471` | Only `docs/dev/debt/libSceHttp2.md` changed | | `git diff --check` | clean | | `check_conventions.py` | All conventions checks passed | | Configure / build / `libs` | OK (from the script's build) | | All 9 `guest_http2*` tests, `guest_memory_pool_stats`, `public_headers` | 11/11 pass (`guest_http2_ssl_callbacks` 2.4 s, `guest_http2_redirects` 13.6 s) | | Script-reported failures (`agc_driver_image_sample_lod_clamp_shader_lane`, `unwrap_self_..._destination_directory_group`) | The same two failures as at the previous head. Neither comes from this PR, for the reasons in my last review: no AGC or `tools/` files changed. | **Negative control:** I did not repeat it. No test or production file changed since `173968c471`, so the controls from my previous review still apply. ## Previous findings - **Resolved:** missing final newline in `docs/dev/debt/libSceHttp2.md`. The file now ends with `\n`, and the merged diff against `main` no longer touches the last line. - **Resolved:** no blank line before `### Additional PS5 3.20 imports`. There is now a blank line between the SSL callbacks entry and that heading ([L49-L51](https://github.com/boykopovar/AnyPS5/blob/e5408c7638f9f68f2e86dee1a8bdf55517b26bd2/docs/dev/debt/libSceHttp2.md#L49-L51)). ## New findings ### Blocking None. ### Non-blocking None. ## Not verified - **Windows/MinGW:** not built here. The Windows runs in the discussion are for `173968c471` and earlier heads. Since then only the doc changed. - **Console behaviour:** as the debt entry says, callback scheduling and the HTTP2 error codes for refusals are unverified. - **Title runs:** none launched, by policy. - **Vulkan validation:** skipped by the script, and it does not apply here because no AGC, shader recompiler or VideoOut file changed. <!-- anyps5-bots job=2831 head=e5408c7638f9f68f2e86dee1a8bdf55517b26bd2 -->
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!11586
No description provided.