feat(libSceLibreSsl): reject null client CA certificates #16688
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/16688"
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-07T13:27:51Z.
Supersedes #16164, which GitHub closed when the head fork was deleted. The commits are unchanged; earlier review comments and Windows checks are on #16164.
What
Return zero for a null client CA certificate with a valid context/internal state, preserving context bytes and queued errors. Invalid context state throws where the source computes the field address; non-null certificate duplication and stack insertion remain unsupported.
Source and remaining gap: SSL_CTX_add_client_CA - not measured on a PS5; non-null certificates remain unsupported. The implementation follows LibreSSL 2.5.4 ssl_cert.c and returns 0 for a null certificate before touching the CA stack. Null contexts or internal state throw where that source computes the field address. A non-null certificate throws because certificate duplication and CA stack mutation are unsupported; real certificate duplication remains unimplemented.
python3 tools/pr_overlap.py --branch feat/libressl-ctx-null-client-ca --repo boykopovar/AnyPS5 --base main --jobs 2examined 1892 open PRs. Confirmed textual overlaps: none; the report contains no shared export. The command exited 2 because 57 older heads conflict with its base. I compared each reported head against its own merge base, including the original stub location: none changes or addsSSL_CTX_add_client_CA. Pairwise merge checks also report shared-file conflicts; these do not establish a functional dependency. Shared debt insertions may need textual reconciliation when merging the other pending-export PRs. Upstream now omits the unstable numeric total.Tested
Ubuntu 26.04.1 LTS x86-64, GCC 15.2.0, Release,
BUILD_TESTING=ON; tested main commitce694129c4ffaaafe7fe3621ac7e038aca7b79f7.guest_libressl_ssl_ctx_fields_testswithnice -n 19 cmake --build build --parallel 2 --target guest_libressl_ssl_ctx_fields_tests. Only one target was built at a time.ctest --test-dir build -R '^guest_libressl_ssl_ctx_fields$' --output-on-failurepasses with the new cases in the existing guest test.SSL_CTX_add_client_CA_nid_postfixwith the original throwing body. After rebuilding the same target, the test failed withSSL_CTX_add_client_CA_nid_postfix not implemented. Restoring the implementation, rebuilding and rerunning passes.python3 tools/check_conventions.py --base upstream/mainandgit diff --checkpass. No title, console or Windows run.After merging upstream main
04cdd527604d521845afc58f9374afb92ff85f76, rebuilt the same target with the same limits and reran the focused test: it passes. The feature code and test changes are identical to those used for the negative control above; only upstream updates and the debt inventory reconciliation were merged.After merging upstream main
151a2cb6e274f594a09c8a2ca42f44af2e5c40d8, rebuilt the same target with the same limits and reran the focused test: it passes. The feature code and test changes are identical to those used for the negative control above; only upstream updates and the debt inventory reconciliation were merged.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)Merge verification: updated against main
eed8517b310a55adbbb178df781d7d9ed2eeee7bwith a normal merge. Main and this PR are preserved independently; the implemented function bodies are unchanged. Builtguest_libressl_ssl_ctx_fields_testswithnice -n 19 cmake --build build --parallel 2 --target guest_libressl_ssl_ctx_fields_tests;ctest --test-dir build -R '^guest_libressl_ssl_ctx_fields$' --output-on-failurepasses. Conventions and the public-header audit pass. No console or Windows run.Imported from boykopovar/AnyPS5. Originally posted by gabichuuuuu on 2026-11-09T08:52:46Z.
Review: COMMENTED
Windows run of head
c0d4a6a1ed, merged ontomain286b14d2f7in one tree with 0 other small open PRs that touch different files. Setup: Windows 11, WinLibs GCC 15.2 r7 (x86_64-ucrt-posix-seh, the CI toolchain), Release,BUILD_TESTING=ON.guest_libressl_ssl_ctx_fieldswith--repeat until-fail:5: 5 / 5 pass.