feat(libSceLibreSsl): implement SSL_set_bio #23078
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/23078"
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 Callimann8 on 2026-11-18T17:40:11Z.
What
Implements
SSL_set_bioin libSceLibreSsl (libSceLibreSsl3 reaches it through its parent forwardrXHi08e0g80). The export was aNotImplementedstub.SSL_set_bio(SSL*, BIO* rbio, BIO* wbio)sits next toSSL_set_fdinsrc/SslLifecycle.cppand calls the existingSetBiohelper, which is the body of LibreSSL 2.5.4'sSSL_set_bio. It detaches a write buffering BIO, frees the old read chain when the read BIO changes and is not also the write BIO, and frees the old write chain when the write BIO changes.Api.hppdeclares the export with its real signature instead of(void).SSL_set_fd.docs/dev/debt/changes/feat-libressl-ssl-set-bio.md. Nothing is checked on a console; the 2.5.4 behaviour is kept, so replacing only the write side of a connection whose read and write BIO are the same frees a BIO that stays installed as the read side.Tested
Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release), homebrew test only, no title.
TestSetBioincore/libs/tests/GuestLibreSslSslLifecycle.cppuses the test's guest-heap tracker to check which BIOs are freed when the pair is set again to the same pair, to a new read and write pair, to a new read BIO with the same write BIO, to a single BIO, to null, and beforeSSL_set_fd; thelive.empty()check catches leaks and double frees.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)Summary by CodeRabbit
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-18T17:44:36Z.
Review: CHANGES_REQUESTED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
02e0ae61d1:tools/check_conventions.pyfailed.guest_libressl_ssl_lifecycle_testsbuilt cleanly.guest_libressl_ssl_lifecycle):Requesting changes for the points above.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-18T18:00:42Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
02e0ae61d1:tools/check_conventions.pypassed.guest_libressl_ssl_lifecycle_testsbuilt cleanly.guest_libressl_ssl_lifecycle):core/libs/prx/libSceLibreSsl/Export.cpp,core/libs/prx/libSceLibreSsl/include/Api.hpp,core/libs/prx/libSceLibreSsl/src/SslLifecycle.cppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-23T03:30:20Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the inspected implementation follows the existing BIO ownership helper, and the reviewed files support merging.
What I ran
Reviewed head
02e0ae61d11b967ef3cf19276b5fc4260394adae. No build or tests were run. I readcore/libs/prx/libSceLibreSsl/Export.cpp,core/libs/prx/libSceLibreSsl/include/Api.hpp,core/libs/prx/libSceLibreSsl/src/SslLifecycle.cpp,core/libs/tests/GuestLibreSslSslLifecycle.cpp, anddocs/dev/debt/changes/feat-libressl-ssl-set-bio.md. All five changed files are marked included in the manifest; no exclusions were reported there. The full source forSslLifecycle.cppandSslBio.cppwas read only in targeted ranges.Results
SetBiohelperFindings
Blocking
None.
Non-blocking
None.
Not verified
I did not run the reported
guest_libressl_ssl_lifecycletest or a build, and did not verify console behavior. The reported test result is from the PR description, not a run performed during this review. The manifest lists five changed files, all included; the targeted repository reads covered the changed implementation and test code, whileSslBio.cppwas inspected to confirm the existing chain-freeing behavior.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-30T06:40:09Z.
Review: COMMENTED
Architecture findings (1)
Advisory architecture findings (1)
81a792ba-30d5-4059-a227-a0007213cf4fReviewing files that changed from the base of the PR and between
63ee1c120aand8a8ab0af89.core/libs/prx/libSceLibreSsl/Export.cppcore/libs/prx/libSceLibreSsl/include/Api.hppcore/libs/prx/libSceLibreSsl/src/SslLifecycle.cppcore/libs/tests/GuestLibreSslSslLifecycle.cppdocs/dev/debt/changes/feat-libressl-ssl-set-bio.mdIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-30T06:52:56Z.
Review: APPROVED
Reviewed — looks good
Nothing in the reviewed code blocks merging; the added implementation and lifecycle tests support the documented behavior.
What I ran
Reviewed head
8a8ab0af89cb20e1426c87fcda8c6850fe165686. I inspected the prepared diff and the full text of every changed file. I did not run the author-reported test command.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The reported
ctest -R guest_libressl_ssl_lifecyclerun was not performed during this review. Console behavior was not checked. No changed files were excluded; all files listed as reviewed in the manifest were read.To get this to a good state
Nothing is required.