fix(libSceLibreSsl): throw the documented exception for faulting lookup and verify-parameter arguments #14717

Merged
rooklz merged 1 commit from upstream-pr/14717 into main 2026-11-05 04:00:03 +00:00
rooklz commented 2026-11-01 17:24:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by rooklz on 2026-11-01T17:24:58Z.


What

X509_STORE_add_lookup and the internal FreeVerifyParam in libSceLibreSsl already implement every defined input; their remaining NotImplemented_nid_no_patch calls only covered inputs where the module faults. docs/dev/debt/libSceLibreSsl.md records for X509_STORE_add_lookup that "a null store, method or listed lookup throws where LibreSSL faults" and that "callbacks of a guest-supplied method (new_item, shutdown, free) throw instead of being called", and for the verify parameters that no export adds a policy object and that null verify parameters or identity "throw where LibreSSL faults". Only those faulting inputs now throw std::invalid_argument instead of the unimplemented marker; no defined behaviour changes. The guest-callback site (new_item) and the policy-object free keep NotImplemented_nid_no_patch: those inputs are valid but unimplemented, not caller errors. No debt edit: the entries already document both kinds of path. No new exports, libraries, files or silent stubs; every replaced marker still throws and every unimplemented path still throws through the marker.

X509_STORE_add_lookup_nid_postfix stays in todo_names for now because progress.py also counts the stub-calling internal helpers its body reaches (Elements, Push, FreeLookup); those guards are carried by the open sibling PRs #14179 and #13285, whose hunks this change deliberately does not touch. Coverage from tools/progress.py: libSceLibreSsl 103/298 and all libraries unchanged by this commit alone.

Tested

Linux host, no PS5 and no console use. Behaviour comes only from this worktree and docs/dev/debt/libSceLibreSsl.md; the debt entries already state that these inputs throw where LibreSSL faults.

  • cmake -S . -B build-libressl -G Ninja -DCMAKE_BUILD_TYPE=Release -DANYPS5_RELINKER_ONLY=ON -DBUILD_TESTING=ON and cmake --build build-libressl --parallel: rc=0.
  • ctest --test-dir build-libressl --output-on-failure: 557/557 passed, 0 failed (61.08 s), at upstream/main f2d874c1fd.
  • g++ -std=c++20 -fsyntax-only -Icore/libs on the changed src/X509Store.cpp: rc=0. A host harness linking src/X509Store.cpp with recording allocator stubs confirms X509_STORE_add_lookup_nid_postfix throws std::invalid_argument for a null store and a null method, still throws through NotImplemented_nid_no_patch for a guest method with a new_item callback, and still returns the existing lookup for a repeated method. A full guest-library build is not possible on this host (3rdparty/SDL2 is empty), so the relinker build, the syntax check and the harness are the host-side verification.
  • python3 tools/check_conventions.py --base upstream/main: pass.
  • python3 tools/pr_overlap.py --branch fix/libressl-store-lookup-arguments: no overlap with open pull requests.

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:5109759385 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14717). Originally posted by [rooklz](https://github.com/rooklz) on 2026-11-01T17:24:58Z. --- ### What `X509_STORE_add_lookup` and the internal `FreeVerifyParam` in libSceLibreSsl already implement every defined input; their remaining `NotImplemented_nid_no_patch` calls only covered inputs where the module faults. `docs/dev/debt/libSceLibreSsl.md` records for `X509_STORE_add_lookup` that "a null store, method or listed lookup throws where LibreSSL faults" and that "callbacks of a guest-supplied method (`new_item`, `shutdown`, `free`) throw instead of being called", and for the verify parameters that no export adds a policy object and that null verify parameters or identity "throw where LibreSSL faults". Only those faulting inputs now throw `std::invalid_argument` instead of the unimplemented marker; no defined behaviour changes. The guest-callback site (`new_item`) and the policy-object free keep `NotImplemented_nid_no_patch`: those inputs are valid but unimplemented, not caller errors. No debt edit: the entries already document both kinds of path. No new exports, libraries, files or silent stubs; every replaced marker still throws and every unimplemented path still throws through the marker. `X509_STORE_add_lookup_nid_postfix` stays in `todo_names` for now because `progress.py` also counts the stub-calling internal helpers its body reaches (`Elements`, `Push`, `FreeLookup`); those guards are carried by the open sibling PRs #14179 and #13285, whose hunks this change deliberately does not touch. Coverage from `tools/progress.py`: libSceLibreSsl 103/298 and all libraries unchanged by this commit alone. ### Tested Linux host, no PS5 and no console use. Behaviour comes only from this worktree and `docs/dev/debt/libSceLibreSsl.md`; the debt entries already state that these inputs throw where LibreSSL faults. - `cmake -S . -B build-libressl -G Ninja -DCMAKE_BUILD_TYPE=Release -DANYPS5_RELINKER_ONLY=ON -DBUILD_TESTING=ON` and `cmake --build build-libressl --parallel`: rc=0. - `ctest --test-dir build-libressl --output-on-failure`: 557/557 passed, 0 failed (61.08 s), at `upstream/main` `f2d874c1fd`. - `g++ -std=c++20 -fsyntax-only -Icore/libs` on the changed `src/X509Store.cpp`: rc=0. A host harness linking `src/X509Store.cpp` with recording allocator stubs confirms `X509_STORE_add_lookup_nid_postfix` throws `std::invalid_argument` for a null store and a null method, still throws through `NotImplemented_nid_no_patch` for a guest method with a `new_item` callback, and still returns the existing lookup for a repeated method. A full guest-library build is not possible on this host (`3rdparty/SDL2` is empty), so the relinker build, the syntax check and the harness are the host-side verification. - `python3 tools/check_conventions.py --base upstream/main`: pass. - `python3 tools/pr_overlap.py --branch fix/libressl-store-lookup-arguments`: no overlap with open pull requests. ### 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
MarcZX10 commented 2026-11-01 17:29:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T17:29:53Z.

Review: COMMENTED


Reviewed — no blocking findings

The changed fault paths now throw as the pinned debt notes describe; no blocking source issue was found, but the hosted checks remain queued and the compiler/harness evidence in the PR description was not independently reproduced.

What I ran

Reviewed exact head 36b2336b98b406dcabb3e4ed69ec352af29faec6 against base f2d874c1fdccf781c0fa5d86619bb5dd8894b958; the merge preview was clean. Environment: Debian Linux x86_64, Python 3.11.2, GCC 12.2.0. No build or compile was run.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14717
git show 36b2336b98b406dcabb3e4ed69ec352af29faec6:core/libs/prx/libSceLibreSsl/src/X509Store.cpp
git show 36b2336b98b406dcabb3e4ed69ec352af29faec6:docs/dev/debt/libSceLibreSsl.md

Results

Check Result Note
Diff whitespace and conventions passed Both checks passed.
Merge preview passed Clean against stated base.
ABI audit and test heuristic not run Optional scripts were absent from exact-head snapshot.
Build and runtime tests not run No build was run in initial review.
Hosted CI not run Six checks were queued when inspected.
Precheck output

Unedited convention-check stdout:

All conventions checks passed.

Unedited missing-helper diagnostics:

/usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-14717-36b2336b98b4/head-36b2336b98b4-c31a0660/tools/pr_abi_audit.py': [Errno 2] No such file or directory
/usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-14717-36b2336b98b4/head-36b2336b98b4-c31a0660/tools/pr_test_quality.py': [Errno 2] No such file or directory

Unedited merge-check output:

/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-14717-36b2336b98b4/stack/stack-report.md
/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-14717-36b2336b98b4/stack/stack-report.json

Negative control

Not run. A useful negative control for these C++ fault paths requires compiling and running the relevant harness against the base and changed source.

Findings

Blocking

None found in the reviewed source change.

Non-blocking

The PR description reports a successful relinker build, full CTest run, syntax check, and host harness. I did not independently run them. The changed paths align with the documented fault behavior, while the optional ABI and test-quality scripts could not run because they were missing from the isolated snapshot; those tool errors do not indicate a code defect.

Sources

Not verified

No local compiler run, CTest, host harness, PS5/console run, or other operating system was tested. Hosted checks were queued when inspected. The PR's reported tests are author-supplied evidence, not tests run by me.

To get this to a good state

No source change is requested. Allow the hosted checks to finish; I will re-check this head if new CI evidence or a code update changes the review basis.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5729352899 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14717#pullrequestreview-5729352899). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-01T17:29:53Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The changed fault paths now throw as the pinned debt notes describe; no blocking source issue was found, but the hosted checks remain queued and the compiler/harness evidence in the PR description was not independently reproduced. ## What I ran Reviewed exact head `36b2336b98b406dcabb3e4ed69ec352af29faec6` against base `f2d874c1fdccf781c0fa5d86619bb5dd8894b958`; the merge preview was clean. Environment: Debian Linux x86_64, Python 3.11.2, GCC 12.2.0. No build or compile was run. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14717 git show 36b2336b98b406dcabb3e4ed69ec352af29faec6:core/libs/prx/libSceLibreSsl/src/X509Store.cpp git show 36b2336b98b406dcabb3e4ed69ec352af29faec6:docs/dev/debt/libSceLibreSsl.md ``` ## Results | Check | Result | Note | |---|---|---| | Diff whitespace and conventions | passed | Both checks passed. | | Merge preview | passed | Clean against stated base. | | ABI audit and test heuristic | not run | Optional scripts were absent from exact-head snapshot. | | Build and runtime tests | not run | No build was run in initial review. | | Hosted CI | not run | Six checks were queued when inspected. | <details> <summary>Precheck output</summary> Unedited convention-check stdout: ```text All conventions checks passed. ``` Unedited missing-helper diagnostics: ```text /usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-14717-36b2336b98b4/head-36b2336b98b4-c31a0660/tools/pr_abi_audit.py': [Errno 2] No such file or directory /usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-14717-36b2336b98b4/head-36b2336b98b4-c31a0660/tools/pr_test_quality.py': [Errno 2] No such file or directory ``` Unedited merge-check output: ```text /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-14717-36b2336b98b4/stack/stack-report.md /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-14717-36b2336b98b4/stack/stack-report.json ``` </details> ## Negative control Not run. A useful negative control for these C++ fault paths requires compiling and running the relevant harness against the base and changed source. ## Findings ### Blocking None found in the reviewed source change. ### Non-blocking The PR description reports a successful relinker build, full CTest run, syntax check, and host harness. I did not independently run them. The changed paths align with the documented fault behavior, while the optional ABI and test-quality scripts could not run because they were missing from the isolated snapshot; those tool errors do not indicate a code defect. ## Sources - [Changed fault handling at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/36b2336b98b406dcabb3e4ed69ec352af29faec6/core/libs/prx/libSceLibreSsl/src/X509Store.cpp#L150-L162) - [`X509_STORE_add_lookup` at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/36b2336b98b406dcabb3e4ed69ec352af29faec6/core/libs/prx/libSceLibreSsl/src/X509Store.cpp#L219-L241) - [Debt notes describing these fault paths at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/36b2336b98b406dcabb3e4ed69ec352af29faec6/docs/dev/debt/libSceLibreSsl.md#L42-L48) ## Not verified No local compiler run, CTest, host harness, PS5/console run, or other operating system was tested. Hosted checks were queued when inspected. The PR's reported tests are author-supplied evidence, not tests run by me. ## To get this to a good state No source change is requested. Allow the hosted checks to finish; I will re-check this head if new CI evidence or a code update changes the review basis.
MarcZX10 commented 2026-11-01 20:40:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T20:40:53Z.

Review: COMMENTED


Reviewed — no blocking findings

The three null-pointer paths and the null verify-parameter identity now throw std::invalid_argument instead of the not-implemented exception. I checked each path against the LibreSSL 2.5.4 sources the debt entries cite, and each one matches a point where LibreSSL dereferences a null pointer. The hosted Windows job passed, but it ran no CTest for this head, so no LibreSSL test ran hosted.

What I ran

  • Head 6211803937681763d48a2d6c390912b95a1bd061; base f2d874c1fdccf781c0fa5d86619bb5dd8894b958. main is now 5bae1a4bc2; the live stack check passed. 1 file, +6/-4 (core/libs/prx/libSceLibreSsl/src/X509Store.cpp).
  • Read the full diff and the surrounding code: FreeVerifyParam (line 150) and X509_STORE_add_lookup_nid_postfix (line 219 onward) at this head.
  • Checked each replacement against LibreSSL 2.5.4, fetched at the commit the debt entries cite:
    • Null store: upstream X509_STORE_add_lookup reads v->get_cert_methods first, so it faults. Matches.
    • Null listed lookup: upstream reads lu->method in the loop. Matches.
    • Null method: upstream X509_LOOKUP_new(m) reads method->new_item. Matches.
    • Null verify-parameter identity: upstream X509_VERIFY_PARAM_free calls x509_verify_param_zero, which reads paramid->hosts (x509_vpm.c line 186) with no null check. A null identity faults there. Matches.
  • Precheck: diff check, conventions and PR template, and the live stack check passed. The ABI audit reported passed_with_warnings: CompareObjects and LoadFile are internal helpers in this file without an APS5_VABI declaration, and the diff does not touch them. The test-quality helper found nothing when run by hand; no test file changed.
  • Hosted: the windows job passed, but its log has no CTest run for this head.

Results

Check Result Note
Diff check passed
Conventions and PR template passed precheck and hosted conventions passed
Mergeability and dependencies passed depends on none; the live stack check passed
Null store, method and listed lookup throws passed match LibreSSL 2.5.4 X509_STORE_add_lookup
Null verify-parameter identity throw passed matches LibreSSL 2.5.4 x509_verify_param_zero (x509_vpm.c line 186)
Exception type under test not checked existing throw checks accept any exception (non-blocking)
ABI audit (manual run) passed with warnings CompareObjects and LoadFile are internal helpers this diff does not touch
Build and runtime tests not run no build here
Negative controls not run no build here
Hosted CI passed, no test run windows, conventions, labels, library-portability and report passed; the windows job ran no CTest; linux and relinker skipped
Commands and unedited precheck output

Commands:

  • Precheck: python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14717 --output-dir <scratch>/precheck/14717p (report.md in that directory).
  • Head fetched by URL (objects only): git fetch https://github.com/boykopovar/AnyPS5.git pull/14717/head.
  • Manual helper runs: python3 tools/pr_abi_audit.py --base f2d874c1fdccf781c0fa5d86619bb5dd8894b958 --head 6211803937681763d48a2d6c390912b95a1bd061 --json (status passed_with_warnings, the two internal helpers above) and python3 tools/pr_test_quality.py --root <archive of the head> --json core/libs/prx/libSceLibreSsl/src/X509Store.cpp (0 findings).
  • LibreSSL reference: https://raw.githubusercontent.com/libressl/openbsd/2e2c612066aa993717528a0249c15c51128d61cb/src/lib/libcrypto/x509/x509_vpm.c and .../x509_lu.c.
  • Hosted checks: gh api repos/boykopovar/AnyPS5/commits/6211803937681763d48a2d6c390912b95a1bd061/check-runs; Windows log: gh api repos/boykopovar/AnyPS5/actions/jobs/<windows job id>/logs (no CTest section).

Precheck table (unedited):

Check Status Command / reason
build_and_compile not_applicable The precheck deliberately does not configure, build, or compile AnyPS5.
diff_check passed git diff --check f2d874c1fdccf781c0fa5d86619bb5dd8894b958...6211803937681763d48a2d6c390912b95a1bd061
conventions_and_pr_template passed /marc/DeusMachina_0x1914/.venv/bin/python3 tools/check_conventions.py --base f2d874c1fdccf781c0fa5d86619bb5dd8894b958 --head 6211803937681763d48a2d6c390912b95a1bd061 --title fix(libSceLibreSsl): throw the documented exception for faulting lookup and verify-parameter arguments --body /dev/shm/reviewer-run/precheck/14717p/pr-body.md
changed_export_abi_audit failed /marc/DeusMachina_0x1914/.venv/bin/python3 tools/pr_abi_audit.py --base f2d874c1fdccf781c0fa5d86619bb5dd8894b958 --head 6211803937681763d48a2d6c390912b95a1bd061 --json
python_syntax not_applicable No changed Python implementation files.
related_python_unit_tests not_applicable No changed tools/ module has an existing sibling tools/tests/test_<module>.py suite.
python_test_registration not_applicable No changed test_*.py files.
live_dependency_and_mergeability_check passed /marc/DeusMachina_0x1914/.venv/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 14717 --repo boykopovar/AnyPS5 --output-dir /dev/shm/reviewer-run/precheck/14717p/stack
build_dependent_cpp_tests not_applicable Not run: C++ tests need exact-head binaries, which require a build; the precheck does not build.
test_quality_heuristics failed /marc/DeusMachina_0x1914/.venv/bin/python3 /dev/shm/reviewer-run/precheck/14717p/head-621180393768-6b09c228/tools/pr_test_quality.py --root /dev/shm/reviewer-run/precheck/14717p/head-621180393768-6b09c228 --json core/libs/prx/libSceLibreSsl/src/X509Store.cpp
negative_controls not_applicable No changed Python test module in tools/ can be run as a no-build base-source control.

Negative control

Not run here. The throw paths need a build to exercise, and the existing checks would not tell the two exception types apart.

Findings

Blocking

None.

Non-blocking

  • The debt entry for X509_STORE_free (docs/dev/debt/libSceLibreSsl.md line 42) describes null store and verify-parameter cases, but not the null identity case this change now throws for. Please name it in that entry.
  • The existing throw checks in tests/X509Lookup.cpp (lines 83-89) only require that some exception is thrown, so they pass with either exception type. Asserting std::invalid_argument for the new paths would pin the behaviour this change intends.
  • <stdexcept> and <string> are inserted before <cstdint>, which breaks the alphabetical order of the include block.

Sources

Not verified

  • No build or run here. The LibreSSL behaviour was read from the upstream source at the cited commit, not executed.
  • The PR body's test run (557/557) was at the base f2d874c1fd, not at this head, and I did not reproduce the host harness it describes.
  • The hosted Windows job ran no CTest for this head.

To get this to a good state

  • Nothing blocking. The three non-blocking items above are optional.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5730171278 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14717#pullrequestreview-5730171278). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-01T20:40:53Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The three null-pointer paths and the null verify-parameter identity now throw `std::invalid_argument` instead of the not-implemented exception. I checked each path against the LibreSSL 2.5.4 sources the debt entries cite, and each one matches a point where LibreSSL dereferences a null pointer. The hosted Windows job passed, but it ran no CTest for this head, so no LibreSSL test ran hosted. ## What I ran - Head `6211803937681763d48a2d6c390912b95a1bd061`; base `f2d874c1fdccf781c0fa5d86619bb5dd8894b958`. main is now `5bae1a4bc2`; the live stack check passed. 1 file, +6/-4 (`core/libs/prx/libSceLibreSsl/src/X509Store.cpp`). - Read the full diff and the surrounding code: `FreeVerifyParam` (line 150) and `X509_STORE_add_lookup_nid_postfix` (line 219 onward) at this head. - Checked each replacement against LibreSSL 2.5.4, fetched at the commit the debt entries cite: - Null store: upstream `X509_STORE_add_lookup` reads `v->get_cert_methods` first, so it faults. Matches. - Null listed lookup: upstream reads `lu->method` in the loop. Matches. - Null method: upstream `X509_LOOKUP_new(m)` reads `method->new_item`. Matches. - Null verify-parameter identity: upstream `X509_VERIFY_PARAM_free` calls `x509_verify_param_zero`, which reads `paramid->hosts` (`x509_vpm.c` line 186) with no null check. A null identity faults there. Matches. - Precheck: diff check, conventions and PR template, and the live stack check passed. The ABI audit reported `passed_with_warnings`: `CompareObjects` and `LoadFile` are internal helpers in this file without an APS5_VABI declaration, and the diff does not touch them. The test-quality helper found nothing when run by hand; no test file changed. - Hosted: the windows job passed, but its log has no CTest run for this head. ## Results | Check | Result | Note | | --- | --- | --- | | Diff check | passed | | | Conventions and PR template | passed | precheck and hosted conventions passed | | Mergeability and dependencies | passed | depends on none; the live stack check passed | | Null store, method and listed lookup throws | passed | match LibreSSL 2.5.4 `X509_STORE_add_lookup` | | Null verify-parameter identity throw | passed | matches LibreSSL 2.5.4 `x509_verify_param_zero` (`x509_vpm.c` line 186) | | Exception type under test | not checked | existing throw checks accept any exception (non-blocking) | | ABI audit (manual run) | passed with warnings | `CompareObjects` and `LoadFile` are internal helpers this diff does not touch | | Build and runtime tests | not run | no build here | | Negative controls | not run | no build here | | Hosted CI | passed, no test run | windows, conventions, labels, library-portability and report passed; the windows job ran no CTest; linux and relinker skipped | <details><summary>Commands and unedited precheck output</summary> Commands: - Precheck: `python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14717 --output-dir <scratch>/precheck/14717p` (report.md in that directory). - Head fetched by URL (objects only): `git fetch https://github.com/boykopovar/AnyPS5.git pull/14717/head`. - Manual helper runs: `python3 tools/pr_abi_audit.py --base f2d874c1fdccf781c0fa5d86619bb5dd8894b958 --head 6211803937681763d48a2d6c390912b95a1bd061 --json` (status passed_with_warnings, the two internal helpers above) and `python3 tools/pr_test_quality.py --root <archive of the head> --json core/libs/prx/libSceLibreSsl/src/X509Store.cpp` (0 findings). - LibreSSL reference: `https://raw.githubusercontent.com/libressl/openbsd/2e2c612066aa993717528a0249c15c51128d61cb/src/lib/libcrypto/x509/x509_vpm.c` and `.../x509_lu.c`. - Hosted checks: `gh api repos/boykopovar/AnyPS5/commits/6211803937681763d48a2d6c390912b95a1bd061/check-runs`; Windows log: `gh api repos/boykopovar/AnyPS5/actions/jobs/<windows job id>/logs` (no CTest section). Precheck table (unedited): | Check | Status | Command / reason | |---|---|---| | build_and_compile | not_applicable | `The precheck deliberately does not configure, build, or compile AnyPS5.` | | diff_check | passed | `git diff --check f2d874c1fdccf781c0fa5d86619bb5dd8894b958...6211803937681763d48a2d6c390912b95a1bd061` | | conventions_and_pr_template | passed | `/marc/DeusMachina_0x1914/.venv/bin/python3 tools/check_conventions.py --base f2d874c1fdccf781c0fa5d86619bb5dd8894b958 --head 6211803937681763d48a2d6c390912b95a1bd061 --title fix(libSceLibreSsl): throw the documented exception for faulting lookup and verify-parameter arguments --body /dev/shm/reviewer-run/precheck/14717p/pr-body.md` | | changed_export_abi_audit | failed | `/marc/DeusMachina_0x1914/.venv/bin/python3 tools/pr_abi_audit.py --base f2d874c1fdccf781c0fa5d86619bb5dd8894b958 --head 6211803937681763d48a2d6c390912b95a1bd061 --json` | | python_syntax | not_applicable | `No changed Python implementation files.` | | related_python_unit_tests | not_applicable | `No changed tools/ module has an existing sibling tools/tests/test_<module>.py suite.` | | python_test_registration | not_applicable | `No changed test_*.py files.` | | live_dependency_and_mergeability_check | passed | `/marc/DeusMachina_0x1914/.venv/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 14717 --repo boykopovar/AnyPS5 --output-dir /dev/shm/reviewer-run/precheck/14717p/stack` | | build_dependent_cpp_tests | not_applicable | `Not run: C++ tests need exact-head binaries, which require a build; the precheck does not build.` | | test_quality_heuristics | failed | `/marc/DeusMachina_0x1914/.venv/bin/python3 /dev/shm/reviewer-run/precheck/14717p/head-621180393768-6b09c228/tools/pr_test_quality.py --root /dev/shm/reviewer-run/precheck/14717p/head-621180393768-6b09c228 --json core/libs/prx/libSceLibreSsl/src/X509Store.cpp` | | negative_controls | not_applicable | `No changed Python test module in tools/ can be run as a no-build base-source control.` | </details> ## Negative control Not run here. The throw paths need a build to exercise, and the existing checks would not tell the two exception types apart. ## Findings **Blocking** None. **Non-blocking** - The debt entry for `X509_STORE_free` (`docs/dev/debt/libSceLibreSsl.md` line 42) describes null store and verify-parameter cases, but not the null identity case this change now throws for. Please name it in that entry. - The existing throw checks in `tests/X509Lookup.cpp` (lines 83-89) only require that some exception is thrown, so they pass with either exception type. Asserting `std::invalid_argument` for the new paths would pin the behaviour this change intends. - `<stdexcept>` and `<string>` are inserted before `<cstdint>`, which breaks the alphabetical order of the include block. ## Sources - Changed code: https://github.com/boykopovar/AnyPS5/blob/6211803937681763d48a2d6c390912b95a1bd061/core/libs/prx/libSceLibreSsl/src/X509Store.cpp#L150-L158 and #L219-L240 - Existing throw checks: https://github.com/boykopovar/AnyPS5/blob/6211803937681763d48a2d6c390912b95a1bd061/core/libs/prx/libSceLibreSsl/tests/X509Lookup.cpp#L83-L89 - LibreSSL 2.5.4: https://github.com/libressl/openbsd/blob/2e2c612066aa993717528a0249c15c51128d61cb/src/lib/libcrypto/x509/x509_vpm.c (`x509_verify_param_zero`, line 185-186) and https://github.com/libressl/openbsd/blob/2e2c612066aa993717528a0249c15c51128d61cb/src/lib/libcrypto/x509/x509_lu.c (`X509_STORE_add_lookup`, lines 272-286) ## Not verified - No build or run here. The LibreSSL behaviour was read from the upstream source at the cited commit, not executed. - The PR body's test run (557/557) was at the base `f2d874c1fd`, not at this head, and I did not reproduce the host harness it describes. - The hosted Windows job ran no CTest for this head. ## To get this to a good state - Nothing blocking. The three non-blocking items above are optional.
MarcZX10 commented 2026-11-02 05:09:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-02T05:09:44Z.

Review: COMMENTED


Reviewed — no blocking findings

This is a re-review at the current head. The earlier review (on 6211803937) raised three non-blocking points: the debt entry did not name the null identity case, the existing throw checks accepted any exception, and the include order. The new head addresses the first two: the debt line now names "a null verify parameter identity", and the tests assert std::invalid_argument for each null path, including the free with a null identity. The include order is unchanged. The new guest_libressl_x509_lookup test passed in the hosted Windows CTest run. The three null paths still match LibreSSL 2.5.4 as before.

What I ran

  • Head 4a88d31c932e99f29c7efcf9e610682be4ca8b53; base 0580e5c951a8d436af2976a3f86a980c798ef5c2 (the base moved since the earlier review). 3 files, +25/-8: core/libs/prx/libSceLibreSsl/src/X509Store.cpp, core/libs/prx/libSceLibreSsl/tests/X509Lookup.cpp (+21/-3) and docs/dev/debt/libSceLibreSsl.md (one line).
  • Read the diff: the three invalid_argument throws and the identity throw in FreeVerifyParam; the new RequireInvalidArgument helper and its calls, including the free with store->param->id = nullptr; and the debt line.
  • Checked the debt wording change: the phrase "a null verify parameter identity," was inserted.
  • Read-only checks from the trusted main checkout (precheck not run: no PR-head code is run here): diff check and conventions passed; the stack check passed; the ABI audit reported passed_with_warnings with 2 findings, neither about an X509 symbol.
  • Hosted: the windows CTest run passed; guest_libressl_x509_lookup is Passed.
  • No MarcZX10 review at this head.

Results

Check Result Note
Diff check passed
Conventions and PR template passed conventions check from the main checkout
Mergeability and dependencies passed depends on none; the stack check passed
Three null paths throw invalid_argument passed read in X509Store.cpp (lines 155, 218-234)
Identity throw in FreeVerifyParam passed read (line 156)
Tests assert the exception type passed RequireInvalidArgument (read); the free case covers the identity path
Debt entry names the identity case passed "a null verify parameter identity," added
guest_libressl_x509_lookup (hosted) passed Passed in the Windows CTest run
ABI audit (main-checkout tool) passed with warnings 2 findings, neither about an X509 symbol
Build and runtime tests (Linux) not run no local build
Negative controls not run no local build
Hosted CI passed windows passed with the new test; linux and relinkers skipped
Read-only check output

Precheck was not run: no PR-head code is run here. Conventions: passed. Stack check: passed. ABI audit: passed with warnings (2 findings, not X509). Hosted: gh api repos/boykopovar/AnyPS5/commits/4a88d31c932e99f29c7efcf9e610682be4ca8b53/check-runs.

Negative control

Not run here. A negative control needs a build, and code from this head is not run here.

Findings

Blocking

None.

Non-blocking

None.

Sources

Not verified

  • The Linux behaviour was not checked.
  • The LibreSSL reference behaviour was not re-read at this head (the earlier review read it at 6211803937).

To get this to a good state

  • Nothing to change.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5732319305 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14717#pullrequestreview-5732319305). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-02T05:09:44Z. **Review:** COMMENTED --- # Reviewed — no blocking findings This is a re-review at the current head. The earlier review (on `6211803937`) raised three non-blocking points: the debt entry did not name the null identity case, the existing throw checks accepted any exception, and the include order. The new head addresses the first two: the debt line now names "a null verify parameter identity", and the tests assert `std::invalid_argument` for each null path, including the free with a null identity. The include order is unchanged. The new `guest_libressl_x509_lookup` test passed in the hosted Windows CTest run. The three null paths still match LibreSSL 2.5.4 as before. ## What I ran - Head `4a88d31c932e99f29c7efcf9e610682be4ca8b53`; base `0580e5c951a8d436af2976a3f86a980c798ef5c2` (the base moved since the earlier review). 3 files, +25/-8: `core/libs/prx/libSceLibreSsl/src/X509Store.cpp`, `core/libs/prx/libSceLibreSsl/tests/X509Lookup.cpp` (+21/-3) and `docs/dev/debt/libSceLibreSsl.md` (one line). - Read the diff: the three `invalid_argument` throws and the identity throw in `FreeVerifyParam`; the new `RequireInvalidArgument` helper and its calls, including the free with `store->param->id = nullptr`; and the debt line. - Checked the debt wording change: the phrase "a null verify parameter identity," was inserted. - Read-only checks from the trusted main checkout (precheck not run: no PR-head code is run here): diff check and conventions passed; the stack check passed; the ABI audit reported `passed_with_warnings` with 2 findings, neither about an X509 symbol. - Hosted: the windows CTest run passed; `guest_libressl_x509_lookup` is Passed. - No MarcZX10 review at this head. ## Results | Check | Result | Note | | --- | --- | --- | | Diff check | passed | | | Conventions and PR template | passed | conventions check from the main checkout | | Mergeability and dependencies | passed | depends on none; the stack check passed | | Three null paths throw `invalid_argument` | passed | read in `X509Store.cpp` (lines 155, 218-234) | | Identity throw in `FreeVerifyParam` | passed | read (line 156) | | Tests assert the exception type | passed | `RequireInvalidArgument` (read); the free case covers the identity path | | Debt entry names the identity case | passed | "a null verify parameter identity," added | | `guest_libressl_x509_lookup` (hosted) | passed | Passed in the Windows CTest run | | ABI audit (main-checkout tool) | passed with warnings | 2 findings, neither about an X509 symbol | | Build and runtime tests (Linux) | not run | no local build | | Negative controls | not run | no local build | | Hosted CI | passed | windows passed with the new test; linux and relinkers skipped | <details><summary>Read-only check output</summary> Precheck was not run: no PR-head code is run here. Conventions: passed. Stack check: passed. ABI audit: passed with warnings (2 findings, not X509). Hosted: `gh api repos/boykopovar/AnyPS5/commits/4a88d31c932e99f29c7efcf9e610682be4ca8b53/check-runs`. </details> ## Negative control Not run here. A negative control needs a build, and code from this head is not run here. ## Findings **Blocking** None. **Non-blocking** None. ## Sources - Throws and identity check: https://github.com/boykopovar/AnyPS5/blob/4a88d31c932e99f29c7efcf9e610682be4ca8b53/core/libs/prx/libSceLibreSsl/src/X509Store.cpp - Tests: https://github.com/boykopovar/AnyPS5/blob/4a88d31c932e99f29c7efcf9e610682be4ca8b53/core/libs/prx/libSceLibreSsl/tests/X509Lookup.cpp - Debt entry: https://github.com/boykopovar/AnyPS5/blob/4a88d31c932e99f29c7efcf9e610682be4ca8b53/docs/dev/debt/libSceLibreSsl.md ## Not verified - The Linux behaviour was not checked. - The LibreSSL reference behaviour was not re-read at this head (the earlier review read it at 6211803937). ## To get this to a good state - Nothing to change.
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!14717
No description provided.