feat(libSceLibreSsl): implement the configuration and algorithm registration no-ops #10475
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10475"
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 Daniil15DDD on 2026-10-24T02:40:19Z.
What
CONF_modules_free,OPENSSL_load_builtin_modulesandOPENSSL_add_all_algorithms_noconfno longer throw. All three arevoid (void)and return without effect. In LibreSSL they release or register configuration modules and the cipher and digest name tables; neither is modelled, because no export that reads them is implemented yet (CONF_modules_load_file,OBJ_*,EVP_get_cipherbyname). The functions are listed under Silent stubs indocs/dev/debt/libSceLibreSsl.md, and the pending-export count there drops from 365 to 362.The
ENGINE_*exports are left throwing: the pinned LibreSSL source stubs them out, while LibreSSL 2.5.4 (the version identified in the debt file) has real engines, so their behaviour depends on the version.Tested
Windows 11, MinGW-w64 GCC 16.2.0 (UCRT, POSIX threads, SEH), full build.
ctest -R libressl: 5 of 5 pass, includingguest_libressl_runtime, which now calls the three functions.tools/check_conventions.py --base upstream/mainpasses. Not tested on a title or on a console.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 harisibrar1 on 2026-10-24T05:17:55Z.
Review: COMMENTED
Checked against main
7966e590ef, LibreSSL libressl-v2.5.4 (evp/c_all.c, conf/conf_mall.c, conf/conf_mod.c, asn1/a_verify.c, pem/pem_lib.c) and libressl-v4.0.0 (crypto_init.c):void(void)signatures match 2.5.4, and the pending count of 362 is right.OPENSSL_add_all_algorithms_noconfcallsOpenSSL_add_all_ciphers()andOpenSSL_add_all_digests()(c_all.c:287-292),OPENSSL_load_builtin_modulescallsASN1_add_oid_module()andENGINE_add_conf_module(), andCONF_modules_freeunloads modules.OPENSSL_add_all_algorithms_noconfonly becomes an empty function in 4.x (crypto_init.c), which is libSceLibreSsl3's version.ENGINE_*throwing because 2.5.4 has real engines, but 2.5.4'sOPENSSL_load_builtin_modulesitself callsENGINE_add_conf_module(), so the same version dependency applies here.EVP_get_cipherbynameisn't a libSceLibreSsl export. The exported functions that depend on these tables in 2.5.4 areX509_verify_cert(throughASN1_item_verifyandEVP_get_digestbynid, which isEVP_get_digestbyname(OBJ_nid2sn(n))) andPEM_read_bio_PrivateKey(throughEVP_get_cipherbynameinpem_lib.c). Naming those, and linking the 2.5.4c_all.candconf_mall.c, would make the follow-up obligation clear.Reviewed with AI assistance (Claude Code); the checks above were run locally on my machine.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-24T16:00:19Z.
Review: CHANGES_REQUESTED
The current implementation does not match the version this repository identifies for
libSceLibreSsl: LibreSSL 2.5.4 implements these functions (the cited 2.5.4 behavior is also confirmed in the existing review), so unconditional no-ops discard module registration/algorithm initialization andCONF_modules_freebehavior. The PR gives no title/UI-only use, while CONTRIBUTING.md permits silent stubs only when they unblock a title and affect only the UI. Please keep these exports throwing until their real 2.5.4 behavior is implemented, or provide a specific qualifying title use and implement the version-correct behavior. Also, the branch currently conflicts with current main indocs/dev/debt/libSceLibreSsl.md(git merge-tree); resolve that when rebasing the concurrent debt updates.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-26T17:28:20Z.
Review: CHANGES_REQUESTED
Thanks for the PR. Requesting changes, in line with the existing reviews:
core/libs/prx/libSceLibreSsl/src/Runtime.cpp:13-20: the three functions are silent no-ops, but in LibreSSL 2.5.4 (the version identified for this library in discussion #8981) they do real work:OPENSSL_add_all_algorithms_noconfregisters the ciphers and digests,OPENSSL_load_builtin_modulesregisters the ASN1 OID and ENGINE conf modules,CONF_modules_freeunloads modules. CONTRIBUTING allows a silent stub only when it unblocks a title and affects only the UI. Either keep them throwing until the real behaviour is implemented, or name the title that needs them and implement the 2.5.4 behaviour.ENGINE_*throwing applies here: 2.5.4'sOPENSSL_load_builtin_modulesitself callsENGINE_add_conf_module().docs/dev/debt/libSceLibreSsl.md:5:EVP_get_cipherbynameis not an export of this library. The exports that depend on these tables in 2.5.4 areX509_verify_cert(viaEVP_get_digestbynid) andPEM_read_bio_PrivateKey.mainindocs/dev/debt/libSceLibreSsl.md; rebase when you update.Welcome to reopen the discussion once these are addressed.
Pull request closed