Skip to content

feat(libSceLibreSsl): implement the configuration and algorithm registration no-ops - #10475

Closed
Daniil15DDD wants to merge 1 commit into
boykopovar:mainfrom
Daniil15DDD:feat/libressl-init-engine-exports
Closed

Daniil15DDD wants to merge 1 commit into
boykopovar:mainfrom
Daniil15DDD:feat/libressl-init-engine-exports

Conversation

@Daniil15DDD

Copy link
Copy Markdown

What

CONF_modules_free, OPENSSL_load_builtin_modules and OPENSSL_add_all_algorithms_noconf no longer throw. All three are void (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 in docs/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, including guest_libressl_runtime, which now calls the three functions. tools/check_conventions.py --base upstream/main passes. Not tested on a title or on a console.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

…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>
@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

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.

Pull request Shared files not compared
PR 9446 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 9448 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 9535 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 9536 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 9571 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 10078 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 10395 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 10418 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 10448 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 10450 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 10508 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 10570 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 10571 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 10915 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 11003 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 11089 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 11100 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 11105 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 11128 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 11146 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 11151 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 11174 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 11175 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 11189 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 11466 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 11553 docs/dev/debt/libSceLibreSsl.md
PR 11662 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md

@harisibrar1 harisibrar1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_noconf calls OpenSSL_add_all_ciphers() and OpenSSL_add_all_digests() (c_all.c:287-292), OPENSSL_load_builtin_modules calls ASN1_add_oid_module() and ENGINE_add_conf_module(), and CONF_modules_free unloads modules. OPENSSL_add_all_algorithms_noconf only 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's OPENSSL_load_builtin_modules itself calls ENGINE_add_conf_module(), so the same version dependency applies here.
  • In the debt entry, EVP_get_cipherbyname isn't a libSceLibreSsl export. The exported functions that depend on these tables in 2.5.4 are X509_verify_cert (through ASN1_item_verify and EVP_get_digestbynid, which is EVP_get_digestbyname(OBJ_nid2sn(n))) and PEM_read_bio_PrivateKey (through EVP_get_cipherbyname in pem_lib.c). Naming those, and linking the 2.5.4 c_all.c and conf_mall.c, would make the follow-up obligation clear.

Reviewed with AI assistance (Claude Code); the checks above were run locally on my machine.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 24, 2026

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@EagleBearerYS

Copy link
Copy Markdown
Contributor

@Daniil15DDD #10878 (the ENGINE calls) changes lines next to this PR's in core/libs/tests/GuestLibreSslRuntime.cpp and docs/dev/debt/libSceLibreSsl.md. The two implement different exports and compose. I've listed this PR first under #10878's Depends on, so #10878 will merge main after this one lands and keep both.

@github-actions

Copy link
Copy Markdown

Progress report (379b1dc → bb3e575)

📈 System libraries: 48.58% (+0.02%, +3 implemented functions)

✅ 3 implemented
Library Name
libSceLibreSsl CONF_modules_free_nid_postfix
libSceLibreSsl OPENSSL_add_all_algorithms_noconf_nid_postfix
libSceLibreSsl OPENSSL_load_builtin_modules_nid_postfix
⚪ 3 behaviourally empty (constant return or throw)
Library Name
libSceLibreSsl CONF_modules_free_nid_postfix
libSceLibreSsl OPENSSL_add_all_algorithms_noconf_nid_postfix
libSceLibreSsl OPENSSL_load_builtin_modules_nid_postfix

@adriadam10 adriadam10 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_noconf registers the ciphers and digests, OPENSSL_load_builtin_modules registers the ASN1 OID and ENGINE conf modules, CONF_modules_free unloads 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's OPENSSL_load_builtin_modules itself calls ENGINE_add_conf_module().
  • docs/dev/debt/libSceLibreSsl.md:5: EVP_get_cipherbyname is not an export of this library. The exports that depend on these tables in 2.5.4 are X509_verify_cert (via EVP_get_digestbynid) and PEM_read_bio_PrivateKey.
  • The branch conflicts with main in docs/dev/debt/libSceLibreSsl.md; rebase when you update.

Welcome to reopen the discussion once these are addressed.

@oneandonlydean

Copy link
Copy Markdown
Collaborator

@Daniil15DDD thanks for this one. It conflicts with main in core/libs/tests/GuestLibreSslRuntime.cpp and docs/dev/debt/libSceLibreSsl.md, so it needs a rebase. The reviews above agree on the larger point: LibreSSL 2.5.4 does real work in these three functions (it registers and frees configuration modules and the cipher and digest name tables), and the description names no title that needs them. Could you name the title and show it reaches them, or leave the three exports throwing? If a title does need them, the debt entry should say what it does with the result.

@adriadam10

Copy link
Copy Markdown
Collaborator

Closing this one. Three reviewers (and Dean) point at the same problem and there has been no reply or push since:

  • CONF_modules_free, OPENSSL_load_builtin_modules and OPENSSL_add_all_algorithms_noconf do real work in LibreSSL 2.5.4, the version identified for this library in discussion libSceLibreSsl and libSceLibreSsl3 on a LibreSSL submodule #8981 (cipher and digest registration, ASN1 OID and ENGINE conf modules, module unloading). Making them silent no-ops changes behaviour that main reports by throwing.
  • CONTRIBUTING allows a silent stub only when it unblocks a title and affects only the UI; the description names no title.
  • Keeping them throwing leaves nothing in this PR, and implementing the 2.5.4 behaviour is a separate piece of work. The branch also conflicts with main in docs/dev/debt/libSceLibreSsl.md and core/libs/tests/GuestLibreSslRuntime.cpp.

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.

@adriadam10 adriadam10 closed this Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs needs rebase Conflicts with main, rebase needed prx

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants