feat(libSceLibreSsl3): implement SSL_set_info_callback #16979
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/16979"
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 GalaxyGamingFR on 2026-11-08T03:52:03Z.
What
Implement
SSL_set_info_callbackinlibSceLibreSsl3, replacing its parameterless throwing placeholder inAdditionalExports.cpp.ce488b78ssl_lib.c, the revision the library's debt file already uses. Upstream only stores the callback inssl->info_callback.LibreSsl3SslinSsl.hpppreviously stopped after the fields the existing retains andSSL_get_client_randomread (184 bytes). It now runs throughinfo_callbackof thessl_stLP64 layout, 320 bytes, with the callback at 312. The existing asserts are kept, and new ones pininitial_ctx(224),min_tls_version(240),quic_transport_params(280) andinfo_callback(312), so a wrong field in the middle fails to compile. Nothing in the tree allocates anSSLbysizeof, so the larger size changes no existing behaviour.Api.hppnow declares it asvoid SSL_set_info_callback(LibreSsl3Ssl* ssl, LibreSsl3InfoCallback callback), withLibreSsl3InfoCallbackasvoid (*)(const LibreSsl3Ssl*, int type, int value), matching upstream's prototype.std::invalid_argument, where upstream would dereference it.The gap is recorded in
docs/dev/debt/libSceLibreSsl3.md: no handshake runs here, so the callback is never called, and the console layout is not measured. The export inventory is updated (138 exports, 128 named).No title's trace or disassembly was used, and the export was not measured on a PS5.
Tested
Windows 11, WinLibs GCC 15.2.0 UCRT. This is not a full CMake build. I compiled
tests/GuestLibreSsl3Ssl.cppwith libSceLibreSsl3'sSsl.cpp,Key.cpp,X509.cpp,Asn1Values.cppandIntegerDecoder.cppand libSceLibreSsl'sError.cppinto one executable, withAPS5_VABIdefined empty, a one-lineNotImplementedAt_nid_no_patchthat throws, andmalloc/calloc/freeshims. No title or homebrew, and not built on Linux or macOS.CheckInfoCallbackfills a guarded SSL with0x5A, sets a callback and checks that only the 8 bytes at offset 312 changed and now hold the callback. It then sets a null callback and checks that those bytes are cleared, and checks that a null SSL throws.handshake_func(offset 304), and not throwing on a null SSL.-Wall -Wextrais clean for the changed files, andpython tools/check_conventions.py --base origin/mainpasses.I searched open and merged pull requests for
SSL_set_info_callbackjust before opening this one, and none implements it. #16586, #16588, #16589, #16848, #16918 and #16977 change the same export inventory count, so whichever lands later needs a one-line rebase.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)🤖 Generated with Claude Code