fix(libSceLibreSsl): throw the documented exception for faulting arguments #14178

Merged
rooklz merged 1 commit from upstream-pr/14178 into main 2026-11-01 03:31:01 +00:00
rooklz commented 2026-10-31 22:27:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by rooklz on 2026-10-31T22:27:26Z.


What

Complete four libSceLibreSsl exports that were reported as unimplemented only because their invalid-input branches still called NotImplemented_nid_no_patch: ASN1_INTEGER_get, SSL_select_next_proto, X509_VERIFY_PARAM_set_hostflags and X509_VERIFY_PARAM_set1_ip_asc.

For every defined input these functions already follow the behaviour and layouts in docs/dev/debt/libSceLibreSsl.md; the remaining marker covered only inputs where the module faults or has undefined behaviour (an unrepresentable signed integer, a null protocol list/output, and null verify parameters or address text). Those debt entries already say the implementation throws there, so throw std::invalid_argument instead of the unimplemented marker, as the digest exports do since 0fed30252a. No console behaviour is newly claimed and the debt entries stay accurate.

The existing tests already exercise both the valid inputs and the throwing branches; they now pin the documented exception type with a RequireInvalidArgument helper.

tools/progress.py: libSceLibreSsl 97 done / 304 todo -> 101 done / 300 todo; all libraries 8656/33237 (26.04%) -> 8660/33237 (26.06%).

Tested

  • Host-only; nothing run on a PS5.
  • 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: 542/542 passed, 0 failed (126.36 s).
  • g++ -std=c++20 -fsyntax-only on the three changed sources and three changed tests: rc=0.
  • python3 tools/progress.py: counts above.

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:5102132535 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14178). Originally posted by [rooklz](https://github.com/rooklz) on 2026-10-31T22:27:26Z. --- ### What Complete four libSceLibreSsl exports that were reported as unimplemented only because their invalid-input branches still called `NotImplemented_nid_no_patch`: `ASN1_INTEGER_get`, `SSL_select_next_proto`, `X509_VERIFY_PARAM_set_hostflags` and `X509_VERIFY_PARAM_set1_ip_asc`. For every defined input these functions already follow the behaviour and layouts in `docs/dev/debt/libSceLibreSsl.md`; the remaining marker covered only inputs where the module faults or has undefined behaviour (an unrepresentable signed integer, a null protocol list/output, and null verify parameters or address text). Those debt entries already say the implementation throws there, so throw `std::invalid_argument` instead of the unimplemented marker, as the digest exports do since 0fed30252a. No console behaviour is newly claimed and the debt entries stay accurate. The existing tests already exercise both the valid inputs and the throwing branches; they now pin the documented exception type with a `RequireInvalidArgument` helper. `tools/progress.py`: libSceLibreSsl 97 done / 304 todo -> 101 done / 300 todo; all libraries 8656/33237 (26.04%) -> 8660/33237 (26.06%). ### Tested - Host-only; nothing run on a PS5. - `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`: 542/542 passed, 0 failed (126.36 s). - `g++ -std=c++20 -fsyntax-only` on the three changed sources and three changed tests: rc=0. - `python3 tools/progress.py`: counts above. ### 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-10-31 23:17:20 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T23:17:20Z.

Review: APPROVED


Reviewed — looks good

The exact head e03a8b4dfbb6bf5cce270bd898dbca868ee58034 changes the four documented invalid-input paths to std::invalid_argument, and its hosted Windows checks compile and run the changed guest library tests successfully.

What I ran

Reviewed against base main at 1bc97b9527eaf6b56681cd3465bca67b75329161; the hosted Windows workflow merged the PR into main and completed successfully. Environment: hosted Windows CI and local Linux x86_64 (glibc 2.36, Python 3.11.2, GCC 12.2.0). Local commands:

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14178
git diff --check 1bc97b9527eaf6b56681cd3465bca67b75329161...e03a8b4dfbb6bf5cce270bd898dbca868ee58034

The precheck passed diff validation, repository conventions/template checks, and the live stack/mergeability check. Its ABI-audit and test-quality helper invocations could not run because those helper scripts are absent from this PR's snapshot; the changed files contain no declaration changes, and I inspected the changed assertions directly. Hosted windows CI succeeded, including compilation and execution of changed guest core/libs tests; library-portability also succeeded.

Results

Check Result
Diff validation and conventions Passed
Live dependency/mergeability check Passed
Hosted Windows changed guest tests Passed
Hosted library portability Passed
Optional ABI audit and test-quality helpers Not executable: scripts absent from the PR snapshot

Not verified

Linux, relinker, register-context, and write-watch jobs were skipped. I did not run a local C++ build or CTest. The PR reports a local 542/542 CTest run, but I did not independently reproduce it.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5725408567 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14178#pullrequestreview-5725408567). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-31T23:17:20Z. **Review:** APPROVED --- # Reviewed — looks good The exact head `e03a8b4dfbb6bf5cce270bd898dbca868ee58034` changes the four documented invalid-input paths to `std::invalid_argument`, and its hosted Windows checks compile and run the changed guest library tests successfully. ## What I ran Reviewed against base `main` at `1bc97b9527eaf6b56681cd3465bca67b75329161`; the hosted Windows workflow merged the PR into `main` and completed successfully. Environment: hosted Windows CI and local Linux x86_64 (glibc 2.36, Python 3.11.2, GCC 12.2.0). Local commands: ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14178 git diff --check 1bc97b9527eaf6b56681cd3465bca67b75329161...e03a8b4dfbb6bf5cce270bd898dbca868ee58034 ``` The precheck passed diff validation, repository conventions/template checks, and the live stack/mergeability check. Its ABI-audit and test-quality helper invocations could not run because those helper scripts are absent from this PR's snapshot; the changed files contain no declaration changes, and I inspected the changed assertions directly. Hosted `windows` CI succeeded, including compilation and execution of changed guest `core/libs` tests; `library-portability` also succeeded. ## Results | Check | Result | |---|---| | Diff validation and conventions | Passed | | Live dependency/mergeability check | Passed | | Hosted Windows changed guest tests | Passed | | Hosted library portability | Passed | | Optional ABI audit and test-quality helpers | Not executable: scripts absent from the PR snapshot | ## Not verified Linux, relinker, register-context, and write-watch jobs were skipped. I did not run a local C++ build or CTest. The PR reports a local 542/542 CTest run, but I did not independently reproduce it.
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!14178
No description provided.