feat(libSceLibreSsl): implement OBJ_nid2sn and OBJ_sn2nid #10508
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10508"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by Ab1jithK on 2026-10-24T06:05:00Z.
What
Implements
OBJ_nid2snandOBJ_sn2nidin libSceLibreSsl on the shared object table, following LibreSSL 2.5.4obj_dat.c.OBJ_nid2snreturnsLibreSslObjectShortName_nid_no_patch(nid): the built-in short name for NIDs below 956, the name of an object added byOBJ_createabove that, and null withOBJ_R_UNKNOWN_NID(0x08fff065) queued for the seven unassigned NIDs (102, 118, 350, 511, 772, 774, 775) and, once an object was added, for unknown NIDs outside the table. Before anyOBJ_create, NIDs outside the table return null with nothing queued.OBJ_sn2nidlooks up objects added byOBJ_createby short name first (the newest object with a name wins, as LibreSSL's hash insert replaces), then runsOBJ_bsearch_ex_'s binary search over the built-in table in 2.5.4'ssn_objsorder withstrcmp, returningNID_undefon a miss."NULL", the short name of both 393 and 404, resolves to 404. A null name throws where LibreSSL faults.ObjectTable.cppgainsLibreSslObjectShortNameOrder_nid_no_patch, the 949-entrysn_objsorder generated byobjects.plandobj_dat.plat that commit, next to the existing OID order; it was checked against the table: same names and gaps for all 956 NIDs, sorted bystrcmp.ObjectCreate.cppindexes added objects by short name andOBJ_cleanupclears that index.src/Objects.cppand its private table are gone.include/Api.hpp, theNotImplementeddeclarations are removed fromExport.cpp, and the debt doc gains anOBJ_nid2sn/OBJ_sn2nidentry; theOBJ_createentry now says short names are indexed.Tested
Windows 11 Pro 10.0.26300, WinLibs GCC 15.2.0 (
posix-seh, ucrt r7), Release,BUILD_TESTING=ON, head1c37061(currentmainmerged in):ctest --test-dir build -R "^guest_libre_?ssl_|^public_headers"passes 129/129, includingpublic_headers, thepublic_headers_compile_*batches,guest_libressl_object_text,guest_libressl_object_allocationand the newguest_libressl_object_name. That test covers the built-in names,"NULL"→ 404, out-of-range and unknown names, a round trip over every assigned NID, the unassigned NIDs returning null with0x08fff065queued, the null name, and objects fromOBJ_create: lookup both ways, an added"CN"found before the built-in one, a reused short name resolving to the newest object, an object without a short name, unknown NIDs once objects exist, andOBJ_cleanup.tools/check_conventions.py --base origin/mainpasses. Linux not run on this head locally; @wachi35676 ran the previous head on WSL2 Ubuntu 24.04. @BunnyFl compared the built-in lookups with the firmware 13.42 module run natively on a PC (not a console). No title run.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-24T11:16:46Z.
Review: APPROVED
Reviewed exact head 4f3998e85a34b32cfdd21d995eaf849f02e9e7bd against the pinned LibreSSL 2.5.4 object lookup source. The NID table, seven unassigned slots, sorted short-name search indices, duplicate "NULL" resolution (393/404 -> 404), out-of-range behavior, and null-name error path are represented consistently; the test covers every assigned NID round-trip. The author reports the focused Windows Release suite at 5/5 and conventions passing. No Linux/Windows full-build jobs are present on this PR. I attempted the documented manual build dispatch, but GitHub rejected it with HTTP 403 (repository admin rights required), so I could not start those jobs. No console behavior is claimed.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-24T19:50:23Z.
Review: APPROVED
Re-reviewed exact head
babd492c7971525ce9e50d15c1693206e7cc4b25after its rebase. The implementation and behavior match the previously reviewed version; the rebase retains the new object source/test and updated pending-export count. I compiled and ranObjects.cppwithGuestLibreSslObjects.cppdirectly using GCC 12.2 (-std=c++20 -Wall -Wextra); it passes. Diff-check and conventions pass. The author reports the full focusedguest_libressl_*set passing on Windows, including the newly integrated AES test.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-08T05:03:10Z.
Review: COMMENTED
Tests run and reviewed — checks incomplete, not approved
CTest did not run the exact selected tests (expected: guest_freetype_postscript_private, guest_freetype_postscript_private_nid, guest_freetype_postscript_info, guest_freetype_postscript_info_nid, guest_libressl_errors; observed: none). The result is unavailable. Not approved: Adaptive build and tests (merged preview): did not finish. The review identified behavior or claims it could not fully veri
What I ran
Head
1c370616c3dc6e3964c0356805883e6b919dd86e; base78976e2657bb5222d85e7ad698e41581ac19a36e.Recorded local processing time: 8m 28s across no-build checks 21s, build and tests 7m 36s, AI diff review 31s. This sums task runtimes (which may overlap); GitHub Actions time is excluded.
Environment: Linux-6.1.0-54-amd64-x86_64-with-glibc2.36; Python 3.11.2; compiler c++ (Debian 12.2.0-14+deb12u1) 12.2.0.
Saved local build and test runs are listed below; their source and results are in the Test logs section.
I ran the repository's no-build precheck on this exact head and base:
Hosted CI results are read from GitHub; I did not run them.
I compared the full diff of 9 changed files (4,683 lines) with the pull request description. I ran nothing for this and looked at nothing outside the diff.
Results
Findings
Blocking
None in the diff of 9 changed files.
Non-blocking
None recorded.
Not verified
Test logs (13 entries; open to read)
build_and_compile: not run
Reason:
No output.
diff_check: passed (exit 0)
Command:
No output.
conventions_and_pr_template: passed (exit 0)
Command:
stdout:
changed_export_abi_audit: passed (exit 0)
Command:
stdout:
python_syntax: not applicable
Reason:
No output.
related_python_unit_tests: not applicable
Reason:
No output.
python_test_registration: not applicable
Reason:
No output.
live_dependency_and_mergeability_check: passed (exit 0)
Command:
stdout:
build_dependent_cpp_tests: not run
Reason:
No output.
test_quality_heuristics: passed (exit 0)
Command:
stdout:
negative_controls: not applicable
Reason:
No output.
Adaptive build and tests (merged preview): did not finish
Result:
Base commit:
Steps:
End of the output:
Complete output: 5,815 lines, 0.5 MB: not attached (it stays in the local report)
Hosted CI as GitHub shows it: passed
Jobs, newest run of each:
Overall: