feat(libSceLibreSsl3): name 116 unknown additional exports from their NIDs #13831

Merged
CodingBreadd merged 2 commits from upstream-pr/13831 into main 2026-11-01 03:28:03 +00:00
CodingBreadd commented 2026-10-31 08:41:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by CodingBreadd on 2026-10-31T08:41:39Z.


What

Names 116 of the 126 Unknown_*_nid_no_patch exports in libSceLibreSsl3's AdditionalExports.cpp. Each new name is the LibreSSL identifier whose tools/nid_names.py hash equals the stub's NID; candidates were every identifier in the LibreSSL 3.8.4 and 4.0.0 include, crypto, ssl and tls sources. Examples: SSL_CTX_set_ciphersuites, SSL_provide_quic_data, X509_digest, EVP_PKEY_derive, BIO_meth_new, RSA_set0_key, tls_handshake.

Every renamed export still throws through NotImplemented_nid_no_patch, keeps the no-parameter import-resolution convention and carries _nid_postfix. The stubs are renamed in place in the unknown sections of AdditionalExports.cpp and include/Api.hpp, so each keeps its single declaration. Missing-import and unimplemented-call errors now name the function instead of the NID. In the debt table the 116 rows get their names, and a new entry records that a name match does not establish LibreSSL's prototype or behavior.

Left out:

  • BN_is_negative, EVP_CIPHER_nid and RSA_bits also hash to their NIDs, but #14008 implements them.
  • ERR_print_errors_fp, ERR_load_ERR_strings and ECDSA_do_verify also hash to their NIDs, but their debt table rows border the rows #13659 removes (EVP_CIPHER_iv_length, EVP_CIPHER_key_length).
  • i2d_PUBKEY borders the X509_VERIFY_PARAM_set_flags row that #13662 removes.
  • AES_wrap_key and ECDSA_SIG_free border the EVP_MD_CTX_md row that #13663 removes.
  • PBYz0kpXwg8 hashes to no identifier of those sources.
  • The debt entry's counts line ("54 named and 126 known only by NID") is unchanged, because #13659, #13662 and #13663 each edit it.

No other open pull request names or defines any of the 116 names in any library. tools/pr_overlap.py found 23 open PRs sharing files with this branch and no shared exports among the 10 it could compare. The other 13 already conflict with main: #9571, #9970, #10461, #10557, #10631, #10960, #12315, #12578, #12580, #12582, #12754, #12928 and #12945. Compared by hand, their hunks in include/Api.hpp and the debt file change named stubs, signatures and other entries; none touches an Unknown_ declaration, an unknown table row or any of the 116 names or NIDs. No open PR changes the unknown section of AdditionalExports.cpp. #10490's debt text says RSA_set0_key is not declared; that PR neither declares nor renames the stub, and its sentence goes stale once this merges.

Tested

Windows 11, WinLibs GCC 15.2.0 (UCRT, POSIX, SEH). Built libSceLibreSsl3 and the patched libSceLibreSsl3.prx on main and on this branch; the patched export table holds the same 665 NIDs as on main, and only the 116 Unknown_*_nid_no_patch alias names are gone. ctest -R "guest_crypto_memcmp|guest_libressl3_": 5/5 passed. The public_headers audit (393 libraries, 24655 exports), run directly because it exceeds its 90 s CTest limit on this loaded machine, passed; ctest -R public_headers_compile: 61/64 passed, and batches 19, 20 and 21, which exceeded their 30 s CTest limit, passed when run directly with the CTest command lines. tools/check_conventions.py --base origin/main passes. No title tested.

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

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5096017226 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13831). Originally posted by [CodingBreadd](https://github.com/CodingBreadd) on 2026-10-31T08:41:39Z. --- ### What Names 116 of the 126 `Unknown_*_nid_no_patch` exports in libSceLibreSsl3's `AdditionalExports.cpp`. Each new name is the LibreSSL identifier whose `tools/nid_names.py` hash equals the stub's NID; candidates were every identifier in the LibreSSL 3.8.4 and 4.0.0 `include`, `crypto`, `ssl` and `tls` sources. Examples: `SSL_CTX_set_ciphersuites`, `SSL_provide_quic_data`, `X509_digest`, `EVP_PKEY_derive`, `BIO_meth_new`, `RSA_set0_key`, `tls_handshake`. Every renamed export still throws through `NotImplemented_nid_no_patch`, keeps the no-parameter import-resolution convention and carries `_nid_postfix`. The stubs are renamed in place in the unknown sections of `AdditionalExports.cpp` and `include/Api.hpp`, so each keeps its single declaration. Missing-import and unimplemented-call errors now name the function instead of the NID. In the debt table the 116 rows get their names, and a new entry records that a name match does not establish LibreSSL's prototype or behavior. Left out: - `BN_is_negative`, `EVP_CIPHER_nid` and `RSA_bits` also hash to their NIDs, but #14008 implements them. - `ERR_print_errors_fp`, `ERR_load_ERR_strings` and `ECDSA_do_verify` also hash to their NIDs, but their debt table rows border the rows #13659 removes (`EVP_CIPHER_iv_length`, `EVP_CIPHER_key_length`). - `i2d_PUBKEY` borders the `X509_VERIFY_PARAM_set_flags` row that #13662 removes. - `AES_wrap_key` and `ECDSA_SIG_free` border the `EVP_MD_CTX_md` row that #13663 removes. - `PBYz0kpXwg8` hashes to no identifier of those sources. - The debt entry's counts line ("54 named and 126 known only by NID") is unchanged, because #13659, #13662 and #13663 each edit it. No other open pull request names or defines any of the 116 names in any library. `tools/pr_overlap.py` found 23 open PRs sharing files with this branch and no shared exports among the 10 it could compare. The other 13 already conflict with `main`: #9571, #9970, #10461, #10557, #10631, #10960, #12315, #12578, #12580, #12582, #12754, #12928 and #12945. Compared by hand, their hunks in `include/Api.hpp` and the debt file change named stubs, signatures and other entries; none touches an `Unknown_` declaration, an `unknown` table row or any of the 116 names or NIDs. No open PR changes the unknown section of `AdditionalExports.cpp`. #10490's debt text says `RSA_set0_key` is not declared; that PR neither declares nor renames the stub, and its sentence goes stale once this merges. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Windows 11, WinLibs GCC 15.2.0 (UCRT, POSIX, SEH). Built `libSceLibreSsl3` and the patched `libSceLibreSsl3.prx` on `main` and on this branch; the patched export table holds the same 665 NIDs as on `main`, and only the 116 `Unknown_*_nid_no_patch` alias names are gone. `ctest -R "guest_crypto_memcmp|guest_libressl3_"`: 5/5 passed. The `public_headers` audit (393 libraries, 24655 exports), run directly because it exceeds its 90 s CTest limit on this loaded machine, passed; `ctest -R public_headers_compile`: 61/64 passed, and batches 19, 20 and 21, which exceeded their 30 s CTest limit, passed when run directly with the CTest command lines. `tools/check_conventions.py --base origin/main` passes. No title tested. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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!13831
No description provided.