feat(libSceLibreSsl3): return from four calls as firmware 13.42 does #15591
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15591"
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 BunnyFl on 2026-11-03T20:53:01Z.
What
Four libSceLibreSsl3 exports threw. In firmware 13.42 each one returns at once, reading none of its arguments, and this change does the same:
SSL_CTX_set_max_early_data8kct4CSWwOAint (SSL_CTX*, uint32_t),ssl.h:12801SSL_CTX_set_post_handshake_authwHdymWL7CbEvoid (SSL_CTX*, int),ssl.h:722SSL_process_quic_post_handshakeaKGUCnoiE+kint (SSL*),ssl.h:17361SSL_set_quic_use_legacy_codepointCFRaBB2+R+svoid (SSL*, int),ssl.h:1764The prototypes are from libressl/openbsd
ad3418a862e15ac14ce89ecb3e1989ab9e8739aa:libssl/ssl.h, at the lines given.SSL_CTXandSSLare passed asvoid*, and the declarations incore/libs/prx/libSceLibreSsl3/include/Api.hppchange with them.In
docs/dev/debt/libSceLibreSsl3.md, the "Additional exports" entry goes from the 105 throwing declarations ofmain07ae6afceeto 101 (92 named, 9 known only by NID), and the four rows leave its table.This PR first also covered
ERR_load_PEM_strings,ERR_load_X509_stringsandOpenSSL_add_all_digests. #17246 implements those three the same way (a loneretin firmware 13.42), and it was agreed there that #17246 goes first, so this PR leaves them to it (comment).Source
Firmware 13.42
system/common/lib/libSceLibreSsl3.sprx(sha256ee2c529c87fe21b7ef1e5f13d10c47ee90944f52a1f848fe0995e031817c2c3a), read from disassembly, not run on a console. Each body, to its return:No argument is read and nothing is written; the
retonly returns to the caller. A null or invalid pointer is never dereferenced, here or in firmware.Tested
Merged
main07ae6afceeinto the branch; the head is nowb84a360e41. The debt file conflicted in two places this time: the "Additional exports" count, and one table row.main's #15544 implementedX509_STORE_CTX_get0_paramand removed its row, right next to theSSL_CTX_set_max_early_datarow this branch removes, and each side of the conflict still carried the row the other had removed. Neither row is kept: a conflicted row stays only when its export still has a throwing stub in the mergedAdditionalExports.cpp, and neither does. The count is derived from the merged tree, not taken from either side:AdditionalExports.cppholds 101NotImplemented_nid_no_patchstubs and the debt table has 101 rows, 92 named and 9 known only by NID. This branch's side had 102 (93 named) andmain07ae6afceehas 105 (96 named); both of those matched their own trees by the same two counts.b84a360e41: 47 of 47 pass, none Not Run (100% tests passed, 0 tests failed out of 47), with the test executables behind them rebuilt at this head and thelibSceLibreSsl3target built. The set is the 46 tests listed under the previous head below plusguest_libressl3_x509_store_context, whichmainregistered in between.tools/check_conventions.py --base upstream/mainon the committed headb84a360e41: all checks pass.review-tools/sig_users.py HEAD --buildat this head: the four changed declarations are named in 3 files, none outside this branch's own changes, and both targets that name them (guest_libressl3_noop_returns_tests,libSceLibreSsl3) build.tools/pr_overlap.py --branch feat/libressl3-trivial-returns --jobs 8at this head, against 1,993 open pull requests: 61 share a file with the branch, and it lists no shared export or new file. Of the ones it could compare, one has a conflicting line: #17544, oncore/libs/prx/libSceLibreSsl3/CMakeLists.txtline 121 in the comparison base07ae6afcee. The run failed closed (exit 2) on 37 pull requests that conflict withmainthemselves and compared none of them. All 37 were then checked by hand at this head: every added and removed line of each diff searched for the four export names, their_nid_postfixspellings and the NIDs8kct4CSWwOA,CFRaBB2+R+s,aKGUCnoiE+kandwHdymWL7CbE. None of the 37 names any of them, and every diff was served (none unfetchable).Merged
main4a467be387into the branch; the head is now285e5e7659. Only the "Additional exports" count conflicted. The count is derived from the merged tree, not taken from either side:AdditionalExports.cppholds 102NotImplemented_nid_no_patchstubs and the debt table has 102 rows, 93 named and 9 known only by NID. This branch's side had 107 (98 named) andmain4a467be387has 106 (97 named).285e5e7659: 46 of 46 pass, none Not Run (100% tests passed, 0 tests failed out of 46), with the 44 test executables behind them rebuilt at this head and thelibSceLibreSsl3target built:guest_crypto_memcmp,guest_libressl3_aes,guest_libressl3_aes_ccm,guest_libressl3_asn1,guest_libressl3_asn1_object,guest_libressl3_asn1_string,guest_libressl3_asn1_values,guest_libressl3_bignum_divide,guest_libressl3_bio_fields,guest_libressl3_bio_method,guest_libressl3_chacha,guest_libressl3_cipher,guest_libressl3_digest,guest_libressl3_digest_context,guest_libressl3_digest_names,guest_libressl3_ecdsa_sig,guest_libressl3_ecdsa_sig_lifetime,guest_libressl3_evp,guest_libressl3_hmac_context,guest_libressl3_init_ssl,guest_libressl3_key_components,guest_libressl3_key_reference,guest_libressl3_libtls,guest_libressl3_libtls_settings,guest_libressl3_noop_returns,guest_libressl3_obj_cmp,guest_libressl3_pkey_bits,guest_libressl3_pkey_getters,guest_libressl3_pkey_queries,guest_libressl3_rsa_getters,guest_libressl3_rsa_setters,guest_libressl3_session_metadata,guest_libressl3_signature_algorithms,guest_libressl3_ssl,guest_libressl3_stack,guest_libressl3_time,guest_libressl3_time_new,guest_libressl3_tls_protocols,guest_libressl3_version,guest_libressl3_x509_accessors,guest_libressl3_x509_algor,guest_libressl3_x509_extensions,guest_libressl3_x509_pubkey_param,guest_libressl3_x509_validity,guest_libressl3_x509_verify_paramandpublic_headers.tools/check_conventions.py --base upstream/mainon the committed head285e5e7659: all checks pass.review-tools/sig_users.py HEAD --buildat this head: the four changed declarations are named in 3 files, none outside this branch's own changes, and both targets that name them (guest_libressl3_noop_returns_tests,libSceLibreSsl3) build.tools/pr_overlap.py --branch feat/libressl3-trivial-returns --jobs 8at this head, against 1,938 open pull requests: 63 share a file with the branch, none shares an export or a new file. 20 have conflicting lines, 16 of them only on the "Additional exports" count line (docs/dev/debt/libSceLibreSsl3.mdline 82 in the comparison base4a467be387); #15831 also conflicts oninclude/Api.hpplines 388-389 and two debt lines, #16689 and #17147 on a second debt line, and #17544 onCMakeLists.txtline 120. The run failed closed (exit 2) on 32 pull requests that conflict withmainthemselves and compared none of them. All 32 were then checked by hand at this head: every added and removed line of each diff searched for the four export names, their_nid_postfixspellings and the NIDs8kct4CSWwOA,CFRaBB2+R+s,aKGUCnoiE+kandwHdymWL7CbE. None of the 32 names any of them, and every diff was served (none unfetchable).Head
925b6e1c71:4bffabf177gives the three loaders back tomain's state (throwing placeholders,intdeclarations, their debt-table rows, no calls in the test), and thenmain4cf30166abis merged in.mainhad implementedEVP_PKEY_get0_EC_KEY; only the "Additional exports" count conflicted. Counted from the mergedAdditionalExports.cpp: 113 throw, 9 of them NID-only, and the debt table has 113 rows; every named row is a throwing body there and every throwing named body has a row.925b6e1c71, Windows 11 Pro 10.0.26300, WinLibs GCC, Release: 40 of 40 pass, none Not Run (theguest_libressl3_*tests,guest_crypto_memcmpandlibressl3_import_binding), with all 40 test executables rebuilt.925b6e1c71:NotImplemented_nid_no_patch(__func__)put back at the top of the four bodies, which ismain's behaviour, with this branch's signatures and test kept:guest_libressl3_noop_returnsaborts withSSL_CTX_set_max_early_data_nid_postfix not implemented(0 of 1 pass). The file was restored from the commit afterwards.tools/check_conventions.py --base upstream/mainon the committed head925b6e1c71: all checks pass.review-tools/sig_users.py HEAD --buildlists the four changed declarations; both targets that name them build.tools/pr_overlap.py --branch feat/libressl3-trivial-returns --jobs 8at925b6e1c71, against 1,851 open pull requests: no pull request shares an export or a new file, #17246 included. 16 have conflicting lines, almost all on the "Additional exports" count line. The run failed closed (exit 2) on 38 pull requests that conflict withmain; I grepped the added and removed lines of each one's diff for the four names and NIDs, and none names any of them (#12315's libSceLibreSsl3 patches through the pull request files API, its files).On 2026-11-07 adriadam10 rebased the branch onto
mainas the single commit42667abb96; on that commit the test istests/NoopReturns.cpp(guest_libressl3_noop_returns). Bullets below that nameTrivialReturns.cpporguest_libressl3_trivial_returnsdescribe heads from before that rebase, which are no longer on the branch.Merged
maincdf371df68into the branch; the head is now785e8b4da1.mainhad implemented the fourteen libtls exports insrc/LibTls.cppand removed their placeholders, declarations and debt rows; some of those sat next to this branch's lines ininclude/Api.hppand the debt table, so the merge conflicted there.main's removals and this branch's typed declarations are both kept. The count is taken from the mergedAdditionalExports.cpp: 139 definitions still throw, 10 of them theUnknown_*NID-only ones, and the debt table has 139 rows (146 onmain).785e8b4da1, Windows 11 Pro 10.0.26300, WinLibs GCC, Release: 94 of 94 pass, none Not Run, with the test executables rebuilt: the 29guest_libressl3_*tests registered at this head (mainadded three),public_headersand the 64public_headers_compile_*batches.mainare the same as ata947ec47beapart from the count line, so the negative control below was not repeated.tools/check_conventions.py --base upstream/mainon the committed head785e8b4da1: all checks pass.Merged
main56374036adinto the branch; the head is nowa947ec47be. It conflicted in two places, both neighbours:mainregistered itsguest_libressl3_digest_namestest incore/libs/prx/libSceLibreSsl3/CMakeLists.txtwhere this branch registersguest_libressl3_trivial_returns(both are kept), and implementedEVP_get_digestbyname, lowering the "Additional exports" count to 163 / 153. The merged number is counted from the mergedAdditionalExports.cpp: 156 definitions still throw, 10 of them theUnknown_*NID-only ones, and the debt table has 156 rows.a947ec47be, Windows 11 Pro 10.0.26300, WinLibs GCC, Release: 91 of 91 pass, none Not Run, with the test executables rebuilt: the 26guest_libressl3_*tests registered at this head (now includingdigest_names),public_headersand the 64public_headers_compile_*batches.mainare the same as atf17a90a144apart from the count line, so the negative control below was not repeated.tools/check_conventions.py --base upstream/mainon the committed heada947ec47be: all checks pass.Windows 11 Pro 10.0.26300, WinLibs GCC, Release, head
f17a90a144(mainb96af01bebmerged in): 90 of 90 pass, none Not Run, with the 24 test executables built at this head. That is the 25guest_libressl3_*tests registered at this head,public_headersand the 64public_headers_compile_*batches.New
core/libs/prx/libSceLibreSsl3/tests/TrivialReturns.cpp:SSL_CTX_set_max_early_dataalso with a null context.SSL_CTXandSSLbuffers passed in are unchanged.Negative control at this head: I put
NotImplemented_nid_no_patch(__func__)back at the top of the seven bodies, which ismain's behaviour, and kept this branch's signatures and test. The new test then aborts withERR_load_PEM_strings_nid_postfix not implemented(1 of 1 failed).tools/check_conventions.py --base upstream/mainon the committed headf17a90a144: all checks pass.The merge of
mainb96af01bebconflicted wheremainhad implementedtls_config_parse_protocols, next to this branch'sSSL_CTX_set_post_handshake_auth: its placeholder and its row in the debt table go, andmain's typed declaration is kept. Both sides had set the "Additional exports" count to the same 164 / 154, so that line merged without a conflict but was wrong for the merged tree; it is recounted from the mergedAdditionalExports.cpp: 157 of its 164APS5_VABIdefinitions throw, 10 of them theUnknown_*NID-only ones, and the debt table has 157 rows. The same count gives 164 onmainand at this branch's previous head57d082850e, and 171 at their merge base87448b3c91, which is what each of those trees states.Merged
mainee63f5e8d5into the branch; the head is now2e7f38a22b. This one conflicted in three files, and only the debt file was a count:mainimplementedX509_gmtime_adjinsrc/TimeNew.cppand deleted its stub fromAdditionalExports.cpp, directly beside this branch'sSSL_process_quic_post_handshakeimplementation, and typed its declaration ininclude/Api.hppbeside this branch's. The resolution takesmain's deletion and its typed declaration and keeps this branch's implementation and declaration; the two changes are independent and git only saw adjacent lines.X509_gmtime_adj's row (it does not implement it) andmain's side keptSSL_process_quic_post_handshake's (it does not implement that), while in the merged tree both exports are implemented. Each row was decided from the mergedAdditionalExports.cpp- is it still a parameterless throwing stub? - not from either side.NotImplemented_nid_no_patchdeclarations inAdditionalExports.cppand 107 table rows, 98 named and 9 known only by NID. This branch's side said 109 andmain's said 111; onmainee63f5e8d5both rules give 111.2e7f38a22b, Windows 11 Pro 10.0.26300, WinLibs GCC, Release: 44 of 44 pass, none Not Run (100% tests passed, 0 tests failed out of 44), with the test executables rebuilt at this head andlibSceLibreSsl3built.public_headersruns the Python checker and builds nothing of its own.guest_libressl3_mixed_evpis registered on Linux only and did not run.tools/check_conventions.py --base upstream/mainon the committed head2e7f38a22b: all checks pass.review-tools/sig_users.py HEAD --build: the four changed declarations are named in 3 files, none outside this branch's own changes; both targets that name them (guest_libressl3_noop_returns_tests,libSceLibreSsl3) build.tools/pr_overlap.py --branch feat/libressl3-trivial-returns --jobs 8at this head, against 1,942 open pull requests: 67 share files or exports with the branch. Seven of the ones it could compare have a conflicting line: #17243, #17246, #17249, #17250 and #17528 on the inventory count sentence only, #16689 on that sentence and a second debt line, and #17147 on that second line. The run failed closed (exit 2) on 44 pull requests that conflict withmainthemselves and compared none of them. All 44 were then checked by hand at this head: every added and removed line of each diff searched for the four export names, their_nid_postfixspellings and the NIDs8kct4CSWwOA,CFRaBB2+R+s,aKGUCnoiE+kandwHdymWL7CbE. None appears in any of them. #12315 is refused whole by GitHub (over 300 files), so it was read through the per-file patches API: 1,050 files listed, a patch served for 1,044 of them, clean; the remaining six serve no patch (binary or oversized).Merged
main0dd2fffe35into the branch; the head is nowac05ce7365. Only the "Additional exports" count line conflicted again, and the count is derived from the merged tree rather than taken from either side, which matters here: this branch's side of the conflict said 110 andmain's said 113, while the merged answer is 109.mainhad removedSSL_CTX_set_timeout's row, this branch removes four others, and both removals apply. Two rules agree on the merged tree:core/libs/prx/libSceLibreSsl3/AdditionalExports.cppholds 109NotImplemented_nid_no_patchdeclarations, and the inventory table has 109 rows, 100 named and 9 known only by NID (unknown). Onmain0dd2fffe35both give 113 (104 named).ac05ce7365, Windows 11 Pro 10.0.26300, WinLibs GCC, Release: 43 of 43 pass, none Not Run (100% tests passed, 0 tests failed out of 43), with the 41 test executables rebuilt at this head andlibSceLibreSsl3built.public_headersruns the Python checker and builds nothing of its own.guest_libressl3_mixed_evpis registered on Linux only and did not run.review-tools/sig_users.py HEAD --build: the four changed declarations are named in 3 files, none outside this branch's own changes; both targets that name them (guest_libressl3_noop_returns_tests,libSceLibreSsl3) build.tools/check_conventions.py --base upstream/mainon the committed headac05ce7365: all checks pass.tools/pr_overlap.py --branch feat/libressl3-trivial-returns --jobs 8at this head, against 1,947 open pull requests: 70 share files or exports with the branch. 15 have conflicting lines. Twelve of those conflict only on the "Additional exports" count line, line 79 ofdocs/dev/debt/libSceLibreSsl3.mdin the comparison base (#17124, #17235, #17236, #17237, #17238, #17239, #17240, #17241, #17243, #17246, #17249, #17250); whichever lands later recounts it. The other three reach further: #15831 and #17242 also oninclude/Api.hppand an inventory row, #17147 on a second debt line. #17246 appears on the count line only, on no export: this PR left its three exports to it at4bffabf177. The run failed closed (exit 2) on 34 pull requests that conflict withmainthemselves; those were not compared line by line and their diffs were not re-searched at this head: for those 34, overlap is not verified.Merged
main8e34d2642dinto the branch; the head is nowf3390daac0. Only the "Additional exports" count line conflicted. Counted from the mergedAdditionalExports.cpp: 110NotImplemented_nid_no_patchdeclarations, 101 named and 9 known only by NID (unknownin the table), against 114 onmain, 113 at this branch's previous head and 117 at the merge base, which is what each states. The merged inventory table (docs/dev/debt/libSceLibreSsl3.md:82to:191at this head) has 110 rows, 101 named and 9unknown, so the table and the count line (docs/dev/debt/libSceLibreSsl3.md:78) agree.git merge-treeagainstupstream/mainis clean.f3390daac0, Windows 11 Pro 10.0.26300, WinLibs GCC, Release: 43 of 43 pass, none Not Run (100% tests passed, 0 tests failed out of 43). That is theguest_libressl3_*tests registered at this head,guest_crypto_memcmpandpublic_headers, with all 41 test executables rebuilt;libSceLibreSsl3builds.guest_libressl3_mixed_evpis registered on Linux only and did not run.review-tools/sig_users.py HEAD --build: the four changed declarations are named in 3 files, none outside this branch's own changes; both targets that name them (guest_libressl3_noop_returns_tests,libSceLibreSsl3) build.tools/check_conventions.py --base upstream/mainon the committed headf3390daac0: all checks pass.tools/pr_overlap.py --branch feat/libressl3-trivial-returns --jobs 8at this head, against 1,977 open pull requests: no pull request shares an export or a new file. 14 have conflicting lines, 12 of them only on the "Additional exports" count line; #17622 also conflicts oninclude/Api.hppand two inventory rows, and #16689 on two debt lines further down. #17246 does not appear at all, so nothing is shared with it any more. The run failed closed (exit 2) on 40 pull requests that conflict withmainthemselves; I grepped the added and removed lines of 39 of those diffs for the four names and the four NIDs with no hits. #12315's diff is not servable (HTTP 406, over 300 files), so I grepped the patches of its ten libSceLibreSsl3 files instead:SSL_CTX_set_post_handshake_auth_nid_postfixappears there only as an unchanged context line in aninclude/Api.hpphunk that changesASN1_TIME_diff_nid_postfixtwo lines below it, so it shares no export with this branch.Merged
main87473937d3into the branch; the head is now98724d9750. Only the "Additional exports" count conflicted. Counted from the mergedAdditionalExports.cpp: 132 of its 139APS5_VABIdefinitions throw, 10 of them theUnknown_*NID-only ones, and the debt table has 132 rows (139 and 139 onmain).ctest -R '^guest_libressl3': 33 of 33 passed;sig_users.py HEAD --build: the seven changed declarations are named only in this branch's files.tools/pr_overlap.py --branch feat/libressl3-trivial-returns --jobs 8at this head, against 1,869 open pull requests: 43 share files or exports with the branch, and the run failed closed. It lists 10 with line conflicts and 32 more in its "Some comparisons could not be completed" table, which it does not compare line by line. The line conflicts are thedocs/dev/debt/libSceLibreSsl3.mdcount on line 57 (#14612, #15289, #15303, #15826, #15831, #15854, #16249, #16255, #16258), debt table rows andinclude/Api.hpplines next to this branch's (#15289, #15303, #15831), andCMakeLists.txtline 28 (#15449, #16258). I searched the added and removed lines of all 42 listed pull requests for the seven names and the seven NIDs: GitHub's diff for 41 of them, and for #12315, whose whole diff is too large for GitHub to serve, its per-file patches of the LibreSsl3 files. None of them names any of the seven.Merged
mainf35f1e5ecainto the branch; the head is now6a8c9bd042. Two places conflicted. Incore/libs/prx/libSceLibreSsl3/include/Api.hpp,mainf35f1e5ecahad implementedASN1_TYPE_free(declared atcore/libs/prx/libSceLibreSsl3/include/Api.hpp:144, defined insrc/EcdsaSig.cpp), so its placeholder declaration next to this branch'sSSL_CTX_set_post_handshake_authgoes and this branch's typed declaration is kept. Indocs/dev/debt/libSceLibreSsl3.md, the "Additional exports" count:mainstates 118 (109 named, 9 NID-only), which matches itsAdditionalExports.cpp(118NotImplemented_nid_no_patchcalls, 9 of themUnknown_*). Counted from the mergedAdditionalExports.cpp: 111 throw, 9 of them NID-only, and the debt table has 111 rows (9unknown); every named row is a throwing body there and every throwing named body has a row.6a8c9bd042, Windows 11 Pro 10.0.26300, WinLibs GCC, Release: 40 of 40 pass, none Not Run (theguest_libressl3_*tests,guest_crypto_memcmpandlibressl3_import_binding), with all 40 test executables rebuilt.tools/check_conventions.py --base upstream/mainon the committed head6a8c9bd042: all checks pass.review-tools/sig_users.py HEAD --buildlists the seven changed declarations; no file outside this branch's own changes names them, and both targets that do (guest_libressl3_noop_returns_tests,libSceLibreSsl3) build.tools/pr_overlap.py --branch feat/libressl3-trivial-returns --jobs 8at6a8c9bd042, against 1,825 open pull requests: 22 have conflicting lines. 16 conflict only on the "Additional exports" count line, which onmainf35f1e5ecaisdocs/dev/debt/libSceLibreSsl3.md:75; #15831, #16689, #17147, #17237 and #17242 also conflict on neighbouring lines inApi.hpp,AdditionalExports.cppor the debt table. #17246 implements three of the same exports (ERR_load_PEM_strings,ERR_load_X509_strings,OpenSSL_add_all_digests): it keeps the first two throwing and makes the third return. I asked its author on that PR to agree an order (comment). The run failed closed (exit 2) on 35 pull requests that conflict withmain; I grepped the added and removed lines of each one's diff for the seven names and NIDs, and none names any of them. For #12315 the diff request returns HTTP 406 (the diff exceeded the maximum number of files (300)), so I grepped the patches of its ten libSceLibreSsl3 files from the pull request files API instead (its files).The LibreSSL prototypes of this PR (seven before
4bffabf177, the four above now) were read at libressl/openbsd commitad3418a862e15ac14ce89ecb3e1989ab9e8739aaand each cited line holds the prototype named:pem.h:463ERR_load_PEM_strings(void),x509.h:940ERR_load_X509_strings(void),evp.h:744OpenSSL_add_all_digests(void),ssl.h:722SSL_CTX_set_post_handshake_auth(SSL_CTX *, int),ssl.h:1280SSL_CTX_set_max_early_data(SSL_CTX *, uint32_t),ssl.h:1736SSL_process_quic_post_handshake(SSL *)andssl.h:1764SSL_set_quic_use_legacy_codepoint(SSL *, int).Linux and macOS were not built or run. No title was run.
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)🤖 Generated with Claude Code