feat(libSceLibreSsl3): implement SSL_set_quic_transport_params #16981
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/16981"
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 GalaxyGamingFR on 2026-11-08T03:57:53Z.
What
Implement
SSL_set_quic_transport_paramsinlibSceLibreSsl3, replacing its parameterless throwing placeholder inAdditionalExports.cpp.ce488b78ssl_lib.c, the revision the library's debt file already uses. As upstream does, it zeroes and frees the previousquic_transport_params(freezero), clears both fields, copies the new parameters into a freshmallocbuffer and stores them with their length, returning 1. A failed allocation returns 0 with the fields cleared.LibreSsl3Ssl, the layout #16979 extends to 320 bytes, so this PR depends on #16979. It does not depend on #16980.Api.hppnow declares it asint SSL_set_quic_transport_params(LibreSsl3Ssl* ssl, const std::uint8_t* params, std::size_t paramsLength), matching upstream.malloc_nid_postfixandfree_nid_postfix, asAsn1Values.cppalready does. An empty list callsmalloc(0)like upstream, so its result depends on libc.std::invalid_argumentwithout changing the SSL, where upstream would dereference them.The gap is recorded in
docs/dev/debt/libSceLibreSsl3.md: no QUIC handshake runs here, so the parameters are never sent, an SSL whose parameters came from another allocator cannot be passed, and the console layout is not measured. The export inventory is updated (137 exports, 127 named).No title's trace or disassembly was used, and the export was not measured on a PS5.
Tested
Windows 11, WinLibs GCC 15.2.0 UCRT. This is not a full CMake build. I compiled
tests/GuestLibreSsl3Ssl.cppwith libSceLibreSsl3'sSsl.cpp,Key.cpp,X509.cpp,Asn1Values.cppandIntegerDecoder.cppand libSceLibreSsl'sError.cppinto one executable, withAPS5_VABIdefined empty, a one-lineNotImplementedAt_nid_no_patchthat throws, andmalloc/calloc/freeshims over the C runtime. No title or homebrew, and not built on Linux or macOS.CheckQuicTransportParamsfills a guarded SSL with0x5A(parameter pointer null) and checks that a 6-byte list, then a 4-byte replacement, each return 1 and change only the 16 bytes at offsets 280 and 288, which then hold a new buffer with the same bytes. It then checks that null parameters with a length, and a null SSL, throw, the first without changing the SSL. The zeroing beforefreeis not observable through the test's allocator shim, so it is not tested.-Wall -Wextrais clean for the changed files, andpython tools/check_conventions.py --base origin/mainpasses.I searched open and merged pull requests for
quic_transport_paramsjust before opening this one, and none implements it. #16586, #16588, #16589, #16848, #16918, #16977 and #16980 change the same export inventory count, so whichever lands later needs a one-line rebase.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
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T12:22:48Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the setter’s ownership and replacement behavior are consistent with the stated LibreSSL implementation.
What I ran
Reviewed head
858a6e5c739eace343ec09084301bbcf7fe5d433using the prepared diff and pinned source reader (repo_read.py). No commands or tests were run by me; the description reports a targeted Windows test and convention check.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The author’s reported test output and convention check were not independently reproduced. Console layout and allocator interoperability, QUIC handshake behavior, and the zero-before-free behavior were not verified. All six changed files listed in the manifest were read; no files were excluded in the manifest.
To get this to a good state
Nothing is required.
Pull request closed