feat(libSceLibreSsl3): implement key size, security and comparison queries #15031
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15031"
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-02T11:07:54Z.
What
EVP_PKEY_sizeandEVP_PKEY_security_bitsnow call the matching key-method slot and preserve its signed result.EVP_PKEY_cmpcompares parameters first, stops when that comparison fails, and reads the current method again before the public-key comparison. The three calls use the existing 32-byte guest key and SysV callback ABI. LibreSSL 4.0.0 dispatch · Method layoutA missing key, method or size callback gives a size of zero. Security bits returns zero for a null key and −2 for an unsupported method. Comparison rejects mismatched key types and throws for null operands. The fixture covers signed boundaries, callback exceptions, self-comparison and method replacement. Real constructor and algorithm interoperation remain open.
The source scanner classifies 23/276 bodies as implemented on main and 26/276 on this branch. The difference is the 3 exports above. The scanner classifies source bodies and does not measure firmware compatibility. The additional export inventory has 173 pending entries (163 named, 10 known only by NID). The separate Export.cpp inventory falls from 68 throwing bodies to 67. The main-branch digest, error-string and X509 work is accounted for in that baseline.
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
8964fc297b33against main6d173c1a1978.7ad9749ed0preserved the exact branch and upstream diffs. Runtime results above are pinned to the tested base.On the earlier 7c36a78d1321 build against
acf7ac208a, Linux ran 48/48 and Windows PE under Wine ran 16/18. The parent BIO test timed out and the parent BN test hit an illegal instruction. Both reproduced with the same binaries and no LibreSSL3 module loaded. The current selection leaves those two historical failures open, as well as the earlier parent-cipher Wine failure.Both loader runs printed
PKEY queries: 1980 matrix cases, 10391 checks.Earlier validation on 7c36a78d1321 and the historical commits cited below
Current refreshed head
7c36a78d13210071593f2b8355cf0498811cf351on frozen mainacf7ac208a0a7c6df5e4253a22fda322760016c2. Only debt documentation conflicted. Every original owned production/API/CMake/fixture addition and deletion is preserved; upstreamX509_PUBKEY_get0_paramand every main union remain intact. Both rewritten commits were followed by validation at this final head. Main subsequently advanced tob8efa6292ae69dfdebbeffcc869b66ddbb8739fc; its 74-commit/69-path API delta contains no LibreSSL/LibreSSL3 change. Fresh libc production/API/build deltas were read for scope, but were not integrated or runtime-tested here. Results below remain pinned toacf7ac2.-j1); 16 passed / 2 failed in 87.36s (18 tests; no skips).crypto_memcmpare included on both platforms. Windows additionally runs parent key-type, EVP, BIGNUM, memory BIO and CMAC tests. Actual registered 20/30-second limits are preserved.The two Windows failures are in upstream parent fixtures: memory BIO times out at its unchanged 30-second limit after an undeliverable
std::system_error/missing-unwind-data diagnostic; BIGNUM reports 0xc000001d atliblibc.dll+0xe0049. Both reproduce using the identical hashed parent/libc/executable binaries in an isolated directory without loading LibreSSL3. Their source/build inputs are unchanged fromacf7ac2. This control is not a separately rebuilt complete main or proof of a Wine-only cause. Both failures remain unresolved; the 18-test Windows suite is not an all-pass result. All 12 modern tests, crypto_memcmp, parent key-type, parent EVP and parent CMAC pass.These are not independent native Windows, full-product, packaged-module/NID, title/homebrew or physical-console tests. Warnings remain. No production assertion, timeout or gate was weakened. The first Windows harness run failed all 18 launches because its DLL search path pointed to a libc subdirectory instead of the build root. A loader diagnostic confirmed missing
liblibc.dll(0xc0000135). The failed run and diagnostic are retained; only the harness search path was corrected before repeating the same built executables, with no rebuild or relaxed test limits. No new native CI result or current approval is inferred from older heads.Historical native Windows CI job125249454156/run41434311430 timed out at 45 minutes on main
98346b748caaf5e8e533540f3bb9e4ceacf3d7abplus OLD head0743ac9ca7463eae4ee47957e6b0ec86903ef238. Real modules and the key-query executable linked, but CTest never started: zero result rows and no runtime coverage from that attempt. Original local Linux 41/41 and Windows PE 11/12 remain archived at 0743/3c3b. The old parent cipher-context case failed with 0xc000001d/liblibc.dll+0xda4c9 and a 30-second timeout; an isolation control using the same hashed parent/libc/executable and no LibreSSL3 DLL reproduced it. That control was not a separate main rebuild or proof of a Wine-only cause. The new Windows selection does not rerun that parent fixture or claim to fix it. Other historical Wine limitations likewise remain unresolved. No empty commit or denied CI rerun was used to trigger checks.Current receipts:
/private/tmp/anyps5-monitor-20261104-0943, includingvalidation-evidence.tar.gz, reproducible harness/scripts, JUnit/manifests/loader traces, source/artifact hashes,own-preservation.json,manual-shared-review.txt,peer-payload-comparison.jsonand every peer head/merge-base snapshot. Prior d403/d1ae runtime evidence remains in/private/tmp/anyps5-advance-20261103-0127/conflict-refresh/15031with its exact original pins; it is not extended to this base.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.mdL12docs/dev/debt/libSceLibreSsl3.mdL35, L215docs/dev/debt/libSceLibreSsl3.mdL35docs/dev/debt/libSceLibreSsl3.mdL35docs/dev/debt/libSceLibreSsl3.mdL35, L215docs/dev/debt/libSceLibreSsl3.mdL32, L35, L215CompareParametersComparePublicEVP_PKEY_cmpEVP_PKEY_security_bitsEVP_PKEY_sizeQueryThrowComparisonThrowQueryWrongComparisonWrongQuerycore/libs/prx/libSceLibreSsl3/src/PkeyQueries.cppcore/libs/prx/libSceLibreSsl3/tests/PkeyQueries.cppdocs/dev/debt/libSceLibreSsl3.mdL35core/libs/prx/libSceLibreSsl3/AdditionalExports.cppL652-659core/libs/prx/libSceLibreSsl3/include/Api.hppL289-290docs/dev/debt/libSceLibreSsl3.mdL35, L195-197docs/dev/debt/libSceLibreSsl3.mdL35, L215docs/dev/debt/libSceLibreSsl3.mdL31-32, L35docs/dev/debt/libSceLibreSsl3.mdL35docs/dev/debt/libSceLibreSsl3.mdL35docs/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/Export.cppcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/Export.cppcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/Export.cppcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/Export.cppcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/Export.cppcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/Export.cppcore/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/Export.cppcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/Export.cppcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/Export.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.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/Export.cppcore/libs/prx/libSceLibreSsl3/include/Api.hppcore/libs/prx/libSceLibreSsl3/src/PkeyQueries.cppcore/libs/prx/libSceLibreSsl3/tests/PkeyQueries.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/AdditionalExports.cppcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/Export.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/Export.cppcore/libs/prx/libSceLibreSsl3/include/Api.hppdocs/dev/debt/libSceLibreSsl3.mdcore/libs/prx/libSceLibreSsl3/CMakeLists.txtcore/libs/prx/libSceLibreSsl3/Export.cppcore/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/Export.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.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-02T11:20:20Z.
Review: COMMENTED
Reviewed — no blocking findings
I reviewed all seven changed files at head
0743ac9ca7463eae4ee47957e6b0ec86903ef238; I found no blocking source issue, but the hosted checks were still queued.What I ran
Reviewed head
0743ac9ca7463eae4ee47957e6b0ec86903ef238against base3c3b3cda739f9eb00a07fae50d94a3af5f6fb8f2. The exact head previews cleanly against currentmain. Environment: Debian 12 Linux, Python 3.11.2, GCC 12.2.0. I did not configure or build.The precheck's isolated checkout lacked the local ABI and test-quality helper scripts. I ran those helpers separately and inspected their findings against the exact-head source and CMake registration.
Results
Check output and report excerpts
Negative control
Findings
Blocking
None found in the complete source review.
Non-blocking
None. The test-registration heuristic warning is disproved by the exact-head CMake entries above.
Sources
Not verified
To get this to a good state
No code change is requested from this review. Once the hosted checks finish, I will re-check this exact head and its results, then approve if required checks pass; if the head changes, I will review the new diff and rerun affected checks.