feat(libSceLibreSsl): implement the SSL context, BIO, version, verify result, shutdown and want accessors #10481

Merged
alvaroelpob merged 9 commits from upstream-pr/10481 into main 2026-11-05 17:33:40 +00:00
alvaroelpob commented 2026-10-24 02:54:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by alvaroelpob on 2026-10-24T02:54:11Z.


What

Implements SSL_get_SSL_CTX, SSL_get_rbio, SSL_get_wbio, SSL_version, SSL_get_verify_result, SSL_get_shutdown and SSL_want in libSceLibreSsl, which threw and were declared without parameters.

The module is LibreSSL 2.5.4 (firmware 13.40 measurements in #8981). Signatures, layouts and results follow that release's ssl.h, ssl_locl.h and ssl_lib.c:

Export Behaviour
SSL_CTX* SSL_get_SSL_CTX(const SSL*) ctx
BIO* SSL_get_rbio(const SSL*) rbio
BIO* SSL_get_wbio(const SSL*) wbio
int SSL_version(const SSL*) version
long SSL_get_verify_result(const SSL*) verify_result, 64-bit as long is on the console
int SSL_get_shutdown(const SSL*) internal->shutdown
int SSL_want(const SSL*) internal->rwstate

The layouts are 232 bytes for SSL (rbio at 16, wbio at 24, ctx at 152, verify_result at 160, internal at 224) and 432 for ssl_internal_st (rwstate at 156, shutdown at 168). They were checked with static_asserts and against offsetof from the 2.5.4 headers compiled on x86-64. LibreSSL dereferences the connection, and the internal state for the last two, without checking them, so a null for either throws. No export of this module creates a connection yet, so for now only connections built by the caller reach these functions.

The debt entry records the source and what is unverified, and the pending-export count drops from 357 to 350.

Tested

Ubuntu 26.04 (WSL2, kernel 6.18), GCC 15.2.0, Release, full build with BUILD_TESTING=ON on main 379b1dca3. There is one commit per function, and each adds that function with its test block and debt update. Each was built and its guest_libressl_ssl test and check_conventions.py run on its own.

  • New guest_libressl_ssl test. The pointer getters return null and then their own field, not a neighbour: ctx next to session, rbio next to wbio, and wbio next to rbio and bbio. SSL_version returns 0, 0x0303 and 0xFEFF. SSL_get_verify_result returns 0, 20, a value above 32 bits and -1. SSL_get_shutdown returns 0, 1 and 3 with rwstate set, and SSL_want returns 0, 1 and 3 with shutdown set. A null connection throws in all seven, and a null internal state throws in the last two.
  • Full ctest -j16 at the last commit: 2005/2006 pass. agc_driver_multisample_retirement fails the same way on main on this machine.
  • Not tested: Windows, a title.
  • Rebased on main 1e740a23a3 (after #9033), head 2ca51b6d21: the conflicts were only the add_library source list, the end of the test block, the pending-export count and the last debt entry; both sides are kept and the count is 357 minus this PR's exports. Full build and ctest -j16: 2043/2044 pass; agc_driver_multisample_retirement fails the same way on that main. check_conventions.py --base upstream/main passes.
  • Rebased on main e7e3e9c198, head a519efda1f, to resolve the conflict from #9529 on the shared CMakeLists.txt and debt-file lines; both sides are kept and the count is 353 minus this PR's exports. a519efda1f (refactor(libSceLibreSsl): declare the SSL accessor exports in the public header) puts the real signatures and their structs in libSceLibreSsl/include/Api.hpp and drops the test's redeclarations, which public_headers requires since #10706. Full build and ctest -j16: 2202/2203 pass; agc_driver_multisample_retirement fails the same way on that main. check_conventions.py --base upstream/main passes.
  • Rebased on main ae7d59258e (after #9949), head b7ceda9cb4, to resolve the conflicts with main on the shared CMakeLists.txt and debt-file lines; both sides are kept and the count is 342 minus this PR's exports. Full build and ctest -j16: 2275/2276 pass; agc_driver_multisample_retirement fails the same way on that main. check_conventions.py --base upstream/main passes.
  • Rebased on main 2dbe9b99f5 (after #9745, #9870 and #11111), head 2473e1c7e3, to resolve the conflicts with main on the shared CMakeLists.txt and debt-file lines; both sides are kept and the count is 340 minus this PR's exports. Full build and ctest -j16: 2370/2371 pass; agc_driver_multisample_retirement fails the same way on that main. check_conventions.py --base upstream/main passes.
  • Rebased on main 88795ed448 (after #10248; head 42008aa41f) to resolve the conflicts on the shared debt-file lines; both sides are kept and the count is 335 minus this PR's exports. Full build and ctest -j16: 2383/2384 pass; agc_driver_multisample_retirement fails the same way on that main. check_conventions.py --base upstream/main passes.
  • Rebased on main c7b4878fa8 (after #10373, #10376 and #10449), head 6cdb701e70, to resolve the conflicts with main on the shared CMakeLists.txt, Api.hpp and debt-file lines; both sides are kept and the count is 319 minus this PR's exports. Full build and ctest -j16: 2394/2395 pass; agc_driver_multisample_retirement fails the same way on that main. check_conventions.py --base upstream/main passes.
  • Rebased on main 474030e584 (after #13562), head b651889acc, to resolve the conflict on the pending-export count in the debt file; the count is 292 minus this PR's exports. Full build and ctest -j16: 3062/3062 pass. check_conventions.py --base upstream/main passes.
  • Rebased on main cf79276fee (after #13820), head 52c8fbdfa8, to resolve the conflict on the pending-export count in the debt file. main still says 292 although #13820 removed two stubs, leaving 290, so the count is now set to the 283 stubs left in Export.cpp. It also restores the PS5 3.20 export table link, b2a77c09cd71c01f34c790cfbe98c751a13262ad, which the previous rebase had written without its zeros. Full build and ctest -j16: 3107/3107 pass (log_file failed once on #10486 and passed on five reruns and a second full run). check_conventions.py --base upstream/main passes.
  • Rebased on main 4939814d79 (after #9970, #10078 and #10488), head 475d97d50e, to resolve the conflicts on the shared CMakeLists.txt, Export.cpp, Api.hpp and debt-file lines; both sides are kept. The count is set to the 254 stubs left in Export.cpp. Full build and ctest -j16: 3538/3538 pass. check_conventions.py --base upstream/main passes.
  • Rebased on main 4f41f4c375, head 2b8a0d5d5d, to resolve the conflicts on the shared CMakeLists.txt, Export.cpp and debt-file lines; both sides are kept and the debt count is recomputed from Export.cpp. main now declares namespace LibreSsl in Bio.hpp, so the SSL struct is renamed LibreSslSsl in every commit; layout and static_asserts are unchanged. Full build and ctest -j16: 3796/3800 pass; guest_sce_net, guest_poll, guest_select_wait and guest_memory failed under that load, pass when run alone, and main 4f41f4c375 passes all 3799 with -j16 on the same machine. check_conventions.py --base upstream/main passes.

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: #9446, #9571, #10395, #10418, #10448, #10450, #10477, #10478
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4991923397 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10481). Originally posted by [alvaroelpob](https://github.com/alvaroelpob) on 2026-10-24T02:54:11Z. --- ### What Implements `SSL_get_SSL_CTX`, `SSL_get_rbio`, `SSL_get_wbio`, `SSL_version`, `SSL_get_verify_result`, `SSL_get_shutdown` and `SSL_want` in libSceLibreSsl, which threw and were declared without parameters. The module is LibreSSL 2.5.4 ([firmware 13.40 measurements in #8981](https://github.com/boykopovar/AnyPS5/discussions/8981#discussioncomment-19111214)). Signatures, layouts and results follow that release's [`ssl.h`, `ssl_locl.h` and `ssl_lib.c`](https://github.com/libressl/openbsd/tree/2e2c612066aa993717528a0249c15c51128d61cb/src/lib/libssl): | Export | Behaviour | |---|---| | `SSL_CTX* SSL_get_SSL_CTX(const SSL*)` | `ctx` | | `BIO* SSL_get_rbio(const SSL*)` | `rbio` | | `BIO* SSL_get_wbio(const SSL*)` | `wbio` | | `int SSL_version(const SSL*)` | `version` | | `long SSL_get_verify_result(const SSL*)` | `verify_result`, 64-bit as `long` is on the console | | `int SSL_get_shutdown(const SSL*)` | `internal->shutdown` | | `int SSL_want(const SSL*)` | `internal->rwstate` | The layouts are 232 bytes for `SSL` (`rbio` at 16, `wbio` at 24, `ctx` at 152, `verify_result` at 160, `internal` at 224) and 432 for `ssl_internal_st` (`rwstate` at 156, `shutdown` at 168). They were checked with `static_assert`s and against `offsetof` from the 2.5.4 headers compiled on x86-64. LibreSSL dereferences the connection, and the internal state for the last two, without checking them, so a null for either throws. No export of this module creates a connection yet, so for now only connections built by the caller reach these functions. The debt entry records the source and what is unverified, and the pending-export count drops from 357 to 350. ### Tested <!-- 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. --> Ubuntu 26.04 (WSL2, kernel 6.18), GCC 15.2.0, Release, full build with `BUILD_TESTING=ON` on `main` 379b1dca3. There is one commit per function, and each adds that function with its test block and debt update. Each was built and its `guest_libressl_ssl` test and `check_conventions.py` run on its own. - New `guest_libressl_ssl` test. The pointer getters return null and then their own field, not a neighbour: `ctx` next to `session`, `rbio` next to `wbio`, and `wbio` next to `rbio` and `bbio`. `SSL_version` returns 0, 0x0303 and 0xFEFF. `SSL_get_verify_result` returns 0, 20, a value above 32 bits and -1. `SSL_get_shutdown` returns 0, 1 and 3 with `rwstate` set, and `SSL_want` returns 0, 1 and 3 with `shutdown` set. A null connection throws in all seven, and a null internal state throws in the last two. - Full `ctest -j16` at the last commit: 2005/2006 pass. `agc_driver_multisample_retirement` fails the same way on `main` on this machine. - Not tested: Windows, a title. - Rebased on `main` 1e740a23a3 (after #9033), head 2ca51b6d21: the conflicts were only the `add_library` source list, the end of the test block, the pending-export count and the last debt entry; both sides are kept and the count is 357 minus this PR's exports. Full build and `ctest -j16`: 2043/2044 pass; `agc_driver_multisample_retirement` fails the same way on that `main`. `check_conventions.py --base upstream/main` passes. - Rebased on `main` e7e3e9c198, head a519efda1f, to resolve the conflict from #9529 on the shared `CMakeLists.txt` and debt-file lines; both sides are kept and the count is 353 minus this PR's exports. a519efda1f (`refactor(libSceLibreSsl): declare the SSL accessor exports in the public header`) puts the real signatures and their structs in `libSceLibreSsl/include/Api.hpp` and drops the test's redeclarations, which `public_headers` requires since #10706. Full build and `ctest -j16`: 2202/2203 pass; `agc_driver_multisample_retirement` fails the same way on that `main`. `check_conventions.py --base upstream/main` passes. - Rebased on `main` ae7d59258e (after #9949), head b7ceda9cb4, to resolve the conflicts with `main` on the shared `CMakeLists.txt` and debt-file lines; both sides are kept and the count is 342 minus this PR's exports. Full build and `ctest -j16`: 2275/2276 pass; `agc_driver_multisample_retirement` fails the same way on that `main`. `check_conventions.py --base upstream/main` passes. - Rebased on `main` 2dbe9b99f5 (after #9745, #9870 and #11111), head 2473e1c7e3, to resolve the conflicts with `main` on the shared `CMakeLists.txt` and debt-file lines; both sides are kept and the count is 340 minus this PR's exports. Full build and `ctest -j16`: 2370/2371 pass; `agc_driver_multisample_retirement` fails the same way on that `main`. `check_conventions.py --base upstream/main` passes. - Rebased on `main` 88795ed448 (after #10248; head 42008aa41f) to resolve the conflicts on the shared debt-file lines; both sides are kept and the count is 335 minus this PR's exports. Full build and `ctest -j16`: 2383/2384 pass; `agc_driver_multisample_retirement` fails the same way on that `main`. `check_conventions.py --base upstream/main` passes. - Rebased on `main` c7b4878fa8 (after #10373, #10376 and #10449), head 6cdb701e70, to resolve the conflicts with `main` on the shared `CMakeLists.txt`, `Api.hpp` and debt-file lines; both sides are kept and the count is 319 minus this PR's exports. Full build and `ctest -j16`: 2394/2395 pass; `agc_driver_multisample_retirement` fails the same way on that `main`. `check_conventions.py --base upstream/main` passes. - Rebased on `main` 474030e584 (after #13562), head b651889acc, to resolve the conflict on the pending-export count in the debt file; the count is 292 minus this PR's exports. Full build and `ctest -j16`: 3062/3062 pass. `check_conventions.py --base upstream/main` passes. - Rebased on `main` cf79276fee (after #13820), head 52c8fbdfa8, to resolve the conflict on the pending-export count in the debt file. `main` still says 292 although #13820 removed two stubs, leaving 290, so the count is now set to the 283 stubs left in `Export.cpp`. It also restores the PS5 3.20 export table link, `b2a77c09cd71c01f34c790cfbe98c751a13262ad`, which the previous rebase had written without its zeros. Full build and `ctest -j16`: 3107/3107 pass (`log_file` failed once on #10486 and passed on five reruns and a second full run). `check_conventions.py --base upstream/main` passes. - Rebased on `main` 4939814d79 (after #9970, #10078 and #10488), head 475d97d50e, to resolve the conflicts on the shared `CMakeLists.txt`, `Export.cpp`, `Api.hpp` and debt-file lines; both sides are kept. The count is set to the 254 stubs left in `Export.cpp`. Full build and `ctest -j16`: 3538/3538 pass. `check_conventions.py --base upstream/main` passes. - Rebased on `main` 4f41f4c375, head 2b8a0d5d5d, to resolve the conflicts on the shared `CMakeLists.txt`, `Export.cpp` and debt-file lines; both sides are kept and the debt count is recomputed from `Export.cpp`. `main` now declares `namespace LibreSsl` in `Bio.hpp`, so the SSL struct is renamed `LibreSslSsl` in every commit; layout and `static_assert`s are unchanged. Full build and `ctest -j16`: 3796/3800 pass; `guest_sce_net`, `guest_poll`, `guest_select_wait` and `guest_memory` failed under that load, pass when run alone, and `main` 4f41f4c375 passes all 3799 with `-j16` on the same machine. `check_conventions.py --base upstream/main` passes. ### 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: #9446, #9571, #10395, #10418, #10448, #10450, #10477, #10478 - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
copilot-pull-request-reviewer[bot] commented 2026-10-24 02:56:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by copilot-pull-request-reviewer[bot] on 2026-10-24T02:56:33Z.

Review: COMMENTED


Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5636500235 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10481#pullrequestreview-5636500235). Originally posted by [copilot-pull-request-reviewer[bot]](https://github.com/apps/copilot-pull-request-reviewer) on 2026-10-24T02:56:33Z. **Review:** COMMENTED --- Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
MarcZX10 commented 2026-10-24 15:59:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-24T15:59:15Z.

Review: APPROVED


Reviewed the seven SSL getters against the cited LibreSSL 2.5.4 layout. The field offsets and 64-bit verify-result return are represented explicitly and covered by the static assertions/tests; the internal shutdown/rwstate getters validate the internal pointer as expected. Current head merges cleanly with upstream main, and conventions/diff checks pass. I compiled and ran GuestLibreSslSsl.cpp with Ssl.cpp directly using GCC 12.2.0; it passed. Broader Linux test results are author-reported; hosted product jobs are skipped.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5638871780 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10481#pullrequestreview-5638871780). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-24T15:59:15Z. **Review:** APPROVED --- Reviewed the seven SSL getters against the cited LibreSSL 2.5.4 layout. The field offsets and 64-bit verify-result return are represented explicitly and covered by the static assertions/tests; the internal shutdown/rwstate getters validate the internal pointer as expected. Current head merges cleanly with upstream main, and conventions/diff checks pass. I compiled and ran `GuestLibreSslSsl.cpp` with `Ssl.cpp` directly using GCC 12.2.0; it passed. Broader Linux test results are author-reported; hosted product jobs are skipped.
ahmadmuj commented 2026-10-25 18:05:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ahmadmuj on 2026-10-25T18:05:53Z.

Review: APPROVED


Reviewed head a153cf7eef08453eab25a956d80262c01661495b, merged locally onto main 7a25f87620a9b862dc194dd0f659686b0f6cc8b0. The merge conflicts only in the debt file's first two lines (the pending count next to main's updated Digest line); I took main's lines there to build, it's docs only.

What I ran, Linux x86-64, GCC 13.3, Release:

  • Built libSceLibreSsl and guest_libressl_ssl_tests on the merged tree: guest_libressl_ssl passes. check_conventions.py --base origin/main passes.
  • Red control: with SSL_want returning shutdown instead of rwstate, the test fails at line 131; restored, it passes.
  • Built LibreSSL 2.5.4 from the official tarball (SHA256 107a5b52...6efa, matches the published list) and compiled an offsetof probe against its real ssl.h and ssl/ssl_locl.h. ssl_st is 232 bytes with rbio 16, wbio 24, session 128, ctx 152, verify_result 160 (8-byte long), internal 224. ssl_internal_st is 432 bytes with rwstate 156 and shutdown 168. Every other named field in LibreSsl matches too, so all your static_asserts agree with the compiled headers.
  • Differential: I made three real 2.5.4 connections, copied each SSL and its ssl_internal_st bytes into a buffer, and called your 7 exports from the built libSceLibreSsl.prx next to the 2.5.4 getters. The states were a fresh SSL_new, a client mid-handshake on memory BIOs (wbio swapped for the buffering BIO, SSL_READING, verify 20, both shutdown bits) and a TLS 1.1 server sharing one BIO (0x0302, verify -1, received shutdown). All 21 results are identical.
  • Also checked that 2e2c612066 is the libressl-v2.5.4 tag, that neither struct has #if-guarded members, and that 338 throwing stubs remain in Export.cpp, which matches the new count.

Approving. Not checked: console behaviour, Windows, and a title, since nothing creates an SSL in this module yet, as the debt entry says.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5644551174 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10481#pullrequestreview-5644551174). Originally posted by [ahmadmuj](https://github.com/ahmadmuj) on 2026-10-25T18:05:53Z. **Review:** APPROVED --- Reviewed head `a153cf7eef08453eab25a956d80262c01661495b`, merged locally onto main `7a25f87620a9b862dc194dd0f659686b0f6cc8b0`. The merge conflicts only in the debt file's first two lines (the pending count next to main's updated Digest line); I took main's lines there to build, it's docs only. What I ran, Linux x86-64, GCC 13.3, Release: - Built `libSceLibreSsl` and `guest_libressl_ssl_tests` on the merged tree: `guest_libressl_ssl` passes. `check_conventions.py --base origin/main` passes. - Red control: with `SSL_want` returning `shutdown` instead of `rwstate`, the test fails at line 131; restored, it passes. - Built LibreSSL 2.5.4 from the official tarball (SHA256 `107a5b52...6efa`, matches the published list) and compiled an `offsetof` probe against its real `ssl.h` and `ssl/ssl_locl.h`. `ssl_st` is 232 bytes with rbio 16, wbio 24, session 128, ctx 152, verify_result 160 (8-byte `long`), internal 224. `ssl_internal_st` is 432 bytes with rwstate 156 and shutdown 168. Every other named field in `LibreSsl` matches too, so all your `static_assert`s agree with the compiled headers. - Differential: I made three real 2.5.4 connections, copied each `SSL` and its `ssl_internal_st` bytes into a buffer, and called your 7 exports from the built `libSceLibreSsl.prx` next to the 2.5.4 getters. The states were a fresh `SSL_new`, a client mid-handshake on memory BIOs (wbio swapped for the buffering BIO, `SSL_READING`, verify 20, both shutdown bits) and a TLS 1.1 server sharing one BIO (0x0302, verify -1, received shutdown). All 21 results are identical. - Also checked that 2e2c612066 is the `libressl-v2.5.4` tag, that neither struct has `#if`-guarded members, and that 338 throwing stubs remain in `Export.cpp`, which matches the new count. Approving. Not checked: console behaviour, Windows, and a title, since nothing creates an `SSL` in this module yet, as the debt entry says.
MarcZX10 commented 2026-10-29 08:59:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T08:59:34Z.

Review: DISMISSED


Re-check — changes requested\n\nThe new report is useful: it says the implementation functions were preserved through the merge and the full test suite has the same single known failure as its tested main, with conventions passing. However, the tested integration point is 4c7d275bef; current upstream main is aaccd0ba39, and this PR head is 44 commits behind it.\n\nPlease update onto current main, preserve the implementation and debt-count changes, recount the pending exports against the resulting Export.cpp, and rerun the relevant LibreSSL tests plus conventions on the exact updated head. The earlier approval was for the prior head and does not cover this stale integration point. I did not rerun these checks locally.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5695135091 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10481#pullrequestreview-5695135091). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T08:59:34Z. **Review:** DISMISSED --- ## Re-check — changes requested\n\nThe new report is useful: it says the implementation functions were preserved through the merge and the full test suite has the same single known failure as its tested main, with conventions passing. However, the tested integration point is 4c7d275bef; current upstream main is aaccd0ba39, and this PR head is 44 commits behind it.\n\nPlease update onto current main, preserve the implementation and debt-count changes, recount the pending exports against the resulting Export.cpp, and rerun the relevant LibreSSL tests plus conventions on the exact updated head. The earlier approval was for the prior head and does not cover this stale integration point. I did not rerun these checks locally.
BunnyFl commented 2026-11-04 14:52:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by BunnyFl on 2026-11-04T14:52:02Z.

Review: APPROVED


@alvaroelpob thanks for the invite. The seven getters read the right fields, and the one offset I couldn't confirm in my earlier comment now checks out too.

Firmware: I ran firmware 13.42's system/common/lib/libSceLibreSsl.sprx versions of SSL_want and SSL_get_shutdown again under an emulator, with imports stubbed, not measured on a console. Every 4-byte word of the SSL and of the object its pointer at +0xe0 names held its own offset. SSL_want returned the word at +0x9c (156) of that object and SSL_get_shutdown the word at +0xa8 (168). Those match offsetof(LibreSslSslInternal, rwstate) and shutdown in Ssl.cpp. The other five offsets matched in the earlier run. The two sizes still aren't touched by these calls.

What I ran: head 2b8a0d5d5d merged onto main b11c7bf84f (merge 2ec9ac0bc0), Windows 11, WinLibs GCC, Release, BUILD_TESTING=ON:

  • guest_libressl_ssl and public_headers: 2 of 2 pass.
  • Mutation: with SSL_want returning shutdown instead of rwstate in Ssl.cpp, guest_libressl_ssl fails. A plain negative control doesn't apply: the functions live in src/Ssl.cpp, a file this PR adds.
  • check_conventions.py --base upstream/main passes.
  • pr_overlap.py --branch: #11143 implements the same seven exports in the same new files, but it is stacked on this PR and says Depends on: #10481, as #15278 does. #12729 and #12730 stack on #11143. The other overlaps are the shared CMakeLists.txt, Export.cpp, Api.hpp and debt-file lines that most libSceLibreSsl PRs touch.

Two small things, neither blocking:

  • Depends on still lists #9446 and #9571, which are merged, and six open PRs (#10395, #10418, #10448, #10450, #10477, #10478). This head merges onto main and passes without them (runs above). I haven't checked each one, but the open six look like ordering on the shared lines rather than code this PR needs. If that's so, could the line say none? Otherwise it holds this PR behind them.
  • MarcZX10's change request from 29 October asked only for a rebase and a rerun, and both are done. CONTRIBUTING says pushing alone doesn't answer a change request. An @-mention to MarcZX10 would let the PR back into the queue.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5770371958 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10481#pullrequestreview-5770371958). Originally posted by [BunnyFl](https://github.com/BunnyFl) on 2026-11-04T14:52:02Z. **Review:** APPROVED --- @alvaroelpob thanks for the invite. The seven getters read the right fields, and the one offset I couldn't confirm in [my earlier comment](https://github.com/boykopovar/AnyPS5/pull/10481#issuecomment-6401619499) now checks out too. **Firmware:** I ran firmware 13.42's `system/common/lib/libSceLibreSsl.sprx` versions of `SSL_want` and `SSL_get_shutdown` again under an emulator, with imports stubbed, not measured on a console. Every 4-byte word of the `SSL` and of the object its pointer at +0xe0 names held its own offset. `SSL_want` returned the word at +0x9c (156) of that object and `SSL_get_shutdown` the word at +0xa8 (168). Those match `offsetof(LibreSslSslInternal, rwstate)` and `shutdown` in `Ssl.cpp`. The other five offsets matched in the earlier run. The two sizes still aren't touched by these calls. **What I ran:** head `2b8a0d5d5d` merged onto `main` `b11c7bf84f` (merge `2ec9ac0bc0`), Windows 11, WinLibs GCC, Release, `BUILD_TESTING=ON`: - `guest_libressl_ssl` and `public_headers`: 2 of 2 pass. - Mutation: with `SSL_want` returning `shutdown` instead of `rwstate` in `Ssl.cpp`, `guest_libressl_ssl` fails. A plain negative control doesn't apply: the functions live in `src/Ssl.cpp`, a file this PR adds. - `check_conventions.py --base upstream/main` passes. - `pr_overlap.py --branch`: #11143 implements the same seven exports in the same new files, but it is stacked on this PR and says `Depends on: #10481`, as #15278 does. #12729 and #12730 stack on #11143. The other overlaps are the shared `CMakeLists.txt`, `Export.cpp`, `Api.hpp` and debt-file lines that most libSceLibreSsl PRs touch. Two small things, neither blocking: - `Depends on` still lists #9446 and #9571, which are merged, and six open PRs (#10395, #10418, #10448, #10450, #10477, #10478). This head merges onto `main` and passes without them (runs above). I haven't checked each one, but the open six look like ordering on the shared lines rather than code this PR needs. If that's so, could the line say `none`? Otherwise it holds this PR behind them. - MarcZX10's change request from 29 October asked only for a rebase and a rerun, and both are done. [CONTRIBUTING](https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md#branches-and-pull-requests) says pushing alone doesn't answer a change request. An @-mention to MarcZX10 would let the PR back into the queue.
BunnyFl commented 2026-11-05 17:57:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by BunnyFl on 2026-11-05T17:57:39Z.

Review: APPROVED


@alvaroelpob re-approving at 593267d064, after the merge of main.

What changed since my approval at 2b8a0d5d5d: core/libs/prx/libSceLibreSsl/src/Ssl.cpp and core/libs/tests/GuestLibreSslSsl.cpp are byte-identical between the two heads (git diff --stat is empty for both). The new head adds a merge of main (593267d064).

What I ran: this head merged onto main fc23faa40a (merge 55c027a4a4, clean), Windows 11 Pro 10.0.26300, WinLibs GCC, Release:

  • guest_libressl_ssl and public_headers pass (2 of 2);
  • mutation, SSL_version returning version + 1 (the pattern matched once): guest_libressl_ssl fails with LibreSSL SSL check failed at line 90.

Overlap (tools/pr_overlap.py --branch on this head): no overlap with open pull requests.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5789553485 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10481#pullrequestreview-5789553485). Originally posted by [BunnyFl](https://github.com/BunnyFl) on 2026-11-05T17:57:39Z. **Review:** APPROVED --- @alvaroelpob re-approving at `593267d064`, after the merge of `main`. **What changed since my approval at `2b8a0d5d5d`:** `core/libs/prx/libSceLibreSsl/src/Ssl.cpp` and `core/libs/tests/GuestLibreSslSsl.cpp` are byte-identical between the two heads (`git diff --stat` is empty for both). The new head adds a merge of `main` (`593267d064`). **What I ran:** this head merged onto `main` `fc23faa40a` (merge `55c027a4a4`, clean), Windows 11 Pro 10.0.26300, WinLibs GCC, Release: - `guest_libressl_ssl` and `public_headers` pass (2 of 2); - mutation, `SSL_version` returning `version + 1` (the pattern matched once): `guest_libressl_ssl` fails with `LibreSSL SSL check failed at line 90`. **Overlap** (`tools/pr_overlap.py --branch` on this head): no overlap with open pull requests. AI-assisted: yes (Claude Code)
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!10481
No description provided.