feat(libSceLibreSsl3): implement SSL_CIPHER_get_id #14483

Merged
jagrat04 merged 4 commits from upstream-pr/14483 into main 2026-11-06 06:07:41 +00:00
jagrat04 commented 2026-11-01 15:11:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jagrat04 on 2026-11-01T15:11:48Z.


What

Implement SSL_CIPHER_get_id in libSceLibreSsl3.

Tested

ctest -R guest_libressl3_cipher -V passed on Linux x86_64 (WSL2).

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:5108640914 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14483). Originally posted by [jagrat04](https://github.com/jagrat04) on 2026-11-01T15:11:48Z. --- ### What Implement SSL_CIPHER_get_id in libSceLibreSsl3. ### Tested ctest -R guest_libressl3_cipher -V passed on Linux x86_64 (WSL2). ### 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
CnRJay commented 2026-11-01 19:47:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by CnRJay on 2026-11-01T19:47:06Z.

Review: COMMENTED


Withdrawn. This review applied a title-ID/log requirement that is not in CONTRIBUTING (Unblocks: none is allowed), and it contained no code review.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5729914458 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14483#pullrequestreview-5729914458). Originally posted by [CnRJay](https://github.com/CnRJay) on 2026-11-01T19:47:06Z. **Review:** COMMENTED --- Withdrawn. This review applied a title-ID/log requirement that is not in CONTRIBUTING (`Unblocks: none` is allowed), and it contained no code review.
MarcZX10 commented 2026-11-02 05:17:32 +00:00 (Migrated from github.com)

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

Review: COMMENTED


Reviewed — no blocking findings

SSL_CIPHER_get_id returns the id field of the cipher and 0 for a null pointer, and it does not modify the cipher. The new LibreSsl3Cipher layout is pinned by static_asserts (size 88, name at 8, id at 16, strengthBits at 80, algorithmBits at 84), which match a 64-bit build of the upstream SSL_CIPHER fields. The hosted Windows CTest run passed guest_libressl3_cipher (2594 of 2594 cases).

What I ran

  • Head c0b2da25b2570a4646c4a79cac895791b8b8caea; base e0caf1360035286bd22b9f2a3030e97b880ffb28. 6 files, +57/-6: AdditionalExports.cpp (the stub removed), include/Api.hpp (typed declaration), include/Cipher.hpp (new struct, +22), src/Cipher.cpp (+6), tests/Cipher.cpp (+26) and docs/dev/debt/libSceLibreSsl3.md (two lines).
  • Read the function, the struct and its static_asserts, and the test (the id round trip with a memory-invariance check, the null case, and the full-field case).
  • Read-only checks from the trusted main checkout (precheck not run: no PR-head code is run here): diff check, conventions and the stack check passed; the ABI audit passed (270 symbols).
  • Hosted: the Windows CTest run passed 2594 of 2594 cases, including guest_libressl3_cipher.
  • 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
Null cipher returns 0; id is returned unchanged passed Cipher.cpp (the function) and the test
Struct layout (size 88, offsets 8, 16, 80, 84) passed pinned by static_asserts; consistent with a 64-bit upstream layout
Upstream layout against the LibreSSL source not verified the debt entry cites it; not re-read here
guest_libressl3_cipher (hosted) passed in the Windows CTest run
ABI audit (main-checkout tool) passed 270 symbols, no findings
Build and runtime tests (Linux) not run the hosted Windows run covers the test
Negative controls not run no local build
Hosted CI passed windows passed (2594/2594); linux and relinkers skipped
Read-only check output

Precheck was not run: no PR-head code is run here. Conventions: passed. ABI audit: passed (270 symbols). Hosted: gh api repos/boykopovar/AnyPS5/commits/c0b2da25b2570a4646c4a79cac895791b8b8caea/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 upstream SSL_CIPHER field layout was not re-read against the LibreSSL source cited in the debt entry.
  • The Linux behaviour was not checked.

To get this to a good state

  • Nothing to change.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5732367282 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14483#pullrequestreview-5732367282). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-02T05:17:32Z. **Review:** COMMENTED --- # Reviewed — no blocking findings `SSL_CIPHER_get_id` returns the `id` field of the cipher and 0 for a null pointer, and it does not modify the cipher. The new `LibreSsl3Cipher` layout is pinned by `static_assert`s (size 88, `name` at 8, `id` at 16, `strengthBits` at 80, `algorithmBits` at 84), which match a 64-bit build of the upstream `SSL_CIPHER` fields. The hosted Windows CTest run passed `guest_libressl3_cipher` (2594 of 2594 cases). ## What I ran - Head `c0b2da25b2570a4646c4a79cac895791b8b8caea`; base `e0caf1360035286bd22b9f2a3030e97b880ffb28`. 6 files, +57/-6: `AdditionalExports.cpp` (the stub removed), `include/Api.hpp` (typed declaration), `include/Cipher.hpp` (new struct, +22), `src/Cipher.cpp` (+6), `tests/Cipher.cpp` (+26) and `docs/dev/debt/libSceLibreSsl3.md` (two lines). - Read the function, the struct and its `static_assert`s, and the test (the id round trip with a memory-invariance check, the null case, and the full-field case). - Read-only checks from the trusted main checkout (precheck not run: no PR-head code is run here): diff check, conventions and the stack check passed; the ABI audit passed (270 symbols). - Hosted: the Windows CTest run passed 2594 of 2594 cases, including `guest_libressl3_cipher`. - 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 | | Null cipher returns 0; id is returned unchanged | passed | `Cipher.cpp` (the function) and the test | | Struct layout (size 88, offsets 8, 16, 80, 84) | passed | pinned by `static_assert`s; consistent with a 64-bit upstream layout | | Upstream layout against the LibreSSL source | not verified | the debt entry cites it; not re-read here | | `guest_libressl3_cipher` (hosted) | passed | in the Windows CTest run | | ABI audit (main-checkout tool) | passed | 270 symbols, no findings | | Build and runtime tests (Linux) | not run | the hosted Windows run covers the test | | Negative controls | not run | no local build | | Hosted CI | passed | windows passed (2594/2594); linux and relinkers skipped | <details><summary>Read-only check output</summary> Precheck was not run: no PR-head code is run here. Conventions: passed. ABI audit: passed (270 symbols). Hosted: `gh api repos/boykopovar/AnyPS5/commits/c0b2da25b2570a4646c4a79cac895791b8b8caea/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 - Function and struct: https://github.com/boykopovar/AnyPS5/blob/c0b2da25b2570a4646c4a79cac895791b8b8caea/core/libs/prx/libSceLibreSsl3/src/Cipher.cpp - Layout and asserts: https://github.com/boykopovar/AnyPS5/blob/c0b2da25b2570a4646c4a79cac895791b8b8caea/core/libs/prx/libSceLibreSsl3/include/Cipher.hpp - Test: https://github.com/boykopovar/AnyPS5/blob/c0b2da25b2570a4646c4a79cac895791b8b8caea/core/libs/prx/libSceLibreSsl3/tests/Cipher.cpp ## Not verified - The upstream `SSL_CIPHER` field layout was not re-read against the LibreSSL source cited in the debt entry. - The Linux behaviour was not checked. ## 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!14483
No description provided.