feat(libSceLibreSsl3): accept null X509 item disposal #16689

Merged
MarrasFederico merged 23 commits from upstream-pr/16689 into main 2026-11-13 21:13:05 +00:00
MarrasFederico commented 2026-11-07 13:27:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarrasFederico on 2026-11-07T13:27:57Z.


Supersedes #16185, which GitHub closed when the head fork was deleted. Earlier review comments and Windows checks are on #16185.

What

AUTHORITY_KEYID_free and X509_CRL_free now accept null as a no-op. All non-null objects remain unsupported and throw before dereference. Their void(void*) declarations replace the unknown-signature placeholders; the bodies move out of AdditionalExports.cpp. X509_EXTENSION_free is left to the extension stack implementation (#17147). AdditionalExports.cpp declares 63 still-unimplemented callable exports: 59 named and 4 known only by NID (matching the 63 table rows in docs/dev/debt/libSceLibreSsl3.md and 19 NotImplemented_nid_no_patch stubs in Export.cpp, after merging main 79e407ded7).

AUTHORITY_KEYID_free and X509_CRL_free - not measured on a PS5; non-null object disposal remains unsupported and throws before dereference. The null no-op follows LibreSSL 4.0.0 AUTHORITY_KEYID_free (x509_akeya.c), X509_CRL_free (x_crl.c) and their ASN1_item_free dispatcher (tasn_fre.c).

Tested

Ubuntu 26.04.1 LTS, kernel 7.0.0-43-generic, GCC 15.2.0, Release, BUILD_TESTING=ON, CMake 4.4.4 with Ninja 1.13.2 from a virtualenv. Merged upstream/main (79e407ded7) with normal merge commit 3a2ce6e25b (full 3a2ce6e25ba700610dce3b1c97005985d4c41b06); published history was not rebased, squashed or force-pushed. Windows and macOS were not compiled here; no game title was run.

  • Built target(s): core/libs/prx/libSceLibreSsl3/all.
  • ctest -R 'libressl3' --output-on-failure: 100% tests passed out of 69 (exit 0).
  • ctest -R '^guest_libressl3_x509' --output-on-failure: 100% tests passed out of 11 (exit 0).
  • python3 tools/check_conventions.py --base upstream/main: "All conventions checks passed." (exit 0, 0 errors).
  • python3 core/libs/tests/test_public_headers.py --audit-only: 413 libraries, 34519 exports: unique declarations and umbrella coverage verified.
  • git diff --check upstream/main...HEAD: clean.

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:5202054408 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/16689). Originally posted by [MarrasFederico](https://github.com/MarrasFederico) on 2026-11-07T13:27:57Z. --- Supersedes #16185, which GitHub closed when the head fork was deleted. Earlier review comments and Windows checks are on #16185. ### What `AUTHORITY_KEYID_free` and `X509_CRL_free` now accept null as a no-op. All non-null objects remain unsupported and throw before dereference. Their `void(void*)` declarations replace the unknown-signature placeholders; the bodies move out of `AdditionalExports.cpp`. `X509_EXTENSION_free` is left to the extension stack implementation (#17147). `AdditionalExports.cpp` declares 63 still-unimplemented callable exports: 59 named and 4 known only by NID (matching the 63 table rows in `docs/dev/debt/libSceLibreSsl3.md` and 19 `NotImplemented_nid_no_patch` stubs in `Export.cpp`, after merging `main` `79e407ded7`). `AUTHORITY_KEYID_free` and `X509_CRL_free` - not measured on a PS5; non-null object disposal remains unsupported and throws before dereference. The null no-op follows LibreSSL 4.0.0 `AUTHORITY_KEYID_free` (`x509_akeya.c`), `X509_CRL_free` (`x_crl.c`) and their `ASN1_item_free` dispatcher (`tasn_fre.c`). ### Tested Ubuntu 26.04.1 LTS, kernel 7.0.0-43-generic, GCC 15.2.0, Release, `BUILD_TESTING=ON`, CMake 4.4.4 with Ninja 1.13.2 from a virtualenv. Merged `upstream/main` (`79e407ded7`) with normal merge commit `3a2ce6e25b` (full `3a2ce6e25ba700610dce3b1c97005985d4c41b06`); published history was not rebased, squashed or force-pushed. Windows and macOS were not compiled here; no game title was run. - Built target(s): `core/libs/prx/libSceLibreSsl3/all`. - `ctest -R 'libressl3' --output-on-failure`: **100% tests passed out of 69** (exit 0). - `ctest -R '^guest_libressl3_x509' --output-on-failure`: **100% tests passed out of 11** (exit 0). - `python3 tools/check_conventions.py --base upstream/main`: "All conventions checks passed." (exit 0, 0 errors). - `python3 core/libs/tests/test_public_headers.py --audit-only`: 413 libraries, 34519 exports: unique declarations and umbrella coverage verified. - `git diff --check upstream/main...HEAD`: clean. ### 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
gabichuuuuu commented 2026-11-08 21:44:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by gabichuuuuu on 2026-11-08T21:44:23Z.

Review: COMMENTED


Windows run of head 6602cf2910, merged onto main 095ff72367 in one tree with other open PRs that touch different files (each PR's test is its own file, so they don't interact). Setup: Windows 11, WinLibs GCC 15.2 r7 (x86_64-ucrt-posix-seh, the CI toolchain), Release, BUILD_TESTING=ON.

  • guest_libressl3_x509_item_free with --repeat until-fail:5: 5 / 5 pass.
  • No runnable negative control: the test calls the new one-argument prototypes, which main doesn't have.

The null cases match LibreSSL: each of these is an ASN1_item_free wrapper, which returns early on null.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5819794813 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/16689#pullrequestreview-5819794813). Originally posted by [gabichuuuuu](https://github.com/gabichuuuuu) on 2026-11-08T21:44:23Z. **Review:** COMMENTED --- Windows run of head `6602cf2910`, merged onto `main` `095ff72367` in one tree with other open PRs that touch different files (each PR's test is its own file, so they don't interact). Setup: Windows 11, WinLibs GCC 15.2 r7 (`x86_64-ucrt-posix-seh`, the CI toolchain), Release, `BUILD_TESTING=ON`. - `guest_libressl3_x509_item_free` with `--repeat until-fail:5`: 5 / 5 pass. - No runnable negative control: the test calls the new one-argument prototypes, which `main` doesn't have. The null cases match LibreSSL: each of these is an `ASN1_item_free` wrapper, which returns early on null.
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!16689
No description provided.