Repository navigation
feat(libSceLibreSsl): implement the configuration and algorithm registration no-ops - #10475
Daniil15DDD wants to merge 1 commit into
Conversation
…tration no-ops CONF_modules_free, OPENSSL_load_builtin_modules and OPENSSL_add_all_algorithms_noconf return without effect; no module list or name table is modelled yet. Recorded under Silent stubs in the library's technical debt file. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
harisibrar1
left a comment
There was a problem hiding this comment.
Checked against main 7966e59, 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):
- The
void(void)signatures match 2.5.4, and the pending count of 362 is right. - In 2.5.4, which discussion #8981 identifies as libSceLibreSsl's version, these functions do work:
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. - Because of that, these read as silent stubs. CONTRIBUTING.md allows a silent stub only when it unblocks a title and only affects the UI, and the PR lists no title. Could they stay throwing until a title needs them, or could the PR name the title?
- The PR keeps
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. - In the debt entry,
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.
MarcZX10
left a comment
There was a problem hiding this comment.
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 and CONF_modules_free behavior. 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 in docs/dev/debt/libSceLibreSsl.md (git merge-tree); resolve that when rebasing the concurrent debt updates.
|
@Daniil15DDD #10878 (the ENGINE calls) changes lines next to this PR's in |
Progress report (379b1dc → bb3e575)📈 System libraries: 48.58% (+0.02%, +3 implemented functions) ✅ 3 implemented
⚪ 3 behaviourally empty (constant return or throw)
|
adriadam10
left a comment
There was a problem hiding this comment.
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.- The same version dependency you cite for keeping
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.- The branch conflicts with
mainindocs/dev/debt/libSceLibreSsl.md; rebase when you update.
Welcome to reopen the discussion once these are addressed.
|
@Daniil15DDD thanks for this one. It conflicts with |
|
Closing this one. Three reviewers (and Dean) point at the same problem and there has been no reply or push since:
You're welcome to reopen, rebased, with either the real 2.5.4 behaviour and tests that pin it, or the title that reaches these calls and what it does with the result. |
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)