feat(libSceSsl): parse certificates and account context memory #1884

Closed
Albaloola wants to merge 2 commits from upstream-pr/1884 into main
Albaloola commented 2026-10-08 22:44:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Albaloola on 2026-10-08T22:44:36Z.


What

Implement eight existing certificate/memory exports and three necessary CA-list/unload exports. Parse DER/PEM certificate chains and matching client keys, enumerate subject/issuer entries, return raw serial bytes, retain independent certificate/list/name snapshots, and account bounded per-context backend/data memory. Imports commit atomically; malformed chains, mismatched keys and exhausted pools preserve prior state.

Use source-built Mbed TLS 3.6.7 under its offered GPL-2.0-or-later license. The optional Apache-only Everest implementation is disabled/unlinked. Guest signatures follow pinned SharpProspero and orbital declarations. TideOPL's #1119 overlaps MemoryPoolStats with a zero-usage implementation; no code from it is imported.

Tested

Windows x86-64, WinLibs MinGW-w64 GCC 15.2.0, Release. This topic is based on upstream main ce64d8eb. Runtime results below come from the integrated checkout; the isolated source checks are described separately. The final integrated Release build and library target passed, with 504/506 CTests passing: only the pre-existing shader_clock and vopc_compare_table GPU failures remain. No new failures were observed.

The baseline library fails the pool-stat regression. Six focused SSL/HTTP/HTTP2 tests pass, including generated certificate/key fixtures, DER round trips, name/serial bytes, short-buffer canaries, pool exhaustion rollback, bad second CA/client key, snapshot survival across unload, context isolation, stale handles and concurrent cycles. Full build/libs, repeated cache-isolated configuration, conventions and registration pass. Export inspection finds 17 guest symbols and no backend symbols.

This parses credentials and checks client key correspondence; it does not perform a TLS handshake or authenticate a peer. Only explicitly loaded CAs are available. C++ bookkeeping/tombstones are outside the bounded backend/data pool. Console formatting/error precedence/allocation parity remain unverified; Close/GetPem remain unimplemented. No PS5 hardware, retail title or Linux runtime validation was performed.

Isolated publication-source check: all 3 affected production/test compile configurations pass with this branch's own core headers, excluding neighboring local topics. Conventions, diff checks and source/test registration review also pass. Dependency headers and generated configuration come from the existing pinned build; a new full configure/link/runtime run was not performed for this isolation check.

Checklist

  • Based on current main; isolated source, diff and conventions checks pass (runtime scope above)
  • No overlapping open PR (known overlap disclosed above; do not mark this item checked)
  • One topic per PR; follow-up work is separate
  • No investigation notes or images added to repository source
  • Unsupported paths remain explicit failures; limitations are recorded in TechnicalDebt
  • New third-party dependencies, if any, are pinned submodules built from source
  • Generic behavior, not specific to one title
  • Depends on: none
  • AI-assisted: yes, with OpenAI Codex; the PR author remains responsible for the submitted changes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4793678680 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1884). Originally posted by [Albaloola](https://github.com/Albaloola) on 2026-10-08T22:44:36Z. --- ### What Implement eight existing certificate/memory exports and three necessary CA-list/unload exports. Parse DER/PEM certificate chains and matching client keys, enumerate subject/issuer entries, return raw serial bytes, retain independent certificate/list/name snapshots, and account bounded per-context backend/data memory. Imports commit atomically; malformed chains, mismatched keys and exhausted pools preserve prior state. Use source-built [Mbed TLS 3.6.7](https://github.com/Mbed-TLS/mbedtls/tree/068ff080b369adfac81509f9b57b2afabaf82dc5) under its offered GPL-2.0-or-later license. The optional Apache-only Everest implementation is disabled/unlinked. Guest signatures follow pinned SharpProspero and orbital declarations. [TideOPL's #1119](https://github.com/boykopovar/AnyPS5/pull/1119) overlaps MemoryPoolStats with a zero-usage implementation; no code from it is imported. ### Tested Windows x86-64, WinLibs MinGW-w64 GCC 15.2.0, Release. This topic is based on upstream main ce64d8eb. Runtime results below come from the integrated checkout; the isolated source checks are described separately. The final integrated Release build and library target passed, with 504/506 CTests passing: only the pre-existing shader_clock and vopc_compare_table GPU failures remain. No new failures were observed. The baseline library fails the pool-stat regression. Six focused SSL/HTTP/HTTP2 tests pass, including generated certificate/key fixtures, DER round trips, name/serial bytes, short-buffer canaries, pool exhaustion rollback, bad second CA/client key, snapshot survival across unload, context isolation, stale handles and concurrent cycles. Full build/libs, repeated cache-isolated configuration, conventions and registration pass. Export inspection finds 17 guest symbols and no backend symbols. This parses credentials and checks client key correspondence; it does not perform a TLS handshake or authenticate a peer. Only explicitly loaded CAs are available. C++ bookkeeping/tombstones are outside the bounded backend/data pool. Console formatting/error precedence/allocation parity remain unverified; Close/GetPem remain unimplemented. No PS5 hardware, retail title or Linux runtime validation was performed. Isolated publication-source check: all 3 affected production/test compile configurations pass with this branch's own core headers, excluding neighboring local topics. Conventions, diff checks and source/test registration review also pass. Dependency headers and generated configuration come from the existing pinned build; a new full configure/link/runtime run was not performed for this isolation check. ### Checklist - [x] Based on current main; isolated source, diff and conventions checks pass (runtime scope above) - [ ] No overlapping open PR (known overlap disclosed above; do not mark this item checked) - [x] One topic per PR; follow-up work is separate - [x] No investigation notes or images added to repository source - [x] Unsupported paths remain explicit failures; limitations are recorded in TechnicalDebt - [x] New third-party dependencies, if any, are pinned submodules built from source - [x] Generic behavior, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes, with OpenAI Codex; the PR author remains responsible for the submitted changes

Pull request closed

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!1884
No description provided.