feat(libSceLibreSsl3): implement PEM_read_RSAPrivateKey #23155
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/23155"
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 MarrasFederico on 2026-11-18T19:28:27Z.
What
Implement the native libSceLibreSsl3
PEM_read_RSAPrivateKeyexport (psMmvmdPKds). Wrap the guest FILE in a non-closing BIO, use the native PEM decoder, and retain the RSA key independently of the temporary EVP_PKEY. Replace an existing output only after successful RSA decoding. Traditional and PKCS#8 unencrypted RSA keys are covered. Encrypted and DSA inputs retain the existing unsupported paths.The test covers native reference ownership, replacement and preservation on error, the error queue for malformed and non-RSA inputs, and the caller's ability to continue reading and close the guest FILE. Each fixture uses its own directory.
Source: LibreSSL 4.0.0 pem_all.c. #22476 concerns the parent libSceLibreSsl implementation. #23029 removes adjacent SSL_CTX stubs and #16654 shares the pending-export count. If either lands first, preserve both implementations and recount the remaining stubs.
Tested
guest_libressl3_pem_keyspassed three consecutive runs per host atb3a492fe3e6163dd715ab68095396219d87800b3.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 PrivacyOnion on 2026-11-18T19:43:49Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
b3a492fe3e:tools/check_conventions.pypassed.guest_libressl3_pem_keys_testsbuilt cleanly.guest_libressl3_pem_keys):core/libs/prx/libSceLibreSsl3/Export.cpp,core/libs/prx/libSceLibreSsl3/include/Api.hpp,core/libs/prx/libSceLibreSsl3/src/PemKeys.cppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me