feat(libSceLibreSsl): implement EVP_PKEY_type #10398
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10398"
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 alvaroelpob on 2026-10-23T21:26:46Z.
What
Implements
EVP_PKEY_type(int)in libSceLibreSsl, which threw and was declared without parameters. It is a pure lookup of a key type's base type, in one commit.The module is LibreSSL 2.5.4 (firmware 13.40 measurements in #8981). In that release
EVP_PKEY_typereturns thepkey_idthatEVP_PKEY_asn1_findfinds instandard_methods, following alias entries to their base type, orNID_undef(0). The engine branch can't apply: everyENGINE_export of this module throws, so no engine is ever registered.EVP_PKEY_asn1_add0, the only way to add application methods, isn't exported.obj_mac.num)Which method families the console's build compiles in comes from BunnyFl's run of firmware 13.42's module on a PC, over every type from -1000 to 5000 and the
intextremes: DH and DSA are compiled in and GOST is not (OPENSSL_NO_GOST), and every other type matches this table. The debt entry records this.Tested
Ubuntu (WSL2, kernel 6.18), GCC 15.2.0, Release, full build with
BUILD_TESTING=ONonmaina0e858ff7.New
guest_libressl_pkey_typetest checks:INT_MIN,INT_MAX).On
mainthe first call throws.Full
ctest -j16: 1992/1993 pass.agc_driver_multisample_retirementfails the same way onmainon this machine.Not tested: Windows, a title.
Rebased on
main1e740a23a3(after #9033), head d7412d888a: the conflicts were only theadd_librarysource list, the end of the test block, the pending-export count and the last debt entry; both sides are kept and the count is 357 minus this PR's exports. Full build andctest -j16: 2043/2044 pass;agc_driver_multisample_retirementfails the same way on thatmain.check_conventions.py --base upstream/mainpasses.Rebased on
maine7e3e9c198, head e400befc61, to resolve the conflict from #9529 on the sharedCMakeLists.txtand debt-file lines; both sides are kept and the count is 353 minus this PR's exports. e400befc61 (refactor(libSceLibreSsl): declare the EVP_PKEY_type exports in the public header) puts the real signatures and their structs inlibSceLibreSsl/include/Api.hppand drops the test's redeclarations, whichpublic_headersrequires since #10706. Full build andctest -j16: 2202/2203 pass;agc_driver_multisample_retirementfails the same way on thatmain.check_conventions.py --base upstream/mainpasses.Rebased on
mainae7d59258e(after #9949), head de9de5ebcd, to resolve the conflicts withmainon the sharedCMakeLists.txtand debt-file lines; both sides are kept and the count is 342 minus this PR's exports. Full build andctest -j16: 2275/2276 pass;agc_driver_multisample_retirementfails the same way on thatmain.check_conventions.py --base upstream/mainpasses.Review fix 64680a6faa returns 28 for DH, 116 for the DSA types and 0 for GOST, as firmware 13.42's module does, drops the throw checks, tests the DH and DSA results with the GOST types among the 0 cases, and updates the debt entry;
guest_libressl_pkey_typepasses, and returning the type itself for the DSA aliases fails it. Full build andctest -j16onmainae7d59258e: 2275/2276 pass;agc_driver_multisample_retirementfails the same way on thatmain.check_conventions.py --base upstream/mainpasses.Rebased on
main2dbe9b99f5(after #9745, #9870 and #11111), head c9ffcc7cfb, to resolve the conflicts withmainon the sharedCMakeLists.txtand debt-file lines; both sides are kept and the count is 340 minus this PR's exports. Full build andctest -j16: 2370/2371 pass;agc_driver_multisample_retirementfails the same way on thatmain.check_conventions.py --base upstream/mainpasses.Rebased on
main88795ed448(after #10248; head 15044f970e) to resolve the conflicts on the shared debt-file lines; both sides are kept and the count is 335 minus this PR's exports. Full build andctest -j16: 2383/2384 pass;agc_driver_multisample_retirementfails the same way on thatmain.check_conventions.py --base upstream/mainpasses.Rebased on
mainc7b4878fa8(after #10373, #10376 and #10449), head1e88908181, to resolve the conflicts withmainon the sharedCMakeLists.txt,Api.hppand debt-file lines; both sides are kept and the count is 319 minus this PR's exports. Full build andctest -j16: 2394/2395 pass;agc_driver_multisample_retirementfails the same way on thatmain.check_conventions.py --base upstream/mainpasses.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 copilot-pull-request-reviewer[bot] on 2026-10-23T21:26:56Z.
Review: COMMENTED
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-23T23:10:14Z.
Review: APPROVED
Reviewed the exact head
9b9dd413ec91f72a6d326179ee9321c31ba36746. The mapping matches LibreSSL 2.5.4:EVP_PKEY_typereturns the unaliased methodpkey_id, orNID_undef, and the pinned ASN.1 method lookup follows alias base IDs. The explicit throws for DH/DSA/GOST preserve the repository's rule not to guess whether those optional families were compiled into the console module.I independently compiled and ran
GuestLibreSslPkeyType.cppwithPkey.cppunder GCC C++20 with-Wall -Wextra -Werror; it passed. The exact-head conventions check andgit diff --checkalso passed. I did not run the full project build or a title. The four declared dependencies are still open, and this branch is 141 commits behind currentmain; please rebase after the dependency stack settles, then rerun the project checks on that head.