feat(libSceSsl): add the connection calls #5226

Merged
ErenYeager1836 merged 3 commits from upstream-pr/5226 into main 2026-10-14 09:55:57 +00:00
ErenYeager1836 commented 2026-10-13 15:13:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ErenYeager1836 on 2026-10-13T15:13:38Z.


What

Carried from @screamm with author attribution preserved.

Implements connection lifecycle and parameter exports in libSceSsl:

  • Implements sceSslCreateConnection, sceSslConnect, sceSslRead, sceSslWrite, sceSslDeleteConnection, and sceSslSetVerifyCallback.
  • Manages connection context tracking, socket peer port lookup via sceNetGetpeername, and verification callbacks following SharpProspero Http.cs bindings.
  • Returns SSL_ERROR_INVALID_ID (0x8095F006) for unknown context IDs and throws on null hosts or unimplemented handshake initiation.
  • Updates docs/dev/debt/libSceSsl.md.

Tested

GuestSsl.cpp: exercises connection creation, context validation, callback registration, deletion, and socket lifecycle checks.

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
  • Unblocks: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4845375983 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5226). Originally posted by [ErenYeager1836](https://github.com/ErenYeager1836) on 2026-10-13T15:13:38Z. --- ### What Carried from @screamm with author attribution preserved. Implements connection lifecycle and parameter exports in libSceSsl: - Implements sceSslCreateConnection, sceSslConnect, sceSslRead, sceSslWrite, sceSslDeleteConnection, and sceSslSetVerifyCallback. - Manages connection context tracking, socket peer port lookup via sceNetGetpeername, and verification callbacks following SharpProspero Http.cs bindings. - Returns SSL_ERROR_INVALID_ID (0x8095F006) for unknown context IDs and throws on null hosts or unimplemented handshake initiation. - Updates docs/dev/debt/libSceSsl.md. ### Tested GuestSsl.cpp: exercises connection creation, context validation, callback registration, deletion, and socket lifecycle checks. ### 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 - [x] Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file - [x] No notes, investigation .md files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: none - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-13 15:14:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-13T15:14:57Z.


Progress report (d8888df → 8e68896)

📈 System libraries: 88.28% (+0.08%, +3 implemented functions)

✅ 3 implemented
Library Name
libSceSsl sceSslCreateConnection
libSceSsl sceSslDeleteConnection
libSceSsl sceSslSetVerifyCallback
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6148806135 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5226#issuecomment-6148806135). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-13T15:14:57Z. --- <!-- progress-report --> ### Progress report (d8888df → 8e68896) 📈 **System libraries**: 88.28% (+0.08%, +3 implemented functions) <details> <summary>✅ 3 implemented</summary> | Library | Name | | - | - | | libSceSsl | `sceSslCreateConnection` | | libSceSsl | `sceSslDeleteConnection` | | libSceSsl | `sceSslSetVerifyCallback` | </details>
adriadam10 commented 2026-10-13 15:20:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-13T15:20:08Z.


Thanks for carrying this. On top of current main it did not build: the old parameterless (void) stubs of sceSslCreateConnection, sceSslDeleteConnection, sceSslSetVerifyCallback, sceSslConnect, sceSslRead and sceSslWrite were still in Export.cpp (conflicting C declarations), and GuestSsl.cpp still called sceSslSetVerifyCallback() with no arguments.

I added one commit on your branch removing those stubs and the old test line. The scoped build and tests (27, including guest_ssl) pass. Merging once the Windows build is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6148911310 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5226#issuecomment-6148911310). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-13T15:20:08Z. --- Thanks for carrying this. On top of current `main` it did not build: the old parameterless `(void)` stubs of `sceSslCreateConnection`, `sceSslDeleteConnection`, `sceSslSetVerifyCallback`, `sceSslConnect`, `sceSslRead` and `sceSslWrite` were still in `Export.cpp` (conflicting C declarations), and `GuestSsl.cpp` still called `sceSslSetVerifyCallback()` with no arguments. I added one commit on your branch removing those stubs and the old test line. The scoped build and tests (27, including `guest_ssl`) pass. Merging once the Windows build is green.
oneandonlydean commented 2026-10-14 06:39:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T06:39:00Z.


sceSslConnect, sceSslRead and sceSslWrite still can't do anything here, but they now throw their own runtime_error instead of NotImplemented_nid_no_patch(__func__), so the progress report counts them as implemented. Please keep those three as NotImplemented_nid_no_patch(__func__) stubs until there is a transport. Which title calls the connection functions?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6162496841 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5226#issuecomment-6162496841). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-14T06:39:00Z. --- `sceSslConnect`, `sceSslRead` and `sceSslWrite` still can't do anything here, but they now throw their own `runtime_error` instead of `NotImplemented_nid_no_patch(__func__)`, so the progress report counts them as implemented. Please keep those three as `NotImplemented_nid_no_patch(__func__)` stubs until there is a transport. Which title calls the connection functions?
ErenYeager1836 commented 2026-10-14 06:56:20 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ErenYeager1836 on 2026-10-14T06:56:20Z.


Updated as requested! Kept sceSslConnect, sceSslRead, and sceSslWrite as NotImplemented_nid_no_patch(func) stubs so they remain counted as todo/unimplemented in progress reports until TLS transport is implemented, and cleaned up the unused transport exception helpers and tests.

Regarding which title calls the connection functions:

  • They were originally introduced as parameterless stubs for PPSA07411 (Resident Evil 4) in commit 03afed4c ( ix(exports): export the calls PPSA07411 imports), as RE4 failed to load without them.
  • They are also imported by titles using fmpeg.prx (e.g., media playback/streaming).
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6162741245 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5226#issuecomment-6162741245). Originally posted by [ErenYeager1836](https://github.com/ErenYeager1836) on 2026-10-14T06:56:20Z. --- Updated as requested! Kept sceSslConnect, sceSslRead, and sceSslWrite as NotImplemented_nid_no_patch(__func__) stubs so they remain counted as todo/unimplemented in progress reports until TLS transport is implemented, and cleaned up the unused transport exception helpers and tests. Regarding which title calls the connection functions: - They were originally introduced as parameterless stubs for **PPSA07411** (*Resident Evil 4*) in commit 03afed4c ( ix(exports): export the calls PPSA07411 imports), as RE4 failed to load without them. - They are also imported by titles using fmpeg.prx (e.g., media playback/streaming).
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!5226
No description provided.