feat(libSceLibreSsl3): implement EVP_PKEY_get0_EC_KEY #14499

Merged
jagrat04 merged 3 commits from upstream-pr/14499 into main 2026-11-08 17:19:23 +00:00
jagrat04 commented 2026-11-01 15:18:47 +00:00 (Migrated from github.com)

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


What

Implement EVP_PKEY_get0_EC_KEY in libSceLibreSsl3.

Tested

ctest -R guest_libressl3_pkey_getters -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:5108696505 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14499). Originally posted by [jagrat04](https://github.com/jagrat04) on 2026-11-01T15:18:47Z. --- ### What Implement EVP_PKEY_get0_EC_KEY in libSceLibreSsl3. ### Tested ctest -R guest_libressl3_pkey_getters -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:07 +00:00 (Migrated from github.com)

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

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:5729914510 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14499#pullrequestreview-5729914510). Originally posted by [CnRJay](https://github.com/CnRJay) on 2026-11-01T19:47:07Z. **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:00:27 +00:00 (Migrated from github.com)

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

Review: COMMENTED


Reviewed — no blocking findings

EVP_PKEY_get0_EC_KEY returns the stored key for type 408 (NID_X9_62_id_ecPublicKey) and null for other types, and it throws for a null key. The function is the PR's own short code, and the hosted Windows run passed guest_libressl3_key_reference and guest_libressl3_pkey_getters. One provenance question is raised below: the new file opens with the OpenBSD p_lib.c banner and the OpenSSL licence text, while the checklist says new third-party code is a submodule.

What I ran

  • Head fd2f521cf4d2024573a4de568aec86334c297784; base f2d874c1fdccf781c0fa5d86619bb5dd8894b958. 6 files, +155/-8: libSceLibreSsl3/src/Key.cpp (new, +113), AdditionalExports.cpp (the stub removed), include/Api.hpp (new typed declaration), tests/PkeyGetters.cpp (+7/-?), GuestLibreSsl3KeyReference.cpp (+33, new) and docs/dev/debt/libSceLibreSsl3.md.
  • Read the function (Key.cpp lines 137-143) and the file header (lines 1-80).
  • Fetched the upstream evp/p_lib.c cited in the debt entry (LibreSSL at ce488b78) and searched it for the function; my search pattern did not match, so the upstream body was not compared line by line.
  • Read-only checks from the trusted main checkout (precheck not run: no PR-head code is run here): diff check and conventions passed; the ABI audit passed (270 symbols); the stack check passed.
  • Hosted: the windows CTest run passed 2594 of 2594 cases, including guest_libressl3_key_reference and guest_libressl3_pkey_getters (both Passed). The new test is registered at libSceLibreSsl3/CMakeLists.txt line 84.
  • 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
Type 408 returns the key; other types return null passed read (Key.cpp lines 137-143)
Null key throws passed read
Upstream p_lib.c comparison not completed the debt entry's reference was fetched; the function was not located by the search
Provenance of the file header question OpenBSD banner and OpenSSL licence text, with the checklist ticked for "third-party code is a submodule" (non-blocking)
guest_libressl3_key_reference and pkey_getters (hosted) passed both Passed in the Windows CTest run
ABI audit (main-checkout tool) passed 270 symbols
Build and runtime tests not run no local build
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. ABI audit: passed (270 symbols). Hosted: gh api repos/boykopovar/AnyPS5/commits/fd2f521cf4d2024573a4de568aec86334c297784/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

  • Key.cpp begins with the OpenBSD p_lib.c banner and the OpenSSL/SSLeay licence text, and the PR body ticks "New third-party code is a submodule built from source". If the file is derived from p_lib.c, please say so and follow the submodule rule for the copied parts; if it is not derived, remove the copied licence blocks, since they claim a provenance the code does not have.

Sources

Not verified

  • The upstream function body was not compared line by line.
  • The console behaviour was not checked (the debt entry says the error queue is not modelled).

To get this to a good state

  • Nothing blocking. Settle the provenance of the header (non-blocking).
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5732269030 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14499#pullrequestreview-5732269030). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-02T05:00:27Z. **Review:** COMMENTED --- # Reviewed — no blocking findings `EVP_PKEY_get0_EC_KEY` returns the stored key for type 408 (`NID_X9_62_id_ecPublicKey`) and null for other types, and it throws for a null key. The function is the PR's own short code, and the hosted Windows run passed `guest_libressl3_key_reference` and `guest_libressl3_pkey_getters`. One provenance question is raised below: the new file opens with the OpenBSD `p_lib.c` banner and the OpenSSL licence text, while the checklist says new third-party code is a submodule. ## What I ran - Head `fd2f521cf4d2024573a4de568aec86334c297784`; base `f2d874c1fdccf781c0fa5d86619bb5dd8894b958`. 6 files, +155/-8: `libSceLibreSsl3/src/Key.cpp` (new, +113), `AdditionalExports.cpp` (the stub removed), `include/Api.hpp` (new typed declaration), `tests/PkeyGetters.cpp` (+7/-?), `GuestLibreSsl3KeyReference.cpp` (+33, new) and `docs/dev/debt/libSceLibreSsl3.md`. - Read the function (`Key.cpp` lines 137-143) and the file header (lines 1-80). - Fetched the upstream `evp/p_lib.c` cited in the debt entry (LibreSSL at `ce488b78`) and searched it for the function; my search pattern did not match, so the upstream body was not compared line by line. - Read-only checks from the trusted main checkout (precheck not run: no PR-head code is run here): diff check and conventions passed; the ABI audit passed (270 symbols); the stack check passed. - Hosted: the windows CTest run passed 2594 of 2594 cases, including `guest_libressl3_key_reference` and `guest_libressl3_pkey_getters` (both Passed). The new test is registered at `libSceLibreSsl3/CMakeLists.txt` line 84. - 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 | | Type 408 returns the key; other types return null | passed | read (`Key.cpp` lines 137-143) | | Null key throws | passed | read | | Upstream `p_lib.c` comparison | not completed | the debt entry's reference was fetched; the function was not located by the search | | Provenance of the file header | question | OpenBSD banner and OpenSSL licence text, with the checklist ticked for "third-party code is a submodule" (non-blocking) | | `guest_libressl3_key_reference` and `pkey_getters` (hosted) | passed | both Passed in the Windows CTest run | | ABI audit (main-checkout tool) | passed | 270 symbols | | Build and runtime tests | not run | no local build | | 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. ABI audit: passed (270 symbols). Hosted: `gh api repos/boykopovar/AnyPS5/commits/fd2f521cf4d2024573a4de568aec86334c297784/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** - `Key.cpp` begins with the OpenBSD `p_lib.c` banner and the OpenSSL/SSLeay licence text, and the PR body ticks "New third-party code is a submodule built from source". If the file is derived from `p_lib.c`, please say so and follow the submodule rule for the copied parts; if it is not derived, remove the copied licence blocks, since they claim a provenance the code does not have. ## Sources - Function: https://github.com/boykopovar/AnyPS5/blob/fd2f521cf4d2024573a4de568aec86334c297784/core/libs/prx/libSceLibreSsl3/src/Key.cpp#L137-L143 - File header: https://github.com/boykopovar/AnyPS5/blob/fd2f521cf4d2024573a4de568aec86334c297784/core/libs/prx/libSceLibreSsl3/src/Key.cpp - Upstream reference cited in the debt entry: https://github.com/libressl/openbsd/tree/ce488b78e0bd994780569df718596b9776ff681a/src/lib/libcrypto ## Not verified - The upstream function body was not compared line by line. - The console behaviour was not checked (the debt entry says the error queue is not modelled). ## To get this to a good state - Nothing blocking. Settle the provenance of the header (non-blocking).
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!14499
No description provided.