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

Closed
Daniil15DDD wants to merge 1 commit from upstream-pr/10475 into main
Daniil15DDD commented 2026-10-24 02:40:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Daniil15DDD on 2026-10-24T02:40:19Z.


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
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4991848023 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10475). Originally posted by [Daniil15DDD](https://github.com/Daniil15DDD) on 2026-10-24T02:40:19Z. --- ### 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 - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
harisibrar1 commented 2026-10-24 05:17:55 +00:00 (Migrated from github.com)

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):

  • 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.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5636978230 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10475#pullrequestreview-5636978230). Originally posted by [harisibrar1](https://github.com/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): - 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.
MarcZX10 commented 2026-10-24 16:00:19 +00:00 (Migrated from github.com)

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 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.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5638874877 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10475#pullrequestreview-5638874877). Originally posted by [MarcZX10](https://github.com/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 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.
adriadam10 commented 2026-10-26 17:28:20 +00:00 (Migrated from github.com)

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_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.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5656268854 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10475#pullrequestreview-5656268854). Originally posted by [adriadam10](https://github.com/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_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.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!10475
No description provided.