feat(libSceLibreSsl3): implement TLS protocol list parsing #15045
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15045"
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 atharvjairath on 2026-11-02T12:01:49Z.
What
tls_config_parse_protocolsnow parses comma- and colon-separated lists, mixed ASCII case, leading spaces and tabs, and exclusions. The default and aggregate mask is0x18. Explicit TLS 1.0, 1.1, 1.2 and 1.3 use bits 2, 4, 8 and 16. An exclusion reseeds an empty accumulator. On success the function writes the caller’s result before releasing the guest string. On invalid input or allocation failure it preserves the caller’s result. LibreSSL 4.0.0 parser · Protocol masksBunnyFl reported matching mask values from firmware 13.42 disassembly. Console execution, the full firmware grammar and TLS configuration integration remain open. Contributor’s disassembly report
The aggregate names all, legacy, default, secure and tlsv1 select the same mask. A null output pointer throws. The export identifier is vu4FgwGayHY.
The source scanner classifies 23/276 bodies as implemented on main and 24/276 on this branch. The difference is the 1 export above. The scanner classifies source bodies and does not measure firmware compatibility. The additional export inventory has 174 pending entries (164 named, 10 known only by NID).
Integration order is #14992 → #15031 → #15045 → #15119 → #15406. This branch is based directly on main
6d173c1a1978. Each branch keeps its own changes. The order allows the shared CMake registrations and debt counts to be reconciled after each merge.Tested
Validated head
38cf2740c751against main6d173c1a1978.7ad9749ed0preserved the exact branch and upstream diffs. Runtime results above are pinned to the tested base.The ownership callback fixture checks the parsed mask at release time. The earlier sequencing review still awaits re-review. Sequencing review
Both loader runs printed
TLS protocol parser: 7012 cases, 195206 checks, 6955 releases, zero live allocations.Earlier validation on 3f3eea10c41e and the historical commits cited below
Current refreshed head
3f3eea10c41e49d8f9e29fdd7521d895803c7d06on frozen maind1ae628bc2f62459cce1e9872ba5632c938c71f2. Only debt documentation conflicted. Every original owned production/API/CMake/fixture addition and deletion is preserved; upstream ASN1_TIME_diff and all main unions remain intact. Prior reviews and CI are pinned to older heads below.-j1), 12/12 passed in 35.82s.d1ae628integration, with full dependency-input equality and hashes retained. They were not rebuilt separately for each of these four PRs. The separate signature integration ran 44 Linux and 14 focused Windows tests; those are not this PR’s suite counts. This refresh does not rerun the separate parent/error-string/packaged protocol-NID groups.These are focused module tests, not independent native Windows, full-product, packaged-module/NID, title/homebrew or physical-console validation. Known unrelated Wine limitations remain unresolved; no assertion, timeout, gate or runtime workaround changed. The default-off oracle was not enabled. Warnings remain. No new native CI result or current approval is inferred from older heads.
Historical native Windows CI job125412612997/run41483840592 audited on main
b28bb772177768f99874ca38f6252cd0139acf2aplus OLD headb67007c7f6fb0d4f01894374dcdacefb7aca2bb3: 1,982 Passed / 954 Skipped / zero Failed across 2,936 unique rows, 118.24s; all 46 LibreSSL registrations including parser passed. Separate full-build/runtime/skip-audit/graph steps were skipped. It is pinned native CI unit/runtime evidence, not a run or approval of the refreshed head. Original local Linux 41/41 and Windows PE 11/11 at 5f8125/98346 and three rejected external mutation controls remain archived. BunnyFl’s old-head review reports firmware 13.42 mask disassembly and unspecified-main nativeWindows tests; the debt retains attribution, not independent console/native-local verification. MarcZX10’s change request is not dismissed or declared approved: sequencing and conflict handling are recorded, but re-review remains outstanding. No review request or reply was sent.Receipts:
/private/tmp/anyps5-advance-20261103-0127/conflict-refresh/15045and the sharedvalidation-evidence.tar.gz,common-input-equality.json,heads-rebased.json,manual-shared-review.txt,peers-finaland reproducible harness/scripts. Previous local/native evidence remains in the linked Nov2 receipts with its original pins.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)Overlap report before the branch refresh was pushed
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)docs/dev/debt/libSceLibreSsl3.mdL35, L215docs/dev/debt/libSceLibreSsl3.mdL35docs/dev/debt/libSceLibreSsl3.mdL35core/libs/prx/libSceLibreSsl3/AdditionalExports.cppL668-672core/libs/prx/libSceLibreSsl3/include/Api.hppL293-294docs/dev/debt/libSceLibreSsl3.mdL35, L215docs/dev/debt/libSceLibreSsl3.mdL32, L35, L215tls_config_parse_protocolscore/libs/prx/libSceLibreSsl3/src/TlsProtocols.cppcore/libs/prx/libSceLibreSsl3/tests/TlsProtocols.cppdocs/dev/debt/libSceLibreSsl3.mdL35core/libs/prx/libSceLibreSsl3/include/Api.hppL294docs/dev/debt/libSceLibreSsl3.mdL35tls_config_parse_protocolsdocs/dev/debt/libSceLibreSsl3.mdL35, L215docs/dev/debt/libSceLibreSsl3.mdL31-32, L35docs/dev/debt/libSceLibreSsl3.mdL35core/libs/prx/libSceLibreSsl3/AdditionalExports.cppcore/libs/prx/libSceLibreSsl3/include/Api.hppL294-295docs/dev/debt/libSceLibreSsl3.mdL35, L201-202docs/dev/debt/libSceLibreSsl3.mdL31-32, L35docs/dev/debt/libSceLibreSsl3.mdL31-32, L35docs/dev/debt/libSceLibreSsl3.mdL31-32, L35docs/dev/debt/libSceLibreSsl3.mdL31-32, L35docs/dev/debt/libSceLibreSsl3.mdL31-32, L35docs/dev/debt/libSceLibreSsl3.mdL31-32, L35docs/dev/debt/libSceLibreSsl3.mdL31-32, L35docs/dev/debt/libSceLibreSsl3.mdL31-32, L35docs/dev/debt/libSceLibreSsl3.mdL31-32, L35docs/dev/debt/libSceLibreSsl3.mdL35docs/dev/debt/libSceLibreSsl3.mdL35docs/dev/debt/libSceLibreSsl3.mdL35Some 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.
core/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/CMakeLists.txtdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/AdditionalExports.cppcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mddocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/AdditionalExports.cppcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/AdditionalExports.cppcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/AdditionalExports.cppcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/AdditionalExports.cppcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/AdditionalExports.cppcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppcore/libs/prx/libSceLibreSsl3/src/TlsProtocols.cppcore/libs/prx/libSceLibreSsl3/tests/TlsProtocols.cppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/AdditionalExports.cppcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/AdditionalExports.cppcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/AdditionalExports.cppcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/CMakeLists.txtdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/AdditionalExports.cppcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/AdditionalExports.cppcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/AdditionalExports.cppcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/AdditionalExports.cppcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/AdditionalExports.cppcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/AdditionalExports.cppcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/CMakeLists.txtImported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-02T12:26:04Z.
Review: DISMISSED
Reviewed — changes requested
The parser and tests match the cited LibreSSL behavior on the cases reviewed, but this branch conflicts pairwise with two open LibreSSL3 PRs and has no agreed landing order recorded.
What I ran
Reviewed all six changed files at head
5f8125ab15cab7c1add289e86d46c11981e408baagainst base24238c4cb1a58e4ddb0596e68dc072e715f9bb17. The head merges cleanly onto that base by itself; pairwise previews with #14992 and #15031 conflict. Environment: Linux x86_64, Python 3.11.2, GCC 12.2.0. No build was run.Results
Precheck summary and raw outputs
The precheck reported diff check, conventions and individual stack preview passed. Its ABI and test-quality helper scripts could not be opened from the isolated checkout. I reran the ABI audit directly:
The convention checker printed:
The pairwise merge previews returned exit code 1 and listed these conflicts:
They were tested against open PR #14992 at head
376db33f6d29241aa5cfdf6cb710bc1e7f5e8683and open PR #15031 at head0743ac9ca7463eae4ee47957e6b0ec86903ef238. Both PRs are individually clean against current main; the conflicts arise when combining them with this PR.Negative control
Findings
Blocking
The PR declares
Depends on: none, but pairwise merge previews against open #14992 and #15031 both conflict incore/libs/prx/libSceLibreSsl3/CMakeLists.txtanddocs/dev/debt/libSceLibreSsl3.md. The repository requires authors to agree which overlapping PR lands first and record the resulting dependency. Please coordinate the order across these PRs and reflect it in the applicableDepends onchecklist entries; if #15045 is chosen to land first, record that order and update the dependent PRs instead. Then refresh the overlap/stack checks and resolve any resulting branch conflicts.Non-blocking
No parser correctness defect was found in the reviewed diff. The implementation matches LibreSSL 4.0.0's leading space/tab trimming,
!exclusions, comma/colon separators, case-insensitive protocol names, default mask, and unchanged output on parse failure. The host C++ fixture is extensive and registered, but I did not run it.Sources
tls_config_parse_protocolsat pinned commit and protocol masks intls.hat the same commit.Not verified
No local build, CTest, or mutation control was run. The PR description reports focused Linux and Windows tests and three passing negative controls; these remain author-reported. All six hosted checks were queued at the final snapshot. Console masks, protocol compatibility and TLS interoperability remain unverified, as the PR's debt note states.
To get this to a good state
Agree and record a landing order for #15045, #14992 and #15031, update applicable dependency declarations and resolve pairwise conflicts. I will rerun the no-build checks and inspect the updated heads; approval remains withheld until required hosted checks pass.
Imported from boykopovar/AnyPS5. Originally posted by BunnyFl on 2026-11-02T12:30:20Z.
Review: APPROVED
Looks right, and the masks match the PS5 module, not only LibreSSL 4.0.0.
Against
tls_config.catce488b78.strsep(",:")becomesfind_first_of(",:"), and leading spaces and tabs are skipped. On!, an emptyprotosbecomesTLS_PROTOCOLS_ALLbefore masking. An unknown or empty token returns -1 without writing. The upstream base reset happens before the name lookup and here after it, but since an invalid token returns without writing, the result is the same.Against firmware 13.42's
system/common/lib/libSceLibreSsl3.sprx(sha256ee2c529c87fe21b7ef1e5f13d10c47ee90944f52a1f848fe0995e031817c2c3a),tls_config_parse_protocols(vu4FgwGayHY) at0x10e8b0, disassembly only:movl $0x18, (%r14)at0x10ea92, so the default is0x18.all/legacy/default/secure/tlsv1value aremov $0x18(0x10e945,0x10e9bc), and the explicit versions are2/4/8/0x10(0x10ea3a–0x10ea48,0x10ea22).So the PS5 build uses the 4.0-era meaning (TLS 1.2/1.3 for
all/tlsv1), not the older 3.x one wheretlsv1also set 1.0/1.1. The debt entry's "console masks unverified" could be narrowed accordingly. The module doesn't test the output pointer, so throwing on null is the documented divergence from a fault.Tested on Windows 11, WinLibs GCC 15.2.0, Release, with head
5f8125ab15merged ontomain:guest_libressl3_tls_protocols,public_headersandcheck_conventions.py --base upstream/mainpass.