Skip to content

feat(net-input): complete stubs in libSceHttp, libSceSsl and libSceConvertKeycode - #9822

Closed
Delciob wants to merge 1 commit into
boykopovar:mainfrom
Delciob:feat/http-ssl-and-keycode-stubs
Closed

Delciob wants to merge 1 commit into
boykopovar:mainfrom
Delciob:feat/http-ssl-and-keycode-stubs

Conversation

@Delciob

@Delciob Delciob commented Oct 22, 2026

Copy link
Copy Markdown

What

Complete stubs in libSceHttp, libSceSsl and libSceConvertKeycode.

Tested

Windows 10 x64, net and input stubs.

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: no

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 22, 2026
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 6797 core/libs/prx/libSceConvertKeycode/Export.cpp
PR 9630 core/libs/prx/libSceHttp/Export.cpp
PR 9834 core/libs/prx/libSceHttp/Export.cpp
PR 10167 core/libs/prx/libSceSsl/Export.cpp
PR 10437 core/libs/prx/libSceConvertKeycode/Export.cpp
PR 10535 core/libs/prx/libSceHttp/Export.cpp
PR 10900 core/libs/prx/libSceHttp/Export.cpp
PR 11134 core/libs/prx/libSceHttp/Export.cpp
core/libs/prx/libSceSsl/Export.cpp
PR 11145 core/libs/prx/libSceSsl/Export.cpp

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed head 6cdc37108d03603d0dbd950e9e2f8a5109e7ea84 against current main and found regressions/overlap:

  • sceSslGetPem copies crt->raw bytes directly and reports the DER length. The existing GuestSslLoad.cpp test requires PEM output (including the PEM size query, PEM text and short-buffer error), and the current main implementation at sceSslGetPem already performs that encoding. The PR version would fail those assertions and should not replace the newer implementation.
  • sceConvertKeycodeGetCharacterFromKeyboardData is changed from a no-argument stub to a constant error return, but current main already has a five-argument implementation that reads the requested keyboard data. Keep the current implementation after syncing.
  • sceHttpSetCookieEnabled(..., 1) now returns success without enabling cookies; docs/dev/debt/libSceHttp.md says enabling throws because the offline backend has no cookie engine. Please retain the throw until that behavior exists.

Current main merge-tree reports conflicts in libSceConvertKeycode/Export.cpp and libSceSsl/Export.cpp. python3 tools/check_conventions.py --base upstream/main and git diff --check pass, but the PR description gives no focused test command/results. Please rebase onto current main, preserve its existing implementations, keep unsupported cookie enabling explicit, and rerun the focused keycode/SSL tests.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes sceHttpSetCookieEnabled(id, 1) from the required unimplemented-path throw to success, but the option is not stored or applied anywhere in this diff. A caller is told cookies are enabled when the implementation still has no cookie support; this directly violates CONTRIBUTING.md’s every-function contract and its limited silent-stub exception. Keep the unsupported case throwing (and retain a test for it) until cookie behavior is implemented. The overlap bot also could not compare libSceHttp/Export.cpp against #9834; both diffs modify this exact export, and #9826 does too. Please coordinate merge order with those authors and declare Depends on where needed.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two blocking issues in the changed behavior:

  • sceSslGetPem copies crt->raw verbatim. In this backend, certificate inputs are parsed into Mbed TLS X.509 objects and raw is the DER certificate buffer (see the bundled mbedtls_x509_crt_parse_der path); this does not produce PEM text. Also, when a non-null output buffer is too short, the function currently reports success after only updating *pemLen. Please serialize the DER certificate to PEM and match the established required-size/short-buffer behavior (for example, compare sceSslGetSerialNumber), with focused tests for sizing, short buffers, and returned PEM content.
  • sceHttpSetCookieEnabled(id, 1) now returns success but this PR adds no cookie storage or handling. AGENTS.md says never return made-up success. Keep the unsupported enable path throwing until cookie behavior exists.

The cookie setter change is also duplicated in open #9826; the overlap report and checklist need an agreed order/dependency rather than Depends on: none. The branch is based on 11f976b2, 44 commits behind current main a6646f84. The report only identifies a Windows build, and current product jobs are skipped; focused behavior tests are needed on the final rebased head. I did not run local tests for these changes.

@github-actions github-actions Bot added the prx label Oct 23, 2026
danielradosa added a commit to danielradosa/AnyPS5 that referenced this pull request Oct 24, 2026
…Http, libSceSsl and libSceConvertKeycode

Took only sceConvertKeycodeGetCharacterFromKeyboardData (returns INVALID_ADDRESS, our parameter list kept) and listed it as a silent stub; kept our fuller sceSslGetPem (PEM encoding) and sceHttpSetCookieEnabled (option stored).
@MarcZX10 MarcZX10 mentioned this pull request Oct 24, 2026
12 tasks done
@adriadam10 adriadam10 self-assigned this Oct 26, 2026
@adriadam10

Copy link
Copy Markdown
Collaborator

Closing, with reasons so you can reopen a fixed version:

Welcome to reopen with one function per PR, a reference for each behaviour, and a test that fails without the change.

@adriadam10 adriadam10 closed this Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs rebase Conflicts with main, rebase needed prx

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants