feat(libSceLibreSsl3): implement libtls context and config lifecycle #15289
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15289"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by hyvvs on 2026-11-02T22:48:17Z.
What
Implement 10 previously throwing
libSceLibreSsl3libtls exports:tls_config_new,tls_config_free,tls_config_error,tls_config_set_key_mem,tls_client,tls_server,tls_free,tls_error,tls_configureandtls_close. These exports now have typed guest SysV signatures and opaque public handles. Configurations own and securely clear copied key-memory buffers; contexts retain configurations until release or reconfiguration. A fresh client can be configured and closed, while a server configuration without a certificate fails with an error, matching LibreSSL's preconnection behavior.Signatures and ownership follow OpenBSD libtls, specifically
tls.c,tls_config.c,tls_keypair.c,tls_client.candtls_server.c. Only preconnection lifecycle/configuration semantics are implemented. TLS handshakes, reads, writes, transport, certificate parsing, andtls_config_set_cert_memremain throwing; this PR cannot establish a TLS session. Native PS5 firmware ABI and exact error strings remain unverified, as recorded in technical debt. No additional dependency is introduced.The progress scanner measures
libSceLibreSsl318/270 → 28/270, exactly ten new real function bodies; the pending inventory was updated accordingly.Tested
src/LibTls.cppinto a DLL with an import library, linkedtests/LibTls.cppas a separate guest executable, and ran it successfully. It validates exact typed ABI and 8,192 config/key lifetime and ownership iterations.-fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer;ASAN_OPTIONS=detect_leaks=1:halt_on_error=1,UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1; passed with no sanitizer errors.core/libs/tests/test_public_headers.py --audit-only: 405 libraries / 27,906 exports verified, and affected public-header compilation batches 49, 50 and 51 passed.tools/check_conventions.py --base upstream/mainpassed;git diff --checkpassed;tools/progress.py --module libSceLibreSsl3confirmed ten newly implemented exports.libSceLibreSsl3/CMakeLists.txtand linkslibSceLibreSsl3andlibc.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Pull request closed