feat(libSceLibreSsl3): implement OPENSSL_init_ssl #15631
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15631"
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 alvaroelpob on 2026-11-03T22:29:12Z.
What
Implements
OPENSSL_init_sslin libSceLibreSsl3. In LibreSSL 4.0.0ssl_init.c, whereSSL_library_initcalls it, it returns 1 and its work isOPENSSL_init_crypto, the error string loaders, which are empty in the firmware module, and the configuration step:OPENSSL_INIT_NO_LOAD_CONFIGsettles the configuration without loading it, andOPENSSL_INIT_LOAD_CONFIGbefore that throws, because loading the console's configuration file is not modelled.Tested
Linux x86-64 (WSL2), Release: the full build passes and
ctest --test-dir build -j16passes 3883 of 3883 tests, including the newguest_libressl3_init_ssl, at head f607f72a09, rebased onmainb11c7bf84f. The test fails if theOPENSSL_INIT_LOAD_CONFIGthrow is removed.python3 tools/check_conventions.py --base upstream/mainpasses. Not run on a console or in a title.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)Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T23:11:57Z.
Review: COMMENTED
Reviewed — comments
The change merges cleanly, builds, and passes its test, and the negative control fails as it should. One question about behaviour is still open: in LibreSSL,
OPENSSL_init_sslalso runsSSL_library_init. This implementation skips that step, and the repository's ownSSL_library_initstill throws.What I ran
Head
996523a7520f60fc362ae80d5940e9b08616077dmerged intomain1c8c0efc8c41314402e6966da5bef6ea3d639d10(merged treeca6ffc2e63ee22ee03a33c7c8dc8a3f1aa7a4d6e). Debian 13 VM, GCC 14.2.0, Release, Ninja.Results
git diff --checkcheck_conventions.pyunwrap_self_..._inherits_the_destination_directory_group) also fails onmain, so it is not caused by this PRguest_libressl3_init_sslpublic_headers*(65 tests)Negative control
I replaced
src/InitSsl.cppwith a stub that has the same signature and callsNotImplemented_nid_no_patch, which is whatmaindoes. After a rebuild,guest_libressl3_init_sslfailed:output
I then restored the merged file and rebuilt. The test passes again, and
git status --porcelainis empty.Findings
Blocking
None.
Non-blocking
SSL_library_initstep is not accounted for. In LibreSSL, the once-only initialisation ofOPENSSL_init_sslruns bothSSL_load_error_strings()andSSL_library_init().InitSsl.cpp#L16-L20skipsSSL_library_initwithout saying why.SSL_library_initin libSceLibreSsl still throws (Export.cpp#L966-L969). The code base therefore treats that step as unimplemented, butOPENSSL_init_sslsilently treats it as done.If the firmware's
SSL_library_init(and theEVP_add_*calls it makes) really does nothing observable, please say so in the debt entry with the same evidence, and ideally makeSSL_library_initreturn 1 in a follow-up. Otherwise,OPENSSL_init_sslshould throw likeSSL_library_initdoes.The throw path is not tested. The test only calls
OPENSSL_INIT_LOAD_CONFIGafter the configuration is settled. No test checks thatOPENSSL_INIT_LOAD_CONFIGthrows in a fresh process. A second small executable, registered withWILL_FAILor as a death-style check, would cover the one branch that differs from "return 1".Duplicate
if(WIN32)block.CMakeLists.txt#L114-L121adds a separateif(WIN32)block that sets the samePATHmodification. Addingguest_libressl3_init_sslto the existingset_tests_propertieslist below it would avoid repeating the block.Not verified
ssl_init.clines or the firmware 13.42 disassembly comment, because there was no network. The claims that the return value is always 1 and that the loaders are empty are taken from the description, not checked.PATHsetup were not tested.To get this to a good state
Explain in the debt entry why skipping
SSL_library_initmatches the console, or make the function throw until it is settled. Optionally, add a test for theOPENSSL_INIT_LOAD_CONFIGthrow path.