feat(libSceLibreSsl3): implement EVP_PKEY_get0_RSA, EVP_PKEY_get0_DSA and EVP_PKEY_get0_DH #13897
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/13897"
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 gazaret on 2026-10-31T11:49:46Z.
What
Implements
EVP_PKEY_get0_RSA,EVP_PKEY_get0_DSAandEVP_PKEY_get0_DHin libSceLibreSsl3, which were(void)throwing stubs. They follow LibreSSL 4.0.0'sp_lib.c, the version the existing 32-byteLibreSsl3EvpPkeylayout andEVP_PKEY_up_refalready follow:EVP_PKEY_RSA(6) orEVP_PKEY_RSA_PSS(912) forget0_RSA,EVP_PKEY_DSA(116) forget0_DSAandEVP_PKEY_DH(28) forget0_DH;EVP_R_EXPECTING_AN_RSA_KEY,EVP_R_EXPECTING_A_DSA_KEYorEVP_R_EXPECTING_A_DH_KEYand returns NULL there, but the LibreSSL3 error queue is not modelled (the debt file already notes this for the integer decoder);EVP_PKEY_up_refdoes, where LibreSSL dereferences it.The public declarations in
libSceLibreSsl3/include/Api.hpptakeLibreSsl3EvpPkey*and returnLibreSsl3Rsa*, orvoid*for DSA and DH, which have no layout here yet. The code is in its ownsrc/PkeyGetters.cpp, since several open pull requests changesrc/Key.cpp. The pending-exports count indocs/dev/debt/libSceLibreSsl3.mddrops from 80 to 77, and a new entry records the gaps above.Tested
Ubuntu 22.04 (WSL2), GCC 13.4, Release, on
maincbed915291, fullBUILD_TESTING=ONbuild:guest_libressl3_pkey_getters: RSA and RSA-PSS keys give their RSA pointer, DSA and DH keys give theirs, a matching key with no inner key gives NULL, and the reference counts are unchanged. Passes 3 of 3 runs. The throwing paths are not asserted.ctest -R 'libressl3|public_headers|patched_librar|nid_': 86 of 86 pass.tools/check_conventions.py --base origin/main: no findings.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-31T11:52:27Z.
Review: APPROVED
Reviewed — looks good
The three getters return the correctly type-checked inner key pointer without changing its reference count, and I found no blocking issue in the exact diff.
What I ran
Reviewed head
9a3778c35fdf9b70cdb73ab18d5d332c98142684against PR base5de1621ff13712e8b3a6d70a2487b008d9ee80c3; the merge preview is clean. Environment: Debian Linux x86_64, Python 3.11.2. No local build or C++ test was run.Results
5de1621ff13712e8b3a6d70a2487b008d9ee80c3.EVP_PKEY_get0_*functions.Unedited local check output
Sources
Not verified
I did not run a local build, the C++ test, Windows tests, or console behavior. The precheck could not run its test-quality helper because it is absent from the isolated PR checkout; the separate ABI audit completed successfully. The hosted Windows job was still in progress at the final status check; the author-reported WSL2 results were not independently reproduced.