fix(libSceHttp2): return the console codes for failed TLS handshakes #11922

Merged
hugodearaujo merged 11 commits from upstream-pr/11922 into main 2026-11-04 03:58:02 +00:00
hugodearaujo commented 2026-10-27 12:36:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by hugodearaujo on 2026-10-27T12:36:44Z.


What

sceHttp2SendRequest threw (sceHttp2: TLS failed; console error mapping is unknown) whenever sceSslConnect failed. A PS5 payload measured what the console returns against TLS servers it ran itself on the loopback address (a TLS 1.2 server with a self-signed certificate, and servers that close, reset, send a fatal alert or answer in plain text after the ClientHello), with version 2 (HTTP/1.1) and version 3 (HTTP/2) templates. The console returns sceSslConnect's failure unchanged, and the transport now does the same for the seven measured results:

Handshake failure Result
Certificate not trusted 0x8095F00C
Certificate issued for another host 0x8095F00B
Expired certificate, after sceHttp2SslEnableOption(0x8) 0x8095F00D
Fatal alert 0x8095F010
Peer closes 0x8095170D
Peer resets 0x80410136
Reply that is not TLS 0x80951D78

sceSslConnect on a plain socket returned the same codes in the same cases, so these are libSceSsl's results passed through. Any other sceSslConnect failure still throws. With libSceSsl as it is, the transport reaches five of these: libSceSsl reports a reset during the handshake as 0x8095170D and throws for a reply that is not TLS, so the last two rows need a libSceSsl change first (recorded in the debt entry).

After a failed send the console answers the other calls the same way whatever the failure was, and so does the transport now: sceHttp2GetStatusCode returns 0 and stores 0, sceHttp2GetResponseContentLength and sceHttp2ReadData return 0x817B1065 and leave their outputs alone, and another sceHttp2SendRequest returns the same error. This also covers a refused connection, whose status call used to return 0x8041013D.

A fresh template does not check the certificate's expiry on the console: with default options a trusted but expired certificate was accepted and the request completed (status 200, body read), and only after sceHttp2SslEnableOption(0x8) did the send return 0x8095F00D. The template default here includes 0x8, so that request fails with 0x8095F00D; this PR leaves the default as it is.

Lookup failures, timeouts and failures after the handshake still throw: they were measured too, but no title reaches them yet.

Console lines (system software 13.590.001, payload process):

C|T1-untrusted-v2-post|send|rc=8095f00c|us=101913
C|T2-untrusted-v3-get|send|rc=8095f00c|us=102181
C|N1-wrongname-v2|send|rc=8095f00b|us=102453
C|N2-wrongname-v3|send|rc=8095f00b|us=102186
C|E1-expired-default-v2|send|rc=00000000|us=204486
C|E2-expired-notafter-v2|send|rc=8095f00d|us=102302
C|H3-alert-v2|send|rc=8095f010|us=2557
C|H7-alert-v3|send|rc=8095f010|us=2553
C|H4-close-v2|send|rc=8095170d|us=2626
C|H8-close-v3|send|rc=8095170d|us=2677
C|H1-reset-v2|send|rc=80410136|us=2475
C|H5-reset-v3|send|rc=80410136|us=2558
C|H2-garbage-v2|send|rc=80951d78|us=2580
C|H6-garbage-v3|send|rc=80951d78|us=2588
C|T1-untrusted-v2-post|status|rc=00000000|status=0
C|T1-untrusted-v2-post|length|rc=817b1065|kind=-7|len=43690
C|T1-untrusted-v2-post|read0|rc=817b1065|us=1335|buf=
C|T1-untrusted-v2-post|send-again|rc=8095f00c|us=1260
C|R1-refused-v2|status|rc=00000000|status=0
C|R1-refused-v2|length|rc=817b1065|kind=-7|len=43690
C|R1-refused-v2|read0|rc=817b1065|us=1191|buf=
C|R1-refused-v2|send-again|rc=8041013d|us=1222
C|E1-expired-default-v2|status|rc=00000000|status=200
C|E1-expired-default-v2|length|rc=00000000|kind=0|len=5
C|E1-expired-default-v2|read0|rc=00000005|us=1320|buf=hello
E|enable-0x8|rc=00000000
C|E2-expired-notafter-v2|status|rc=00000000|status=0
C|E2-expired-notafter-v2|length|rc=817b1065|kind=-7|len=43690
C|E2-expired-notafter-v2|read0|rc=817b1065|us=1823|buf=
C|E2-expired-notafter-v2|send-again|rc=8095f00d|us=1617
SSL|L1-untrusted|sslconnect=8095f00c|us=100781
SSL|L3-reset-after-hello|sslconnect=80410136|us=1349
SSL|L4-garbage-after-hello|sslconnect=80951d78|us=1449

Tested

  • Linux (Arch, GCC 16.2.1, Release) on main 5454cd2e45: ctest -R guest_http2 passes (7 tests), 3 runs in a row. GuestHttp2Transport.cpp now checks against loopback servers an untrusted certificate (0x8095F00C), a host name the certificate does not cover (0x8095F00B), an expired certificate after sceHttp2SslEnableOption(0x8) (0x8095F00D), a server that closes after the ClientHello (0x8095170D) and one that answers it with a fatal alert (0x8095F010), and after each of these and after a refused connection, the status, content length, read and repeated send results.
  • main 9f748f4d8e merged in (0d054bf053): main's gzip inflation work conflicted in Transport.cpp (constants side by side), in the transport test's Mode list and next to Failure (gzip scenarios added there; this PR's Failure keeps no host name flag, since that case moved to Handshake), and in the debt file. ctest -R guest_http2: 7 of 7, three times in a row, gzip scenarios included; with only main's Transport.cpp, guest_http2_transport still aborts at the first handshake case.
  • Control: the same tests against main's Transport.cpp: the handshake cases abort with sceHttp2: TLS failed; console error mapping is unknown (the expired one included, run first to check) and the refused case fails its status check; with this change all pass.
  • Resets and replies that are not TLS are passed through but not tested here: the host libSceSsl currently reports a reset during the handshake as 0x8095170D and throws for a reply that is not TLS, where the console's sceSslConnect returned 0x80410136 and 0x80951D78.
  • With #11611: its HTTP/1.x path goes through the same Connect(), so the change covers it. The only textual conflict in Transport.cpp is the placement after #11586's callback cleanup. On main + #11611 + this change all 8 HTTP2 test groups pass; one #11611 case changes (an untrusted chain without a callback now returns 0x8095F00C).
  • Alan Wake 2 (PPSA02572 01.200.007): with main + #11611 it aborts at 65 s on its first telemetry POST (sceHttp2: TLS failed; console error mapping is unknown), because the server's certificate cannot be verified without #11145. With this change added and no #11145 it ran the whole 600 s and reached the same license agreement screen as with #11145. The title logs its own exporter error for each failed send ([OTLP HTTP Client] Session state: request send failed.request failed, 16 times in 600 s) and retries about every 31 s. A logging build of the same change on an earlier main showed each of those sends returning 0x8095F00C.
  • main 04a9eb4fa2 merged in (6dd4bcd43a), after #11586 landed:
    • The conflict in Transport.cpp was the placement after #11586's callback cleanup. The cleanup runs first, then the measured codes are returned.
    • guest_http2_ssl_callbacks changes in one mode only. Mode 5, an untrusted chain with the callback cleared, now expects 0x8095F00C, the code the console returned for that chain (L1-untrusted above), instead of a throw.
    • A callback refusal (modes 2 and 3) still throws: libSceSsl reports it as 0x8095F0FD, which is not among the measured codes. Aborting, deleting or throwing from the callback (modes 6 to 8) also still throws.
    • ctest -R guest_http2: 9 of 9.
  • tools/check_conventions.py passes. Not tested on Windows.

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. #11586, and #11611 on top of it, conflict with this textually in Transport.cpp (the new line goes right after #11586's TLS callback cleanup) and in the transport test and debt files; proposed order: this PR first, then #11586 and #11611 rebase onto it. Alan Wake 2 also needs #11611 for its HTTP/1.1 requests.
  • Fixes: none
  • Unblocks: PPSA02572 #7303 together with #11611 (past the 65 s TLS stop)
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5034005647 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11922). Originally posted by [hugodearaujo](https://github.com/hugodearaujo) on 2026-10-27T12:36:44Z. --- ### What `sceHttp2SendRequest` threw (`sceHttp2: TLS failed; console error mapping is unknown`) whenever `sceSslConnect` failed. A PS5 payload measured what the console returns against TLS servers it ran itself on the loopback address (a TLS 1.2 server with a self-signed certificate, and servers that close, reset, send a fatal alert or answer in plain text after the ClientHello), with version 2 (HTTP/1.1) and version 3 (HTTP/2) templates. The console returns `sceSslConnect`'s failure unchanged, and the transport now does the same for the seven measured results: | Handshake failure | Result | |---|---| | Certificate not trusted | `0x8095F00C` | | Certificate issued for another host | `0x8095F00B` | | Expired certificate, after `sceHttp2SslEnableOption(0x8)` | `0x8095F00D` | | Fatal alert | `0x8095F010` | | Peer closes | `0x8095170D` | | Peer resets | `0x80410136` | | Reply that is not TLS | `0x80951D78` | `sceSslConnect` on a plain socket returned the same codes in the same cases, so these are libSceSsl's results passed through. Any other `sceSslConnect` failure still throws. With libSceSsl as it is, the transport reaches five of these: libSceSsl reports a reset during the handshake as `0x8095170D` and throws for a reply that is not TLS, so the last two rows need a libSceSsl change first (recorded in the debt entry). After a failed send the console answers the other calls the same way whatever the failure was, and so does the transport now: `sceHttp2GetStatusCode` returns 0 and stores 0, `sceHttp2GetResponseContentLength` and `sceHttp2ReadData` return `0x817B1065` and leave their outputs alone, and another `sceHttp2SendRequest` returns the same error. This also covers a refused connection, whose status call used to return `0x8041013D`. A fresh template does not check the certificate's expiry on the console: with default options a trusted but expired certificate was accepted and the request completed (status 200, body read), and only after `sceHttp2SslEnableOption(0x8)` did the send return `0x8095F00D`. The template default here includes `0x8`, so that request fails with `0x8095F00D`; this PR leaves the default as it is. Lookup failures, timeouts and failures after the handshake still throw: they were measured too, but no title reaches them yet. Console lines (system software 13.590.001, payload process): ``` C|T1-untrusted-v2-post|send|rc=8095f00c|us=101913 C|T2-untrusted-v3-get|send|rc=8095f00c|us=102181 C|N1-wrongname-v2|send|rc=8095f00b|us=102453 C|N2-wrongname-v3|send|rc=8095f00b|us=102186 C|E1-expired-default-v2|send|rc=00000000|us=204486 C|E2-expired-notafter-v2|send|rc=8095f00d|us=102302 C|H3-alert-v2|send|rc=8095f010|us=2557 C|H7-alert-v3|send|rc=8095f010|us=2553 C|H4-close-v2|send|rc=8095170d|us=2626 C|H8-close-v3|send|rc=8095170d|us=2677 C|H1-reset-v2|send|rc=80410136|us=2475 C|H5-reset-v3|send|rc=80410136|us=2558 C|H2-garbage-v2|send|rc=80951d78|us=2580 C|H6-garbage-v3|send|rc=80951d78|us=2588 C|T1-untrusted-v2-post|status|rc=00000000|status=0 C|T1-untrusted-v2-post|length|rc=817b1065|kind=-7|len=43690 C|T1-untrusted-v2-post|read0|rc=817b1065|us=1335|buf= C|T1-untrusted-v2-post|send-again|rc=8095f00c|us=1260 C|R1-refused-v2|status|rc=00000000|status=0 C|R1-refused-v2|length|rc=817b1065|kind=-7|len=43690 C|R1-refused-v2|read0|rc=817b1065|us=1191|buf= C|R1-refused-v2|send-again|rc=8041013d|us=1222 C|E1-expired-default-v2|status|rc=00000000|status=200 C|E1-expired-default-v2|length|rc=00000000|kind=0|len=5 C|E1-expired-default-v2|read0|rc=00000005|us=1320|buf=hello E|enable-0x8|rc=00000000 C|E2-expired-notafter-v2|status|rc=00000000|status=0 C|E2-expired-notafter-v2|length|rc=817b1065|kind=-7|len=43690 C|E2-expired-notafter-v2|read0|rc=817b1065|us=1823|buf= C|E2-expired-notafter-v2|send-again|rc=8095f00d|us=1617 SSL|L1-untrusted|sslconnect=8095f00c|us=100781 SSL|L3-reset-after-hello|sslconnect=80410136|us=1349 SSL|L4-garbage-after-hello|sslconnect=80951d78|us=1449 ``` ### Tested - Linux (Arch, GCC 16.2.1, Release) on `main` 5454cd2e45: `ctest -R guest_http2` passes (7 tests), 3 runs in a row. `GuestHttp2Transport.cpp` now checks against loopback servers an untrusted certificate (`0x8095F00C`), a host name the certificate does not cover (`0x8095F00B`), an expired certificate after `sceHttp2SslEnableOption(0x8)` (`0x8095F00D`), a server that closes after the ClientHello (`0x8095170D`) and one that answers it with a fatal alert (`0x8095F010`), and after each of these and after a refused connection, the status, content length, read and repeated send results. - `main` 9f748f4d8e merged in (0d054bf053): `main`'s gzip inflation work conflicted in `Transport.cpp` (constants side by side), in the transport test's `Mode` list and next to `Failure` (gzip scenarios added there; this PR's `Failure` keeps no host name flag, since that case moved to `Handshake`), and in the debt file. `ctest -R guest_http2`: 7 of 7, three times in a row, gzip scenarios included; with only `main`'s `Transport.cpp`, `guest_http2_transport` still aborts at the first handshake case. - Control: the same tests against `main`'s `Transport.cpp`: the handshake cases abort with `sceHttp2: TLS failed; console error mapping is unknown` (the expired one included, run first to check) and the refused case fails its status check; with this change all pass. - Resets and replies that are not TLS are passed through but not tested here: the host libSceSsl currently reports a reset during the handshake as `0x8095170D` and throws for a reply that is not TLS, where the console's `sceSslConnect` returned `0x80410136` and `0x80951D78`. - With #11611: its HTTP/1.x path goes through the same `Connect()`, so the change covers it. The only textual conflict in `Transport.cpp` is the placement after #11586's callback cleanup. On `main` + #11611 + this change all 8 HTTP2 test groups pass; one #11611 case changes (an untrusted chain without a callback now returns `0x8095F00C`). - Alan Wake 2 (PPSA02572 01.200.007): with `main` + #11611 it aborts at 65 s on its first telemetry POST (`sceHttp2: TLS failed; console error mapping is unknown`), because the server's certificate cannot be verified without #11145. With this change added and no #11145 it ran the whole 600 s and reached the same license agreement screen as with #11145. The title logs its own exporter error for each failed send (`[OTLP HTTP Client] Session state: request send failed.request failed`, 16 times in 600 s) and retries about every 31 s. A logging build of the same change on an earlier `main` showed each of those sends returning `0x8095F00C`. - `main` 04a9eb4fa2 merged in (6dd4bcd43a), after #11586 landed: - The conflict in `Transport.cpp` was the placement after #11586's callback cleanup. The cleanup runs first, then the measured codes are returned. - `guest_http2_ssl_callbacks` changes in one mode only. Mode 5, an untrusted chain with the callback cleared, now expects `0x8095F00C`, the code the console returned for that chain (`L1-untrusted` above), instead of a throw. - A callback refusal (modes 2 and 3) still throws: libSceSsl reports it as `0x8095F0FD`, which is not among the measured codes. Aborting, deleting or throwing from the callback (modes 6 to 8) also still throws. - `ctest -R guest_http2`: 9 of 9. - `tools/check_conventions.py` passes. Not tested on Windows. ### Checklist - [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. #11586, and #11611 on top of it, conflict with this textually in `Transport.cpp` (the new line goes right after #11586's TLS callback cleanup) and in the transport test and debt files; proposed order: this PR first, then #11586 and #11611 rebase onto it. Alan Wake 2 also needs #11611 for its HTTP/1.1 requests. - [x] Fixes: none - [x] Unblocks: PPSA02572 #7303 together with #11611 (past the 65 s TLS stop) - [x] GPUs tested: n/a - [x] AI-assisted: yes
MarcZX10 commented 2026-10-27 12:41:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-27T12:41:29Z.

Review: CHANGES_REQUESTED


The payload results are valuable, but the implementation does not yet return the measured console codes for two cases included in the PR’s table. Connect() only passes through values in HandshakeFailures; the PR says Linux sceSslConnect reports a peer reset as the close code 0x8095170D (the console reports 0x80410136) and throws for a non-TLS reply (the console reports 0x80951D78). The current reset path therefore returns the wrong code, and the non-TLS path still throws from sceHttp2SendRequest. The new transport tests cover close and fatal alert, but explicitly omit reset and non-TLS. Please normalize these observed host outcomes where they can be distinguished and add focused tests; otherwise narrow the claimed supported behavior and leave those measured cases documented as unresolved rather than implying passthrough reproduces them.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5667182675 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11922#pullrequestreview-5667182675). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-27T12:41:29Z. **Review:** CHANGES_REQUESTED --- The payload results are valuable, but the implementation does not yet return the measured console codes for two cases included in the PR’s table. `Connect()` only passes through values in `HandshakeFailures`; the PR says Linux `sceSslConnect` reports a peer reset as the close code `0x8095170D` (the console reports `0x80410136`) and throws for a non-TLS reply (the console reports `0x80951D78`). The current reset path therefore returns the wrong code, and the non-TLS path still throws from `sceHttp2SendRequest`. The new transport tests cover close and fatal alert, but explicitly omit reset and non-TLS. Please normalize these observed host outcomes where they can be distinguished and add focused tests; otherwise narrow the claimed supported behavior and leave those measured cases documented as unresolved rather than implying passthrough reproduces them.
adriadam10 commented 2026-10-28 09:51:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-28T09:51:52Z.

Review: CHANGES_REQUESTED


Thanks for the console measurements. Two points are still open, both raised above and not yet addressed:

  • docs/dev/debt/libSceHttp2.md (error paths entry) says the transport passes through a peer reset 0x80410136 and a non-TLS reply 0x80951D78. With libSceSsl as it is, core/libs/prx/libSceSsl/Export.cpp:501 maps a reset during the handshake to 0x8095170D and nothing produces 0x80951D78 (the non-TLS reply throws). Either fix the mapping in libSceSsl and add tests for both cases (the test body already says the host currently reports otherwise), or make the entry state what is returned today and keep the two codes in HandshakeFailures only if they can actually be reached.
  • Depends on says none, but the body reports a textual conflict in Transport.cpp with #11586. List it (and any other PR from the overlap report that you rebased across) in Depends on and say which merges first.

The rest (status/length/read/resend after a failed send, the close and alert tests, the untrusted and wrong-name cases) matches the measurements and the tests fail without the change.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5680726462 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11922#pullrequestreview-5680726462). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-28T09:51:52Z. **Review:** CHANGES_REQUESTED --- Thanks for the console measurements. Two points are still open, both raised above and not yet addressed: - `docs/dev/debt/libSceHttp2.md` (error paths entry) says the transport passes through a peer reset `0x80410136` and a non-TLS reply `0x80951D78`. With libSceSsl as it is, `core/libs/prx/libSceSsl/Export.cpp:501` maps a reset during the handshake to `0x8095170D` and nothing produces `0x80951D78` (the non-TLS reply throws). Either fix the mapping in libSceSsl and add tests for both cases (the test body already says the host currently reports otherwise), or make the entry state what is returned today and keep the two codes in `HandshakeFailures` only if they can actually be reached. - `Depends on` says none, but the body reports a textual conflict in `Transport.cpp` with #11586. List it (and any other PR from the overlap report that you rebased across) in `Depends on` and say which merges first. The rest (status/length/read/resend after a failed send, the close and alert tests, the untrusted and wrong-name cases) matches the measurements and the tests fail without the change.
XairRrR commented 2026-10-29 12:47:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-10-29T12:47:58Z.

Review: APPROVED


Reviewed — approved

The change passes the measured sceSslConnect handshake failures through sceHttp2SendRequest and makes the status, content length, read and repeated-send calls answer as the console did after a failed send; it merges cleanly, builds, its tests pass, and they fail without the production change.

What I ran

  • Head: 35f95a1d4bc246bdd91238e9dc92983c1ee3ed5c
  • main: 5454cd2e455994d992aca39335ce60507eeda1eb
  • Machine: Arch Linux 7.2.11-zen, GCC 16.2.1, Intel Core i9-14900KF, Release, Ninja, in a clean worktree, sandboxed without network.

The head already contains a merge of this main, so the merged tree has the same content as the head.

git fetch origin main pull/11922/head:refs/review/11922
git checkout --detach origin/main
git merge --no-ff --no-edit refs/review/11922
git diff --check origin/main...refs/review/11922
python3 tools/check_conventions.py --base origin/main
cmake -S . -B build
cmake --build build -j10 --target guest_http2_tests guest_http2_cookie_tests guest_http2_options_tests guest_http2_transport_tests guest_http2_teardown_tests libSceHttp2
cmake --build build -j10 --target libs
ctest --test-dir build -R guest_http2 -j4 --output-on-failure      # 1 run, then 3 more
# negative control
git checkout origin/main -- core/libs/prx/libSceHttp2/Transport.cpp
cmake --build build -j10 --target guest_http2_transport_tests
ctest --test-dir build -R guest_http2_transport --output-on-failure
git checkout HEAD -- core/libs/prx/libSceHttp2/Transport.cpp
cmake --build build -j10 --target guest_http2_transport_tests
ctest --test-dir build -R guest_http2_transport

Results

Check Result
Merge onto main Clean, no conflicts
git diff --check Clean
tools/check_conventions.py 0 errors, 1 warning (debt-length on docs/dev/debt/libSceHttp2.md:32, see below)
Build of the HTTP2 test targets and libSceHttp2 OK
Build of --target libs OK
ctest -R guest_http2 (7 tests: guest_http2, _cookies, _options, _transport, _early_response, _system_roots, _teardown) All pass, 4 runs out of 4; guest_http2_transport takes about 5.6 s
Negative control guest_http2_transport fails without the Transport.cpp change
check_conventions.py
docs/dev/debt/libSceHttp2.md:32: warning: [debt-length] Technical debt entry over 1000 characters: state the gap first (what differs from the console, what is unverified, what throws) and keep only the behaviour it needs: 1205 characters
1 findings, 0 errors; GitHub shows at most 10 error annotations, the job summary lists all
ctest on the merged tree (first run)
1/7 Test #1988: guest_http2_teardown .............   Passed    0.01 sec
2/7 Test #1984: guest_http2_options ..............   Passed    0.00 sec
3/7 Test #1983: guest_http2_cookies ..............   Passed    0.00 sec
4/7 Test #1982: guest_http2 ......................   Passed    0.00 sec
5/7 Test #1987: guest_http2_system_roots .........   Passed    0.17 sec
6/7 Test #1986: guest_http2_early_response .......   Passed    0.67 sec
7/7 Test #1985: guest_http2_transport ............   Passed    5.59 sec

100% tests passed out of 7

Negative control

I restored only core/libs/prx/libSceHttp2/Transport.cpp from main and kept the new test. guest_http2_transport aborts at the first new handshake case, the host name that the certificate does not cover:

Output
HTTP2 handshake failure scenario 0
  what():  sceHttp2: TLS failed; console error mapping is unknown not implemented
0% tests passed, 1 tests failed out of 1

After I restored the merged file and rebuilt, the test passes again. The run stops at the first failing case, so this control does not show the close, alert, untrusted and refused cases failing one by one. The PR description reports that they each fail on main.

Findings

Blocking

None.

Non-blocking

  1. Debt entry length. docs/dev/debt/libSceHttp2.md:32 is 1205 characters, and check_conventions.py warns about it (debt-length). Splitting the old entry into "error paths" and "connections" was a good step. The list of codes could still be shorter: point at the PR for the per-case table and keep only the gap, which is that the reset and non-TLS codes cannot be reached until libSceSsl changes.
  2. The read call after a refused connection is not in the console log. AfterFailedSend (core/libs/tests/GuestHttp2Transport.cpp:385) also runs for the refused connection (core/libs/tests/GuestHttp2Transport.cpp:514). For the read call it expects 0x817B1065 (line 393), but the console lines in the description have a read0 result only for T1-untrusted. For R1-refused they show only status, length and send-again. The implementation (core/libs/prx/libSceHttp2/Transport.cpp:596) returns the same code for every failure. That is probably right, but for the refused case it is an inference. Adding the payload's R1 read result to the PR, if it was captured, would back the "whatever the failure was" claim.
  3. The expired-certificate code has no transport test. 0x8095F00D is in HandshakeFailures (core/libs/prx/libSceHttp2/Transport.cpp:40), and libSceSsl produces it when verify option 0x8 is set (core/libs/prx/libSceSsl/Export.cpp:483). The new tests cover only 0x8095F00B, 0x8095F00C, 0x8095170D and 0x8095F010. A loopback server with an expired certificate and sceHttp2SslEnableOption(0x8) would cover the fifth reachable code. A run without the option, expecting success, would cover the console's E1 result as well.

Others have already raised the two unreachable codes (0x80410136 and 0x80951D78) and the Depends on ordering. The current debt text and description address both, so I do not repeat them.

Not verified

  • Windows. A Windows run by another contributor, on the earlier head 57acad605e, is in the PR comments.
  • The console measurements themselves, and the Alan Wake 2 result. I did not launch any title.
  • The reset and non-TLS cases. As the PR says, the host libSceSsl cannot produce them yet.
  • How this PR combines with #11586 and #11611.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5697917053 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11922#pullrequestreview-5697917053). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-10-29T12:47:58Z. **Review:** APPROVED --- # Reviewed — approved The change passes the measured `sceSslConnect` handshake failures through `sceHttp2SendRequest` and makes the status, content length, read and repeated-send calls answer as the console did after a failed send; it merges cleanly, builds, its tests pass, and they fail without the production change. ## What I ran - Head: `35f95a1d4bc246bdd91238e9dc92983c1ee3ed5c` - `main`: `5454cd2e455994d992aca39335ce60507eeda1eb` - Machine: Arch Linux 7.2.11-zen, GCC 16.2.1, Intel Core i9-14900KF, Release, Ninja, in a clean worktree, sandboxed without network. The head already contains a merge of this `main`, so the merged tree has the same content as the head. ``` git fetch origin main pull/11922/head:refs/review/11922 git checkout --detach origin/main git merge --no-ff --no-edit refs/review/11922 git diff --check origin/main...refs/review/11922 python3 tools/check_conventions.py --base origin/main cmake -S . -B build cmake --build build -j10 --target guest_http2_tests guest_http2_cookie_tests guest_http2_options_tests guest_http2_transport_tests guest_http2_teardown_tests libSceHttp2 cmake --build build -j10 --target libs ctest --test-dir build -R guest_http2 -j4 --output-on-failure # 1 run, then 3 more # negative control git checkout origin/main -- core/libs/prx/libSceHttp2/Transport.cpp cmake --build build -j10 --target guest_http2_transport_tests ctest --test-dir build -R guest_http2_transport --output-on-failure git checkout HEAD -- core/libs/prx/libSceHttp2/Transport.cpp cmake --build build -j10 --target guest_http2_transport_tests ctest --test-dir build -R guest_http2_transport ``` ## Results | Check | Result | |---|---| | Merge onto `main` | Clean, no conflicts | | `git diff --check` | Clean | | `tools/check_conventions.py` | 0 errors, 1 warning (`debt-length` on `docs/dev/debt/libSceHttp2.md:32`, see below) | | Build of the HTTP2 test targets and `libSceHttp2` | OK | | Build of `--target libs` | OK | | `ctest -R guest_http2` (7 tests: `guest_http2`, `_cookies`, `_options`, `_transport`, `_early_response`, `_system_roots`, `_teardown`) | All pass, 4 runs out of 4; `guest_http2_transport` takes about 5.6 s | | Negative control | `guest_http2_transport` fails without the `Transport.cpp` change | <details><summary>check_conventions.py</summary> ``` docs/dev/debt/libSceHttp2.md:32: warning: [debt-length] Technical debt entry over 1000 characters: state the gap first (what differs from the console, what is unverified, what throws) and keep only the behaviour it needs: 1205 characters 1 findings, 0 errors; GitHub shows at most 10 error annotations, the job summary lists all ``` </details> <details><summary>ctest on the merged tree (first run)</summary> ``` 1/7 Test #1988: guest_http2_teardown ............. Passed 0.01 sec 2/7 Test #1984: guest_http2_options .............. Passed 0.00 sec 3/7 Test #1983: guest_http2_cookies .............. Passed 0.00 sec 4/7 Test #1982: guest_http2 ...................... Passed 0.00 sec 5/7 Test #1987: guest_http2_system_roots ......... Passed 0.17 sec 6/7 Test #1986: guest_http2_early_response ....... Passed 0.67 sec 7/7 Test #1985: guest_http2_transport ............ Passed 5.59 sec 100% tests passed out of 7 ``` </details> ## Negative control I restored only `core/libs/prx/libSceHttp2/Transport.cpp` from `main` and kept the new test. `guest_http2_transport` aborts at the first new handshake case, the host name that the certificate does not cover: <details><summary>Output</summary> ``` HTTP2 handshake failure scenario 0 what(): sceHttp2: TLS failed; console error mapping is unknown not implemented 0% tests passed, 1 tests failed out of 1 ``` </details> After I restored the merged file and rebuilt, the test passes again. The run stops at the first failing case, so this control does not show the close, alert, untrusted and refused cases failing one by one. The PR description reports that they each fail on `main`. ## Findings ### Blocking None. ### Non-blocking 1. **Debt entry length.** `docs/dev/debt/libSceHttp2.md:32` is 1205 characters, and `check_conventions.py` warns about it (`debt-length`). Splitting the old entry into "error paths" and "connections" was a good step. The list of codes could still be shorter: point at the PR for the per-case table and keep only the gap, which is that the reset and non-TLS codes cannot be reached until libSceSsl changes. 2. **The read call after a refused connection is not in the console log.** `AfterFailedSend` (`core/libs/tests/GuestHttp2Transport.cpp:385`) also runs for the refused connection (`core/libs/tests/GuestHttp2Transport.cpp:514`). For the read call it expects `0x817B1065` (line 393), but the console lines in the description have a `read0` result only for `T1-untrusted`. For `R1-refused` they show only `status`, `length` and `send-again`. The implementation (`core/libs/prx/libSceHttp2/Transport.cpp:596`) returns the same code for every failure. That is probably right, but for the refused case it is an inference. Adding the payload's `R1` read result to the PR, if it was captured, would back the "whatever the failure was" claim. 3. **The expired-certificate code has no transport test.** `0x8095F00D` is in `HandshakeFailures` (`core/libs/prx/libSceHttp2/Transport.cpp:40`), and libSceSsl produces it when verify option `0x8` is set (`core/libs/prx/libSceSsl/Export.cpp:483`). The new tests cover only `0x8095F00B`, `0x8095F00C`, `0x8095170D` and `0x8095F010`. A loopback server with an expired certificate and `sceHttp2SslEnableOption(0x8)` would cover the fifth reachable code. A run without the option, expecting success, would cover the console's `E1` result as well. Others have already raised the two unreachable codes (`0x80410136` and `0x80951D78`) and the `Depends on` ordering. The current debt text and description address both, so I do not repeat them. ## Not verified - Windows. A Windows run by another contributor, on the earlier head `57acad605e`, is in the PR comments. - The console measurements themselves, and the Alan Wake 2 result. I did not launch any title. - The reset and non-TLS cases. As the PR says, the host libSceSsl cannot produce them yet. - How this PR combines with #11586 and #11611.
XairRrR commented 2026-11-02 19:58:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-02T19:58:30Z.

Review: APPROVED


Re-checked — approved

Since my last review, the PR shortened the error-paths debt entry (c3cc464ce1), added an expired-certificate handshake test (1acaa7f8ea), documented the console's read0 result after a refused connection, and merged current main. All three of my earlier non-blocking points are resolved, and the new test fails without the matching production entry.

What changed since my last review

  • c3cc464ce1: the libSceHttp2 error paths entry is shorter. It now lists what throws, then the two codes that can't be reached until libSceSsl changes, and points to this PR for the per-case results.
  • 1acaa7f8ea: adds Mode::Expired, a loopback server that uses the existing ExpiredServerPem/ExpiredServerKey fixture (core/libs/tests/SslCertificateFixture.hpp:94), and Handshake(ssl, Mode::Expired, 0x8095f00d, 0x8) (core/libs/tests/GuestHttp2Transport.cpp:1022). Expired is placed before EarlyFinal in the enum, so IsEarly() (mode >= Mode::EarlyFinal, line 155) still classifies modes correctly.
  • Merges of main, the last one resolving conflicts with #11575 in the transport test and the debt file. The production diff (Transport.cpp) is unchanged from the reviewed commit apart from line offsets.
  • Description: adds the R1-refused-v2 read0 rc=817b1065 line and the E1/E2 expired-certificate lines. It also notes that a fresh template on the console does not check expiry, while the template default here includes 0x8. The PR leaves that default unchanged.

What I ran

  • Head: 7b95725572632d715c7cab90fc8969fbdeff3838
  • main: dd0548601bfeb18f337cbc2bdb67ff211c13ff26
  • Merged tree: 3f085c42c946ec193eb39af13e8af076772c8295
  • Machine: Debian 13 VM, 32 vCPU (2× Xeon Gold 6136), GCC 14.2.0, Release, Ninja, in a clean worktree without network.
git diff --check dd0548601bfeb18f337cbc2bdb67ff211c13ff26...7b95725572632d715c7cab90fc8969fbdeff3838
python3 tools/check_conventions.py --base dd0548601bfeb18f337cbc2bdb67ff211c13ff26
ctest --test-dir build -j8 --test-load 32 -R guest_http2 --output-on-failure --repeat until-fail:3
# negative control 1: main's Transport.cpp, the PR's test kept
git show dd0548601b:core/libs/prx/libSceHttp2/Transport.cpp > core/libs/prx/libSceHttp2/Transport.cpp
ninja -C build -j32 -l32 guest_http2_transport_tests libSceHttp2
ctest --test-dir build -R '^guest_http2_transport$' --output-on-failure
# negative control 2: merged Transport.cpp with only 0x8095f00d removed from HandshakeFailures (array size 7 -> 6)
ninja -C build -j32 -l32 guest_http2_transport_tests libSceHttp2
ctest --test-dir build -R '^guest_http2_transport$' --output-on-failure
# restore
git show 3f085c42c9:core/libs/prx/libSceHttp2/Transport.cpp > core/libs/prx/libSceHttp2/Transport.cpp
ninja -C build -j32 -l32 guest_http2_transport_tests libSceHttp2
ctest --test-dir build -R '^guest_http2_transport$'
git status --porcelain
Check Result
Merge onto main Clean (done by the script)
git diff --check Clean
check_conventions.py All checks pass; the earlier debt-length warning is gone
Build (libs and the selected targets) OK
Script test run (792 tests) No new failures or timeouts. unwrap_self also fails on main (known failure). Two main_sync_renames_* tests that fail on the baseline pass here. They are unrelated to this PR
ctest -R guest_http2 ×3 (8 tests, including guest_http2_redirects from main) 8/8 pass on each run; guest_http2_transport takes about 7.7 s
Negative control 1 guest_http2_transport fails
Negative control 2 guest_http2_transport fails at the expired scenario
Worktree after restore Clean (git status --porcelain empty); guest_http2_transport passes again
Negative control outputs
# 1: main's Transport.cpp
HTTP2 failure scenario 6
HTTP2 handshake failure scenario 0
  what():  sceHttp2: TLS failed; console error mapping is unknown not implemented
0% tests passed, 1 tests failed out of 1

# 2: only 0x8095f00d removed
HTTP2 handshake failure scenario 25
HTTP2 handshake failure scenario 26
  what():  sceHttp2: TLS failed; console error mapping is unknown not implemented
0% tests passed, 1 tests failed out of 1

Negative control 2 shows that the new expired case (mode 26) depends on its own entry in HandshakeFailures, separately from the other cases. A side note on the list itself: my first attempt dropped the element but kept std::array<int, 7>. That pads the array with a 0, so a successful handshake returned early and skipped the ALPN check (NoAlpn failed). The PR's array is fully populated, so this does not affect it.

Previous findings

  1. Debt entry length (docs/dev/debt/libSceHttp2.md:32): Resolved. check_conventions.py no longer reports debt-length. The entry now states what throws first, then names the two unreachable codes (0x80410136, 0x80951D78) with what the host returns instead.
  2. Read call after a refused connection was not in the console log: Resolved (author-reported). The description now includes C|R1-refused-v2|read0|rc=817b1065, and the author reports the same result for R2-refused-v3. AfterFailedSend (core/libs/tests/GuestHttp2Transport.cpp:749) checking 0x817B1065 for the refused case (line 878) now matches a measured result.
  3. The expired-certificate code had no transport test: Resolved. Handshake(ssl, Mode::Expired, 0x8095f00d, 0x8) at core/libs/tests/GuestHttp2Transport.cpp:1022 passes on the merged tree and fails without the 0x8095f00d entry (negative control 2). The console's default-options case (E1, expiry not checked) is not tested. That is consistent with the PR leaving the template default as it is: the description records the difference, and changing the default belongs in its own PR.

New findings

Blocking

None.

Non-blocking

None.

Not verified

  • Windows. Other contributors posted Windows runs on earlier heads (57acad605e, 0d054bf053) and on a local resolution of the latest conflict.
  • The console measurements and the Alan Wake 2 result. I did not launch any title.
  • The reset (0x80410136) and non-TLS (0x80951D78) cases. As the debt entry says, the host libSceSsl cannot produce them yet.
  • How this PR combines with #11586 and #11611, and in what order they should land.
  • Vulkan validation comparison: not applicable. No AGC driver, shader recompiler or VideoOut file is changed.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5742528466 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11922#pullrequestreview-5742528466). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-02T19:58:30Z. **Review:** APPROVED --- # Re-checked — approved Since my last review, the PR shortened the error-paths debt entry (c3cc464ce1), added an expired-certificate handshake test (1acaa7f8ea), documented the console's `read0` result after a refused connection, and merged current `main`. All three of my earlier non-blocking points are resolved, and the new test fails without the matching production entry. ## What changed since my last review - `c3cc464ce1`: the `libSceHttp2 error paths` entry is shorter. It now lists what throws, then the two codes that can't be reached until libSceSsl changes, and points to this PR for the per-case results. - `1acaa7f8ea`: adds `Mode::Expired`, a loopback server that uses the existing `ExpiredServerPem`/`ExpiredServerKey` fixture (`core/libs/tests/SslCertificateFixture.hpp:94`), and `Handshake(ssl, Mode::Expired, 0x8095f00d, 0x8)` (`core/libs/tests/GuestHttp2Transport.cpp:1022`). `Expired` is placed before `EarlyFinal` in the enum, so `IsEarly()` (`mode >= Mode::EarlyFinal`, line 155) still classifies modes correctly. - Merges of `main`, the last one resolving conflicts with #11575 in the transport test and the debt file. The production diff (`Transport.cpp`) is unchanged from the reviewed commit apart from line offsets. - Description: adds the `R1-refused-v2 read0 rc=817b1065` line and the `E1`/`E2` expired-certificate lines. It also notes that a fresh template on the console does not check expiry, while the template default here includes `0x8`. The PR leaves that default unchanged. ## What I ran - Head: `7b95725572632d715c7cab90fc8969fbdeff3838` - `main`: `dd0548601bfeb18f337cbc2bdb67ff211c13ff26` - Merged tree: `3f085c42c946ec193eb39af13e8af076772c8295` - Machine: Debian 13 VM, 32 vCPU (2× Xeon Gold 6136), GCC 14.2.0, Release, Ninja, in a clean worktree without network. ``` git diff --check dd0548601bfeb18f337cbc2bdb67ff211c13ff26...7b95725572632d715c7cab90fc8969fbdeff3838 python3 tools/check_conventions.py --base dd0548601bfeb18f337cbc2bdb67ff211c13ff26 ctest --test-dir build -j8 --test-load 32 -R guest_http2 --output-on-failure --repeat until-fail:3 # negative control 1: main's Transport.cpp, the PR's test kept git show dd0548601b:core/libs/prx/libSceHttp2/Transport.cpp > core/libs/prx/libSceHttp2/Transport.cpp ninja -C build -j32 -l32 guest_http2_transport_tests libSceHttp2 ctest --test-dir build -R '^guest_http2_transport$' --output-on-failure # negative control 2: merged Transport.cpp with only 0x8095f00d removed from HandshakeFailures (array size 7 -> 6) ninja -C build -j32 -l32 guest_http2_transport_tests libSceHttp2 ctest --test-dir build -R '^guest_http2_transport$' --output-on-failure # restore git show 3f085c42c9:core/libs/prx/libSceHttp2/Transport.cpp > core/libs/prx/libSceHttp2/Transport.cpp ninja -C build -j32 -l32 guest_http2_transport_tests libSceHttp2 ctest --test-dir build -R '^guest_http2_transport$' git status --porcelain ``` | Check | Result | |---|---| | Merge onto `main` | Clean (done by the script) | | `git diff --check` | Clean | | `check_conventions.py` | All checks pass; the earlier `debt-length` warning is gone | | Build (`libs` and the selected targets) | OK | | Script test run (792 tests) | No new failures or timeouts. `unwrap_self` also fails on `main` (known failure). Two `main_sync_renames_*` tests that fail on the baseline pass here. They are unrelated to this PR | | `ctest -R guest_http2` ×3 (8 tests, including `guest_http2_redirects` from `main`) | 8/8 pass on each run; `guest_http2_transport` takes about 7.7 s | | Negative control 1 | `guest_http2_transport` fails | | Negative control 2 | `guest_http2_transport` fails at the expired scenario | | Worktree after restore | Clean (`git status --porcelain` empty); `guest_http2_transport` passes again | <details><summary>Negative control outputs</summary> ``` # 1: main's Transport.cpp HTTP2 failure scenario 6 HTTP2 handshake failure scenario 0 what(): sceHttp2: TLS failed; console error mapping is unknown not implemented 0% tests passed, 1 tests failed out of 1 # 2: only 0x8095f00d removed HTTP2 handshake failure scenario 25 HTTP2 handshake failure scenario 26 what(): sceHttp2: TLS failed; console error mapping is unknown not implemented 0% tests passed, 1 tests failed out of 1 ``` </details> Negative control 2 shows that the new expired case (mode 26) depends on its own entry in `HandshakeFailures`, separately from the other cases. A side note on the list itself: my first attempt dropped the element but kept `std::array<int, 7>`. That pads the array with a 0, so a successful handshake returned early and skipped the ALPN check (`NoAlpn` failed). The PR's array is fully populated, so this does not affect it. ## Previous findings 1. **Debt entry length** (`docs/dev/debt/libSceHttp2.md:32`): **Resolved.** `check_conventions.py` no longer reports `debt-length`. The entry now states what throws first, then names the two unreachable codes (`0x80410136`, `0x80951D78`) with what the host returns instead. 2. **Read call after a refused connection was not in the console log**: **Resolved (author-reported).** The description now includes `C|R1-refused-v2|read0|rc=817b1065`, and the author reports the same result for `R2-refused-v3`. `AfterFailedSend` (`core/libs/tests/GuestHttp2Transport.cpp:749`) checking `0x817B1065` for the refused case (line 878) now matches a measured result. 3. **The expired-certificate code had no transport test**: **Resolved.** `Handshake(ssl, Mode::Expired, 0x8095f00d, 0x8)` at `core/libs/tests/GuestHttp2Transport.cpp:1022` passes on the merged tree and fails without the `0x8095f00d` entry (negative control 2). The console's default-options case (`E1`, expiry not checked) is not tested. That is consistent with the PR leaving the template default as it is: the description records the difference, and changing the default belongs in its own PR. ## New findings ### Blocking None. ### Non-blocking None. ## Not verified - Windows. Other contributors posted Windows runs on earlier heads (`57acad605e`, `0d054bf053`) and on a local resolution of the latest conflict. - The console measurements and the Alan Wake 2 result. I did not launch any title. - The reset (`0x80410136`) and non-TLS (`0x80951D78`) cases. As the debt entry says, the host libSceSsl cannot produce them yet. - How this PR combines with #11586 and #11611, and in what order they should land. - Vulkan validation comparison: not applicable. No AGC driver, shader recompiler or VideoOut file is changed. <!-- anyps5-bots job=2255 head=7b95725572632d715c7cab90fc8969fbdeff3838 -->
BunnyFl commented 2026-11-02 23:29:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by BunnyFl on 2026-11-02T23:29:48Z.

Review: APPROVED


adriadam10's two points look addressed at this head. The debt entry (docs/dev/debt/libSceHttp2.md) no longer says the transport passes 0x80410136 and 0x80951D78 through. It says both are console results that can't be reached until libSceSsl changes, since the host libSceSsl returns 0x8095170D for the reset and throws for the non-TLS reply. And the Depends on line now names the textual conflicts with #11586 and #11611 in Transport.cpp. Whether that line should list them as dependencies rather than as a note is adriadam10's call.

Tested on Windows 11, WinLibs GCC 15.2.0, with this head merged onto current main: all nine guest_http2* tests pass, nothing skipped, including guest_http2_transport. With main's Transport.cpp, guest_http2_transport aborts (0xc0000409) and the other eight still pass.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5744908875 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11922#pullrequestreview-5744908875). Originally posted by [BunnyFl](https://github.com/BunnyFl) on 2026-11-02T23:29:48Z. **Review:** APPROVED --- adriadam10's two points look addressed at this head. The debt entry (`docs/dev/debt/libSceHttp2.md`) no longer says the transport passes `0x80410136` and `0x80951D78` through. It says both are console results that can't be reached until libSceSsl changes, since the host libSceSsl returns `0x8095170D` for the reset and throws for the non-TLS reply. And the `Depends on` line now names the textual conflicts with #11586 and #11611 in `Transport.cpp`. Whether that line should list them as dependencies rather than as a note is adriadam10's call. Tested on Windows 11, WinLibs GCC 15.2.0, with this head merged onto current `main`: all nine `guest_http2*` tests pass, nothing skipped, including `guest_http2_transport`. With `main`'s `Transport.cpp`, `guest_http2_transport` aborts (`0xc0000409`) and the other eight still pass.
XairRrR commented 2026-11-03 21:47:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T21:47:37Z.

Review: APPROVED


Re-checked — approved

The only change since my last review is the merge of current main (6dd4bcd43a) after #11586 landed. The measured-code passthrough now runs after #11586's TLS callback cleanup, and mode 5 of guest_http2_ssl_callbacks now expects 0x8095F00C where it used to expect a throw. The checks pass, the tests pass, and the negative control fails as it should.

What changed since my last review

  • The range-diff of the PR's own commits is empty: 486a71ef91, 7215512e1b, c3cc464ce1 and 1acaa7f8ea are unchanged. The new work is all in the merge commit 6dd4bcd43a.
  • In Transport.cpp, the HandshakeFailures check (core/libs/prx/libSceHttp2/Transport.cpp:521) now comes after #11586's sceSslSetVerifyCallback(ssl, nullptr, nullptr) cleanup (line 520). So the callback is cleared before an early return too.
  • In core/libs/tests/GuestHttp2Transport.cpp:611, mode 5 of SslCallbacks (an untrusted chain with the callback cleared, line 603) now expects 0x8095F00C. Modes 2, 3 and 6 to 8 still expect a throw.
  • The description has a new bullet for this merge. In discussion.md, the author answers oneandonlydean's question: a callback refusal still throws, because its console code was never measured.

I checked that answer against libSceSsl. A refusing callback makes sceSslConnect return ErrorCallbackCheck = 0x8095F0FD (core/libs/prx/libSceSsl/Export.cpp:59, :932). That code is not in HandshakeFailures, so Connect() still reaches Require(result == 0, ...) and throws, as on main. Mode 5 runs no callback, so libSceSsl's plain known-CA failure (ErrorUnknownCa, Export.cpp:487) is returned. That is the code the console returned for the same chain (SSL|L1-untrusted|sslconnect=8095f00c, author-reported). The changed expectation therefore follows a measurement and is not a weaker test.

What I ran

  • Head: 6dd4bcd43a5cdc2f615876c7f953ca7f9b70b258
  • main: 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24
  • Merged tree: 4a6864571ad88f4d5f3f0aac0c61e71c8e121739
  • Machine: Debian 13 VM, 32 vCPU (2× Xeon Gold 6136), GCC 14.2.0, Release, Ninja, in a clean worktree without network.
git diff --check 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24...6dd4bcd43a5cdc2f615876c7f953ca7f9b70b258
python3 tools/check_conventions.py --base 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24
ctest --test-dir build -j8 --test-load 32 -R guest_http2 --output-on-failure --repeat until-fail:3
# negative control: main's Transport.cpp, the PR's tests kept
git show 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24:core/libs/prx/libSceHttp2/Transport.cpp > core/libs/prx/libSceHttp2/Transport.cpp
ninja -C build -j32 -l32 libSceHttp2 guest_http2_transport_tests
ctest --test-dir build -R '^guest_http2_(transport|ssl_callbacks)$' --output-on-failure
# restore
git show 4a6864571ad88f4d5f3f0aac0c61e71c8e121739:core/libs/prx/libSceHttp2/Transport.cpp > core/libs/prx/libSceHttp2/Transport.cpp
ninja -C build -j32 -l32 libSceHttp2 guest_http2_transport_tests
ctest --test-dir build -R '^guest_http2_(transport|ssl_callbacks)$'
git status --porcelain
Check Result
Merge onto main Clean (done by the script)
git diff --check Clean
check_conventions.py All checks pass
Build OK
Script test run (826 tests) No new failures or timeouts. unwrap_self_..._destination_directory_group also fails on main (known failure)
ctest -R guest_http2 ×3 9/9 pass on every run, including guest_http2_ssl_callbacks (about 2.3 s) and guest_http2_transport (about 7.6 s)
Negative control guest_http2_transport and guest_http2_ssl_callbacks both abort
After restore Both pass. git status --porcelain is empty
Negative control output
HTTP2 failure scenario 6
HTTP2 handshake failure scenario 0
  what():  sceHttp2: TLS failed; console error mapping is unknown not implemented
2/2 Test #2519: guest_http2_ssl_callbacks ........Subprocess aborted***Exception:   0.86 sec
  what():  sceHttp2: TLS failed; console error mapping is unknown not implemented
0% tests passed, 2 tests failed out of 2

Previous findings

My last review (on 7b95725572) had no open findings, and nothing in this merge reopens them.

New findings

Blocking

None.

Non-blocking

None.

Not verified

  • Windows, at this head.
  • The console measurements, including L1-untrusted, and the Alan Wake 2 result. I accepted them as author-reported and did not launch any title.
  • What the console returns for a callback refusal. It was never measured, and it still throws here, as it should.
  • The reset (0x80410136) and non-TLS (0x80951D78) cases. The host libSceSsl cannot produce them yet, as the debt entry says.
  • Vulkan validation comparison: not applicable. The change touches no AGC driver, shader recompiler or VideoOut file.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5759940465 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11922#pullrequestreview-5759940465). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-03T21:47:37Z. **Review:** APPROVED --- # Re-checked — approved The only change since my last review is the merge of current `main` (6dd4bcd43a) after #11586 landed. The measured-code passthrough now runs after #11586's TLS callback cleanup, and mode 5 of `guest_http2_ssl_callbacks` now expects `0x8095F00C` where it used to expect a throw. The checks pass, the tests pass, and the negative control fails as it should. ## What changed since my last review - The range-diff of the PR's own commits is empty: `486a71ef91`, `7215512e1b`, `c3cc464ce1` and `1acaa7f8ea` are unchanged. The new work is all in the merge commit `6dd4bcd43a`. - In `Transport.cpp`, the `HandshakeFailures` check (`core/libs/prx/libSceHttp2/Transport.cpp:521`) now comes after #11586's `sceSslSetVerifyCallback(ssl, nullptr, nullptr)` cleanup (line 520). So the callback is cleared before an early return too. - In `core/libs/tests/GuestHttp2Transport.cpp:611`, mode 5 of `SslCallbacks` (an untrusted chain with the callback cleared, line 603) now expects `0x8095F00C`. Modes 2, 3 and 6 to 8 still expect a throw. - The description has a new bullet for this merge. In discussion.md, the author answers oneandonlydean's question: a callback refusal still throws, because its console code was never measured. I checked that answer against libSceSsl. A refusing callback makes `sceSslConnect` return `ErrorCallbackCheck` = `0x8095F0FD` (`core/libs/prx/libSceSsl/Export.cpp:59`, `:932`). That code is not in `HandshakeFailures`, so `Connect()` still reaches `Require(result == 0, ...)` and throws, as on `main`. Mode 5 runs no callback, so libSceSsl's plain known-CA failure (`ErrorUnknownCa`, `Export.cpp:487`) is returned. That is the code the console returned for the same chain (`SSL|L1-untrusted|sslconnect=8095f00c`, author-reported). The changed expectation therefore follows a measurement and is not a weaker test. ## What I ran - Head: `6dd4bcd43a5cdc2f615876c7f953ca7f9b70b258` - `main`: `04a9eb4fa2877eb6e40bf2c83adf972e40d89b24` - Merged tree: `4a6864571ad88f4d5f3f0aac0c61e71c8e121739` - Machine: Debian 13 VM, 32 vCPU (2× Xeon Gold 6136), GCC 14.2.0, Release, Ninja, in a clean worktree without network. ``` git diff --check 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24...6dd4bcd43a5cdc2f615876c7f953ca7f9b70b258 python3 tools/check_conventions.py --base 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24 ctest --test-dir build -j8 --test-load 32 -R guest_http2 --output-on-failure --repeat until-fail:3 # negative control: main's Transport.cpp, the PR's tests kept git show 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24:core/libs/prx/libSceHttp2/Transport.cpp > core/libs/prx/libSceHttp2/Transport.cpp ninja -C build -j32 -l32 libSceHttp2 guest_http2_transport_tests ctest --test-dir build -R '^guest_http2_(transport|ssl_callbacks)$' --output-on-failure # restore git show 4a6864571ad88f4d5f3f0aac0c61e71c8e121739:core/libs/prx/libSceHttp2/Transport.cpp > core/libs/prx/libSceHttp2/Transport.cpp ninja -C build -j32 -l32 libSceHttp2 guest_http2_transport_tests ctest --test-dir build -R '^guest_http2_(transport|ssl_callbacks)$' git status --porcelain ``` | Check | Result | |---|---| | Merge onto `main` | Clean (done by the script) | | `git diff --check` | Clean | | `check_conventions.py` | All checks pass | | Build | OK | | Script test run (826 tests) | No new failures or timeouts. `unwrap_self_..._destination_directory_group` also fails on `main` (known failure) | | `ctest -R guest_http2` ×3 | 9/9 pass on every run, including `guest_http2_ssl_callbacks` (about 2.3 s) and `guest_http2_transport` (about 7.6 s) | | Negative control | `guest_http2_transport` and `guest_http2_ssl_callbacks` both abort | | After restore | Both pass. `git status --porcelain` is empty | <details><summary>Negative control output</summary> ``` HTTP2 failure scenario 6 HTTP2 handshake failure scenario 0 what(): sceHttp2: TLS failed; console error mapping is unknown not implemented 2/2 Test #2519: guest_http2_ssl_callbacks ........Subprocess aborted***Exception: 0.86 sec what(): sceHttp2: TLS failed; console error mapping is unknown not implemented 0% tests passed, 2 tests failed out of 2 ``` </details> ## Previous findings My last review (on `7b95725572`) had no open findings, and nothing in this merge reopens them. ## New findings ### Blocking None. ### Non-blocking None. ## Not verified - Windows, at this head. - The console measurements, including `L1-untrusted`, and the Alan Wake 2 result. I accepted them as author-reported and did not launch any title. - What the console returns for a callback refusal. It was never measured, and it still throws here, as it should. - The reset (`0x80410136`) and non-TLS (`0x80951D78`) cases. The host libSceSsl cannot produce them yet, as the debt entry says. - Vulkan validation comparison: not applicable. The change touches no AGC driver, shader recompiler or VideoOut file. <!-- anyps5-bots job=3636 head=6dd4bcd43a5cdc2f615876c7f953ca7f9b70b258 -->
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!11922
No description provided.