Repository navigation
feat(libSceSsl): add the connection calls - #5226
oneandonlydean merged 3 commits into
Conversation
Implements connection lifecycle and parameter exports in libSceSsl: sceSslCreateConnection, sceSslConnect, sceSslRead, sceSslWrite, sceSslDeleteConnection, and sceSslSetVerifyCallback. The repository has no TLS client, so a connection records its context, socket, host and verification callback: - sceSslCreateConnection returns a new connection id, or SSL_ERROR_INVALID_ID (0x8095F006) for an unknown context. A null host throws. - sceSslDeleteConnection drops the connection and leaves socket open. - sceSslSetVerifyCallback stores the callback and argument. - sceSslConnect, sceSslRead and sceSslWrite throw where handshake starts, naming the host and the socket peer port. Carried from @screamm with author attribution preserved. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
|
Thanks for carrying this. On top of current I added one commit on your branch removing those stubs and the old test line. The scoped build and tests (27, including |
3e134c1 to
793bd22
Compare
|
|
|
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:
|
…t callback sceSaveDataRegisterEventCallback and sceSaveDataUnregisterEventCallback were parameterless declarations that threw. They now follow shadPS4 #5226: registering before initialization is NOT_INITIALIZED, a null callback is PARAMETER, a second registration replaces the callback and its userdata, and unregistering needs no initialization. Every backup completion that queues an event for sceSaveDataGetEventResult, type 2 from sceSaveDataBackup and type 1 from sceSaveDataUmountWithBackup, is queued for polling first and then handed to the callback registered at that moment. A library thread delivers it: sceSaveDataInitialize3 starts it with scePthreadCreate, as libSceUsbStorage starts its monitor, so the callback runs on a guest thread, and the last sceSaveDataTerminate joins it. Unregistering waits for a running callback and drops completions not yet delivered, and a terminate from inside the callback returns BUSY instead of joining its own thread, as shadPS4 does. guest_savedata_event_callback covers the errors, both event types, the delivering thread, unregistration, replacement, a terminate from inside the callback and an idle terminate followed by a restart.
What
Carried from @screamm with author attribution preserved.
Implements connection lifecycle and parameter exports in libSceSsl:
Tested
GuestSsl.cpp: exercises connection creation, context validation, callback registration, deletion, and socket lifecycle checks.
Checklist