Skip to content

feat(libSceLibreSsl3): implement the BIO data, init, shutdown and flag accessors - #15760

Merged
oneandonlydean merged 26 commits into
boykopovar:mainfrom
alvaroelpob:feat/libscelibressl3-bio-fields
Nov 8, 2026
Merged

oneandonlydean merged 26 commits into
boykopovar:mainfrom
alvaroelpob:feat/libscelibressl3-bio-fields

Conversation

@alvaroelpob

@alvaroelpob alvaroelpob commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

What

Implements BIO_get_data, BIO_set_data, BIO_set_init, BIO_get_shutdown, BIO_set_shutdown, BIO_set_flags and BIO_clear_flags in libSceLibreSsl3 as in LibreSSL 4.0.0 bio_lib.c, on the BIOs that the forwarded libSceLibreSsl BIO_new creates.

Tested

Linux x86-64 (WSL2), Release: the full build passes and ctest --test-dir build -j16 passes 3883 of 3883 tests at head 9c59c31, on main b11c7bf, which passes 3882 of 3882 on the same machine. The new guest_libressl3_bio_fields fails against main's throwing stubs. python3 tools/check_conventions.py --base upstream/main passes. Not run on a console or in a title.

Checklist

@JJenkx

JJenkx commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Windows check of head 9c59c31ba4, which already contains main b11c7bf84f.

Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release. The hosted Windows check does not run this test on pull requests.

  • guest_libressl3_bio_fields passes in 3 of 3 runs.

AI-assisted: yes.

@alvaroelpob alvaroelpob mentioned this pull request Nov 4, 2026
12 tasks done
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Progress report (f5fe807 → 09e83a9)

📈 System libraries: 32.87% (+0.02%, +7 implemented functions)

✅ 7 implemented
Library Name
libSceLibreSsl3 BIO_clear_flags_nid_postfix
libSceLibreSsl3 BIO_get_data_nid_postfix
libSceLibreSsl3 BIO_get_shutdown_nid_postfix
libSceLibreSsl3 BIO_set_data_nid_postfix
libSceLibreSsl3 BIO_set_flags_nid_postfix
libSceLibreSsl3 BIO_set_init_nid_postfix
libSceLibreSsl3 BIO_set_shutdown_nid_postfix

Changed libraries (implemented exports)

Library Before After Change
libSceLibreSsl3 92/284 (32.39%) 99/284 (34.86%) +2.46%

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 5, 2026
@alvaroelpob
alvaroelpob force-pushed the feat/libscelibressl3-bio-fields branch from 9c59c31 to 8b768af Compare November 5, 2026 19:36
@alvaroelpob

Copy link
Copy Markdown
Contributor Author

Rebased on main ce69412 to resolve the new conflicts. Head 8b768af. Full Linux suite: 4087/4087. check_conventions.py passes.

@alvaroelpob
alvaroelpob force-pushed the feat/libscelibressl3-bio-fields branch from 8b768af to be262c2 Compare November 6, 2026 09:40
@alvaroelpob

Copy link
Copy Markdown
Contributor Author

Rebased on main 018cfcb to resolve the new conflicts. Head be262c2. Fixes from the rebase, as new commits: be262c2 (style: drop the blank lines the rebase left behind); a4da357 (build(libSceLibreSsl3): list the new test before PROPERTIES in the shared Windows PATH entry); The build commit fixes a mistake from my previous rebase: the new test name had ended up after ENVIRONMENT_MODIFICATION in the shared Windows set_tests_properties, which made CMake configuration fail on Windows (the earlier Windows check failure). Full Linux suite: 4168/4168. check_conventions.py passes.

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 16529 BIO_clear_flags
BIO_get_data
BIO_get_shutdown
BIO_set_data
BIO_set_flags
BIO_set_init
BIO_set_shutdown
PR 16708 docs/dev/debt/libSceLibreSsl3.md L73

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 12315 core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 14212 docs/dev/debt/libSceLibreSsl3.md
PR 14499 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 15163 core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 15831 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 16249 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 16255 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 16529 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 16535 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 16543 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 16586 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 16588 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 16589 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 16654 core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 16689 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 16742 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 16819 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 16848 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 16918 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 16926 core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 16977 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 16979 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 16980 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 16981 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 16996 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 17067 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 17068 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 17124 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 17138 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 17147 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md

@alvaroelpob

Copy link
Copy Markdown
Contributor Author

Rebased on main ef9dc27 to resolve the conflicts. Head 8e9ba79. The rebase needed a follow-up commit: 8e9ba79 (style: drop the blank lines the rebase left behind). Full Linux suite: 4407/4407. check_conventions.py passes.

@alvaroelpob
alvaroelpob force-pushed the feat/libscelibressl3-bio-fields branch from be262c2 to 8e9ba79 Compare November 7, 2026 20:28
Keep both sides of the libSceLibreSsl3 CMake test registrations and debt bullets (BioFields from this branch, InitSsl from main). The debt doc keeps one Additional exports line, recounted from the code after this branch's seven removals: 132 callable exports, 122 named and 10 known only by NID, matching the 132 table rows. Drop the blank line that split the NID table.
@oneandonlydean

Copy link
Copy Markdown
Collaborator

Hi @alvaroelpob, thanks for this. Main moved on and conflicted with your branch in the libSceLibreSsl3 CMake file and debt doc, so I pushed b16edf4 to it: it merges current main into your branch, so you don't need to do anything.

  • Both files conflicted because the neighbouring changes added entries at the same spot (the BioFields and InitSsl test registrations, and the two debt bullets). I kept both. In the debt doc I also removed the blank line that was splitting the NID table and kept a single "Additional exports" line, recounted from the code after your seven removals: 132 callable exports, 122 named and 10 known only by NID.
  • No code changed beyond the merge.

On a gcc Linux build the 36 libressl3 tests pass, including guest_libressl3_bio_fields.

@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed needs rebase Conflicts with main, rebase needed labels Nov 7, 2026
Fix-up on alvaroelpob's change: resolve the libSceLibreSsl3 conflicts
with main. AdditionalExports.cpp, include/Api.hpp and the export table
drop both the BIO_set_shutdown stub (implemented here) and the
X509_ALGOR_get0 stub (implemented on main), keeping main's typed
X509_ALGOR_get0 declaration and this branch's typed BIO_set_shutdown
one. CMakeLists.txt keeps main's BignumDivide, Aes and X509Algor
sources and tests next to BioFields, and the Windows PATH entry lists
all of them. The debt doc keeps both the BIO and BN_div entries and
states the export inventory from the merged AdditionalExports.cpp:
125 entries, 116 named and 9 known only by NID.
@oneandonlydean

Copy link
Copy Markdown
Collaborator

Hi @alvaroelpob,

A follow-up to the merge from yesterday: main moved again (the BignumDivide, Aes and X509Algor changes landed), so we added one more merge commit of current main on your branch, 09e83a9 (a plain merge commit, no force-push). You don't need to do anything.

  • One overlap touched code: your branch removed the BIO_set_shutdown stub while main removed the X509_ALGOR_get0 stub at the same spot. Both functions are implemented now, so both stubs and both debt-table rows are gone, and each keeps a single typed declaration in Api.hpp.
  • CMakeLists.txt keeps main's BignumDivide, Aes and X509Algor sources and tests next to your BioFields source and guest_libressl3_bio_fields test, and the Windows PATH list names all of them.
  • The Additional exports line was recounted on the merged tree: 125 = 116 named and 9 known only by NID, and the table has 125 rows.

Your code is unchanged, and the LibreSsl3 tests pass on the merged tree (41/41).

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 8, 2026
@oneandonlydean
oneandonlydean merged commit fd5a364 into boykopovar:main Nov 8, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants