feat(libSceLibreSsl3): implement BIO_up_ref #12945

Merged
EagleBearerYS merged 10 commits from upstream-pr/12945 into main 2026-11-06 09:38:42 +00:00
EagleBearerYS commented 2026-10-29 15:42:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-29T15:42:31Z.


What

BIO_up_ref in libSceLibreSsl3 was a bare stub. It now does what LibreSSL 4.0.0 does (bio_lib.c L198-L202): it raises the BIO's references by one and returns 1 when the new count is above 1, as CRYPTO_add(&bio->references, 1, CRYPTO_LOCK_BIO) > 1 does.

  • Built on #12754, which implements the SSL, SSL_SESSION and X509 retains on the same base (#12578) and merged on 11-06 at 07:12Z. This PR uses its Retain_nid_no_patch in include/Reference.hpp as it is.
  • The layout: the 112-byte guest LibreSsl3Bio, with references at offset 80, from LibreSSL 4.0.0's bio_local.h (struct bio_st, LP64). static_asserts hold the size and the offset.
  • Recorded differences, in the debt entry:
    • the console layout is unmeasured;
    • a null BIO, and a count at INT32_MAX, throw without changing memory, where LibreSSL dereferences or overflows.
  • Debt: the pending count goes from 73 to 72 named exports.
  • No title: BIO_up_ref doesn't appear in an issue or discussion.

Overlap: #12580 and #12582 (PrivacyOnion), which also appended their retains and test cases after SSL_CTX_up_ref, were closed unmerged on 2026-10-31.

  • #10452 (alvaroelpob, merged) gave ASN1_STRING_get0_data its signature in Export.cpp and Api.hpp, on the line next to this PR's BIO_up_ref. The clash was textual only, and the merge of main 1ee57e1953 keeps both.
  • The other pull requests the overlap comment listed conflicted with #12754's commits, which this branch carried until #12754 merged. #9970, #10461, #10490, #10491, #10493, #10557, #10631, #10960 and #12369 have merged since, and this branch includes them through its merges of main. #12315 is still open.

Tested

  • guest_libressl3_key_reference gains a bio case. It sits with the CheckKey cases (EVP_PKEY, EC_KEY, SSL_CTX) in GuestLibreSsl3KeyReference.cpp, since BIO_up_ref sits with their retains in src/Key.cpp; #12754's CheckRetain cases are in GuestLibreSsl3Ssl.cpp. It covers:

    • initial counts -2, 0, 1, 37 and INT32_MAX - 1, with the result;
    • 16 guard bytes on each side, and the rest of the struct unchanged;
    • 32 repeated retains;
    • 4 threads × 1,000 concurrent retains, ending at exactly 4,001.

    No case asserts a throw.

  • Red: with the body put back to main's NotImplemented_nid_no_patch (the signature kept), the bio case aborts with BIO_up_ref_nid_postfix not implemented. The other cases still pass.

  • Green, Linux (Ubuntu 24.04, GCC 13.3, Release, CI's flags):

    • ctest -R "libressl3|crypto_memcmp" --repeat until-fail:10: 5 tests, 10 of 10 each, 0 skipped;
    • ctest -R "libressl|crypto_memcmp" once: 34 tests, 34 passed, 0 skipped.
  • Checks: check_conventions.py and check_test_registration.py pass. MinGW-w64 -fsyntax-only -Wall -Wextra: no errors or warnings.

  • GitHub, ×10 on both runners (run 40895956237), compared against #12754's head: guest_libressl3_key_reference passed 10 of 10 on Linux and on Windows, 0 skipped.

    • The libc and libkernel suites, run with APS5_SKIP_TIMING_TESTS=1, pass: 171 and 291 tests on Linux, 199 and 314 on Windows.
    • On the runners, the base's code doesn't build the new case, because its stub takes no parameters. The red above was taken with the real signature kept and only the body put back.
  • 82c0aa626f: this PR's one commit on #12754's 34728c573e, because #12754 was rewritten onto main 474030e584. The commit is 219770ad1e cherry-picked, with the same message and author.

    • The one change: the pending-exports line in docs/dev/debt/libSceLibreSsl3.md now says 71, against #12754's 72. That's #12754's new line with BIO_up_ref added to the list, and it already names main's RSA_up_ref.
      • The count is the APS5_VABI definitions in Export.cpp whose body still calls NotImplemented_nid_no_patch.
      • That gives 72 at 34728c573e and 71 here.
    • Everything else is unchanged: this PR's own lines are the same as on 219770ad1e, and the BIO_up_ref bullet is unchanged.
    • Red (cloud Linux): with BIO_up_ref put back as a pending stub, only the bio case of guest_libressl3_key_reference fails, with BIO_up_ref_nid_postfix not implemented.
    • ×10 on GitHub's runners (run), every ^guest_libressl3 test:
      • Linux: 7 run, 7 pass, 0 skip, 0 fail.
      • Windows: 7 run, 7 pass, 0 skip, 0 fail.
      • The libc and libkernel suites run 199 and 308 tests on Linux and 226 and 330 on Windows, with 0 failed. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • 272efa5452, a merge of main a043b048db, which brings gazaret's #13897 (EVP_PKEY_get0_RSA, _DSA and _DH) (run).

    • The conflicts were both in docs/dev/debt/libSceLibreSsl3.md, and both keep both sides: #13897's EVP_PKEY_get0 entry, then this branch's entries, #12754's and this PR's.
    • The pending-exports count is recounted on the merged tree as 68, the NotImplemented_nid_no_patch calls left in the merged Export.cpp: 80 at the base, less main's 3 and the stack's 9. Its list names both sides' implemented exports, main's first.
    • This also resolves #12754's own conflict with main, which is in the same file, on this branch. #12754 itself is unchanged.
    • ×10: every ^guest_libressl3 test. Linux: 9 run, 9 pass, 0 skip, 0 fail. Windows: 9 run, 9 pass, 0 skip, 0 fail. The libc and libkernel suites run 206 and 308 tests on Linux and 233 and 330 on Windows, with 0 failed. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
    • It merges cleanly with main 5c9837bfe7, where the count is still 68.
  • e44bf06eab, a merge of main b28bb77217 (run), which brings Froraut's #9970 (OpenSSL_version) and Felipebmaitan's #9535 (numeric ERR formatting, with ERR_load_crypto_strings and ERR_peek_last_error in this module).

    • Two conflicting files, both resolved by keeping both sides:
      • CMakeLists.txt: #9970's guest_libressl3_version joins this PR's guest_libressl3_ssl on the set_tests_properties line;
      • docs/dev/debt/libSceLibreSsl3.md: the pending-exports line lists #9970's OpenSSL_version among the exclusions, with this PR's.
    • The count is 65, the NotImplemented_nid_no_patch calls left in the merged Export.cpp. main's line reads 76, 2 more than the 74 calls left in its own Export.cpp, since #9535's ERR_load_crypto_strings and ERR_peek_last_error are no longer stubs.
    • This PR's other changed lines over main are the same, and it merges cleanly with main a4eca2a056.
    • ×10: the ^guest_libressl tests, #9970's guest_libressl3_version among them, with guest_crypto_memcmp, guest_libressl3_key_reference, guest_libressl3_ssl and public_headers. Linux: 48 run, 48 pass, 0 skip, 0 fail. Windows: 48 run, 48 pass, 0 skip, 0 fail. Suites: libc and libkernel pass on Linux (217 and 319) and on Windows (244 and 340). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • 1a23809f08, a merge of main acf7ac208a, which brings MarcZX10's #10557 (X509_PUBKEY_get0_param) (×10).

    • Four conflicting files, where #10557 implements X509_PUBKEY_get0_param and this PR, through #12754, implements the SSL_CTX, SSL and SSL_SESSION retains, the SSL_CTX version bounds and SSL_get_client_random. Both sides stay:
      • Export.cpp: both sides' stubs go;
      • include/Api.hpp: this PR's six declarations and #10557's X509_PUBKEY_get0_param one;
      • CMakeLists.txt: #10557's guest_libressl3_x509_pubkey_param joins this PR's guest_libressl3_ssl on the Windows set_tests_properties line;
      • docs/dev/debt/libSceLibreSsl3.md: the pending-exports line adds #10557's X509_PUBKEY_get0_param to its exclusions.
    • The count is 64, the NotImplemented_nid_no_patch calls left in the merged Export.cpp: this PR's 65, less #10557's X509_PUBKEY_get0_param.
    • This PR's other changed lines over main are the same.
    • ×10: guest_crypto_memcmp and every test matching ^guest_libressl3, #10557's guest_libressl3_x509_pubkey_param among them. Linux: 13 run, 13 pass, 0 skip, 0 fail. Windows: 13 run, 13 pass, 0 skip, 0 fail. The libc and libkernel suites run 301 and 325 tests on Linux and 331 and 343 on Windows, with 0 failed. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • 80bce94f35, oneandonlydean's merge of main ce676cb37d, which brings AZLisme's #10960 (EVP digest contexts and SHA methods) and MatteoSid's #10395 (EC groups and keys for named curves) (×10).

    • Two conflicting files, both resolved by keeping both sides:
      • core/libs/prx/libSceLibreSsl3/CMakeLists.txt: #10960's guest_libressl3_evp joins this PR's guest_libressl3_ssl on the Windows set_tests_properties line;
      • docs/dev/debt/libSceLibreSsl3.md: the pending-exports line adds #10960's EVP_MD_CTX_new, EVP_MD_CTX_free, EVP_DigestInit, EVP_sha1 and EVP_sha224 to its exclusions, and the Functional entries keep this PR's, then #10960's.
    • The count is 59, the NotImplemented_nid_no_patch calls left in the merged Export.cpp: main's 68, less this stack's 9.
    • #10395's cases in GuestLibreSsl3KeyReference.cpp, next to this PR's bio case, merge without a conflict. This PR's other changed lines over main are the same, and it merges cleanly with main 7ad9749ed0.
    • #12754 itself is unchanged. Its conflicts with main, in four files, are resolved on this branch.
    • check_conventions.py: 0 errors. Its one warning is the pending-exports line's length, 1,046 characters against the 1,000 guide, since the line names each implemented export.
    • ×10: guest_crypto_memcmp and every test matching ^guest_libressl3, #10960's guest_libressl3_evp and guest_libressl3_mixed_evp (Linux only) among them. Linux: 15 run, 15 pass, 0 skip, 0 fail. Windows: 14 run, 14 pass, 0 skip, 0 fail. The libc and libkernel suites run 310 and 329 tests on Linux and 341 and 360 on Windows, with 0 failed. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
    • AMD Radeon RX 6300 (RADV NAVI24), from TechLevelZero's AMD bot (report): this head merged onto main e772fb2, Mesa 25.2.8. 2,482 passed, 11 failed (none new: 8 also fail on main, 3 unstable on main), 17 skipped, with no new validation IDs (1,076 tests on the GPU). agc_graphics_profile_draw timed out in the parallel run and passed on its retry.
  • ded4b34174, a merge of main 04cdd52760, which brings MarcZX10's #10631 (OBJ_cmp) and AlexWhitehouse's #14366 (RSA_get0_factors and RSA_get0_crt_params) (×10).

    • Three conflicting files, all resolved by keeping both sides:
      • core/libs/prx/libSceLibreSsl3/include/Key.hpp: #14366's LibreSsl3Rsa field static_asserts, then this branch's LibreSsl3SslCtx (#12754) and LibreSsl3Bio ones;
      • core/libs/prx/libSceLibreSsl3/src/Key.cpp: #14366's two RSA getters, then this branch's SSL_CTX_up_ref (#12754) and BIO_up_ref;
      • docs/dev/debt/libSceLibreSsl3.md: the pending-exports line adds #10631's OBJ_cmp to its exclusions.
    • The count is 58, the NotImplemented_nid_no_patch calls left in the merged Export.cpp: main's 67, less this stack's 9.
    • This PR's other changed lines over main are the same, and it merges cleanly with main 151a2cb6e2.
    • check_conventions.py: 0 errors. Its one warning is still the pending-exports line's length, now 1,057 characters against the 1,000 guide.
    • ×10: guest_crypto_memcmp and every test matching ^guest_libressl3, #10631's guest_libressl3_obj_cmp and #14366's guest_libressl3_rsa_getters among them. Linux: 17 run, 17 pass, 0 skip, 0 fail. Windows: 16 run, 16 pass, 0 skip, 0 fail. The libc and libkernel suites run 322 and 334 tests on Linux and 353 and 365 on Windows, with 0 failed. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • 1ee57e1953, a merge of main e647fe16fd, which brings alvaroelpob's #10493 (X509_get0_extensions, X509_get_ext_count and X509_get_ext) and #10452 (ASN1_STRING_get0_data and ASN1_INTEGER_free) (×10).

    • Three conflicting files, all resolved by keeping both sides:
      • core/libs/prx/libSceLibreSsl3/Export.cpp: the stubs go for ASN1_STRING_get0_data, X509_get_ext and X509_get_ext_count, which main implements, and for BIO_up_ref and X509_get_version, which this branch implements;
      • core/libs/prx/libSceLibreSsl3/include/Api.hpp: main's signatures for ASN1_STRING_get0_data, X509_get_ext and X509_get_ext_count, and this branch's for BIO_up_ref and X509_get_version (#12754);
      • docs/dev/debt/libSceLibreSsl3.md: the pending-exports line adds #10452's and #10493's five exports to its exclusions.
    • The count is 53, the NotImplemented_nid_no_patch calls left in the merged Export.cpp: main's 62, less this stack's 9.
    • This PR's other changed lines over main are the same.
    • check_conventions.py: 0 errors. Its one warning is still the pending-exports line's length, now 1,165 characters against the 1,000 guide.
    • ×10: guest_crypto_memcmp and every test matching ^guest_libressl3, #10493's guest_libressl3_x509_extensions and #10452's guest_libressl3_asn1_string among them. Linux: 19 run, 19 pass, 0 skip, 0 fail. Windows: 18 run, 18 pass, 0 skip, 0 fail. The libc and libkernel suites run 322 and 334 tests on Linux and 353 and 365 on Windows, with 0 failed. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • 273540e752, a merge of main 3a2cd3df9e, which brings atharvjairath's #15031 (the key size, security and comparison queries, EVP_PKEY_size among them) (×10).

    • The one conflict was the pending-exports line in docs/dev/debt/libSceLibreSsl3.md. The merge keeps both sides: the exclusions add #15031's EVP_PKEY_size, and the count is 52, the NotImplemented_nid_no_patch calls left in the merged Export.cpp: main's 61, less this stack's 9.
    • This PR's other changed lines over main are the same.
    • check_conventions.py: 0 errors. Its one warning is still the pending-exports line's length, now 1,182 characters against the 1,000 guide.
    • ×10: guest_crypto_memcmp and every test matching ^guest_libressl3, #15031's guest_libressl3_pkey_queries among them. Linux: 20 run, 20 pass, 0 skip, 0 fail. Windows: 19 run, 19 pass, 0 skip, 0 fail. The libc and libkernel suites run 323 and 338 tests on Linux and 354 and 365 on Windows, with 0 failed. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • a427257694, a merge of main 018cfcbbc4, after #12754 merged on 11-06 at 07:12Z (×10).

    • What it brings: #12754 itself, and the libSceLibreSsl3 PRs merged since 3a2cd3df9e: alvaroelpob's #10491 and #10490, MarcZX10's #10461, atharvjairath's #14992 and jagrat04's #14483.
    • The resolution: #12754's lines take main's version, the one #12754 merged with, in place of this branch's copy of them. Of this PR, only 82c0aa626f's change stays:
      • BIO_up_ref in Export.cpp, include/Api.hpp, include/Key.hpp and src/Key.cpp;
      • its bio test case;
      • its debt entry and its pending-exports count.
    • The check: git diff 018cfcbbc4 a427257694 gives those 6 files, +32/-7, the same as 82c0aa626f's own diff. The one difference is the pending-exports line: it reads 45, main's 46 less BIO_up_ref, with BIO_up_ref added to the exclusions.
    • check_conventions.py: 0 errors. Its one warning is still the pending-exports line's length, now 1,393 characters against the 1,000 guide.
    • ×10: guest_crypto_memcmp and every test matching ^guest_libressl3, with this PR's bio case in guest_libressl3_key_reference.
      • Linux: 25 run, 25 pass, 0 skip, 0 fail.
      • Windows: 24 run, 24 pass, 0 skip, 0 fail.
      • The libc and libkernel suites run 324 and 338 tests on Linux and 355 and 365 on Windows, with 0 failed. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
    • What's left with main: one hunk in docs/dev/debt/libSceLibreSsl3.md. ahmadmuj's #11128 adds two entries directly above the pending-exports line this PR changes. Keeping both sides resolves it: #11128's two entries, then this PR's line. Its count stays 45, the NotImplemented_nid_no_patch calls in the Export.cpp of a merge with main e509b29247.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: #12754, merged on 11-06 at 07:12Z. #14890 (Noxy-HNR) goes after this PR (merge order only; it reuses this PR's LibreSsl3Bio from include/Key.hpp)
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5071089998 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12945). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-29T15:42:31Z. --- ### What `BIO_up_ref` in `libSceLibreSsl3` was a bare stub. It now does what LibreSSL 4.0.0 does ([`bio_lib.c` L198-L202](https://github.com/libressl/openbsd/blob/ce488b78e0bd994780569df718596b9776ff681a/src/lib/libcrypto/bio/bio_lib.c#L198-L202)): it raises the BIO's `references` by one and returns 1 when the new count is above 1, as `CRYPTO_add(&bio->references, 1, CRYPTO_LOCK_BIO) > 1` does. - **Built on #12754,** which implements the SSL, SSL_SESSION and X509 retains on the same base (#12578) and merged on 11-06 at 07:12Z. This PR uses its `Retain_nid_no_patch` in `include/Reference.hpp` as it is. - **The layout:** the 112-byte guest `LibreSsl3Bio`, with `references` at offset 80, from LibreSSL 4.0.0's `bio_local.h` (`struct bio_st`, LP64). `static_assert`s hold the size and the offset. - **Recorded differences,** in the debt entry: - the console layout is unmeasured; - a null BIO, and a count at `INT32_MAX`, throw without changing memory, where LibreSSL dereferences or overflows. - **Debt:** the pending count goes from 73 to 72 named exports. - **No title:** `BIO_up_ref` doesn't appear in an issue or discussion. **Overlap:** #12580 and #12582 (PrivacyOnion), which also appended their retains and test cases after `SSL_CTX_up_ref`, were closed unmerged on 2026-10-31. - **#10452** (alvaroelpob, merged) gave `ASN1_STRING_get0_data` its signature in `Export.cpp` and `Api.hpp`, on the line next to this PR's `BIO_up_ref`. The clash was textual only, and the merge of `main` 1ee57e1953 keeps both. - **The other pull requests the overlap comment listed** conflicted with #12754's commits, which this branch carried until #12754 merged. #9970, #10461, #10490, #10491, #10493, #10557, #10631, #10960 and #12369 have merged since, and this branch includes them through its merges of `main`. #12315 is still open. ### Tested - **`guest_libressl3_key_reference`** gains a `bio` case. It sits with the `CheckKey` cases (`EVP_PKEY`, `EC_KEY`, `SSL_CTX`) in `GuestLibreSsl3KeyReference.cpp`, since `BIO_up_ref` sits with their retains in `src/Key.cpp`; #12754's `CheckRetain` cases are in `GuestLibreSsl3Ssl.cpp`. It covers: - initial counts -2, 0, 1, 37 and `INT32_MAX - 1`, with the result; - 16 guard bytes on each side, and the rest of the struct unchanged; - 32 repeated retains; - 4 threads × 1,000 concurrent retains, ending at exactly 4,001. No case asserts a throw. - **Red:** with the body put back to `main`'s `NotImplemented_nid_no_patch` (the signature kept), the `bio` case aborts with `BIO_up_ref_nid_postfix not implemented`. The other cases still pass. - **Green, Linux** (Ubuntu 24.04, GCC 13.3, Release, CI's flags): - `ctest -R "libressl3|crypto_memcmp" --repeat until-fail:10`: 5 tests, 10 of 10 each, 0 skipped; - `ctest -R "libressl|crypto_memcmp"` once: 34 tests, 34 passed, 0 skipped. - **Checks:** `check_conventions.py` and `check_test_registration.py` pass. MinGW-w64 `-fsyntax-only -Wall -Wextra`: no errors or warnings. - **GitHub, ×10 on both runners** ([run 40895956237](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40895956237)), compared against #12754's head: `guest_libressl3_key_reference` passed 10 of 10 on Linux and on Windows, 0 skipped. - The libc and libkernel suites, run with `APS5_SKIP_TIMING_TESTS=1`, pass: 171 and 291 tests on Linux, 199 and 314 on Windows. - On the runners, the base's code doesn't build the new case, because its stub takes no parameters. The red above was taken with the real signature kept and only the body put back. - **82c0aa626f: this PR's one commit on #12754's 34728c573e**, because #12754 was rewritten onto `main` 474030e584. The commit is 219770ad1e cherry-picked, with the same message and author. - **The one change:** the pending-exports line in `docs/dev/debt/libSceLibreSsl3.md` now says 71, against #12754's 72. That's #12754's new line with `BIO_up_ref` added to the list, and it already names main's `RSA_up_ref`. - The count is the `APS5_VABI` definitions in `Export.cpp` whose body still calls `NotImplemented_nid_no_patch`. - That gives 72 at 34728c573e and 71 here. - **Everything else is unchanged:** this PR's own lines are the same as on 219770ad1e, and the `BIO_up_ref` bullet is unchanged. - **Red** (cloud Linux): with `BIO_up_ref` put back as a pending stub, only the `bio` case of `guest_libressl3_key_reference` fails, with `BIO_up_ref_nid_postfix not implemented`. - **×10 on GitHub's runners** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41219682224)), every `^guest_libressl3` test: - Linux: 7 run, 7 pass, 0 skip, 0 fail. - Windows: 7 run, 7 pass, 0 skip, 0 fail. - The libc and libkernel suites run 199 and 308 tests on Linux and 226 and 330 on Windows, with 0 failed. The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **272efa5452, a merge of `main` a043b048db**, which brings gazaret's #13897 (`EVP_PKEY_get0_RSA`, `_DSA` and `_DH`) ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41285061590)). - **The conflicts** were both in `docs/dev/debt/libSceLibreSsl3.md`, and both keep both sides: #13897's `EVP_PKEY_get0` entry, then this branch's entries, #12754's and this PR's. - **The pending-exports count** is recounted on the merged tree as 68, the `NotImplemented_nid_no_patch` calls left in the merged `Export.cpp`: 80 at the base, less `main`'s 3 and the stack's 9. Its list names both sides' implemented exports, `main`'s first. - This also resolves #12754's own conflict with `main`, which is in the same file, on this branch. #12754 itself is unchanged. - **×10:** every `^guest_libressl3` test. Linux: 9 run, 9 pass, 0 skip, 0 fail. Windows: 9 run, 9 pass, 0 skip, 0 fail. The libc and libkernel suites run 206 and 308 tests on Linux and 233 and 330 on Windows, with 0 failed. The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - It merges cleanly with `main` 5c9837bfe7, where the count is still 68. - **e44bf06eab, a merge of `main` b28bb77217** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41483634780)), which brings Froraut's #9970 (`OpenSSL_version`) and Felipebmaitan's #9535 (numeric `ERR` formatting, with `ERR_load_crypto_strings` and `ERR_peek_last_error` in this module). - **Two conflicting files, both resolved by keeping both sides:** - `CMakeLists.txt`: #9970's `guest_libressl3_version` joins this PR's `guest_libressl3_ssl` on the `set_tests_properties` line; - `docs/dev/debt/libSceLibreSsl3.md`: the pending-exports line lists #9970's `OpenSSL_version` among the exclusions, with this PR's. - **The count** is 65, the `NotImplemented_nid_no_patch` calls left in the merged `Export.cpp`. `main`'s line reads 76, 2 more than the 74 calls left in its own `Export.cpp`, since #9535's `ERR_load_crypto_strings` and `ERR_peek_last_error` are no longer stubs. - This PR's other changed lines over `main` are the same, and it merges cleanly with `main` a4eca2a056. - **×10:** the `^guest_libressl` tests, #9970's `guest_libressl3_version` among them, with `guest_crypto_memcmp`, `guest_libressl3_key_reference`, `guest_libressl3_ssl` and `public_headers`. Linux: 48 run, 48 pass, 0 skip, 0 fail. Windows: 48 run, 48 pass, 0 skip, 0 fail. Suites: libc and libkernel pass on Linux (217 and 319) and on Windows (244 and 340). The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **1a23809f08, a merge of `main` acf7ac208a,** which brings MarcZX10's #10557 (`X509_PUBKEY_get0_param`) ([×10](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41778235146)). - **Four conflicting files,** where #10557 implements `X509_PUBKEY_get0_param` and this PR, through #12754, implements the `SSL_CTX`, `SSL` and `SSL_SESSION` retains, the `SSL_CTX` version bounds and `SSL_get_client_random`. Both sides stay: - `Export.cpp`: both sides' stubs go; - `include/Api.hpp`: this PR's six declarations and #10557's `X509_PUBKEY_get0_param` one; - `CMakeLists.txt`: #10557's `guest_libressl3_x509_pubkey_param` joins this PR's `guest_libressl3_ssl` on the Windows `set_tests_properties` line; - `docs/dev/debt/libSceLibreSsl3.md`: the pending-exports line adds #10557's `X509_PUBKEY_get0_param` to its exclusions. - **The count** is 64, the `NotImplemented_nid_no_patch` calls left in the merged `Export.cpp`: this PR's 65, less #10557's `X509_PUBKEY_get0_param`. - This PR's other changed lines over `main` are the same. - **×10:** `guest_crypto_memcmp` and every test matching `^guest_libressl3`, #10557's `guest_libressl3_x509_pubkey_param` among them. Linux: 13 run, 13 pass, 0 skip, 0 fail. Windows: 13 run, 13 pass, 0 skip, 0 fail. The libc and libkernel suites run 301 and 325 tests on Linux and 331 and 343 on Windows, with 0 failed. The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **80bce94f35, oneandonlydean's merge of `main` ce676cb37d,** which brings AZLisme's #10960 (EVP digest contexts and SHA methods) and MatteoSid's #10395 (EC groups and keys for named curves) ([×10](https://github.com/EagleBearerYS/AnyPS5/actions/runs/42000299815)). - **Two conflicting files, both resolved by keeping both sides:** - `core/libs/prx/libSceLibreSsl3/CMakeLists.txt`: #10960's `guest_libressl3_evp` joins this PR's `guest_libressl3_ssl` on the Windows `set_tests_properties` line; - `docs/dev/debt/libSceLibreSsl3.md`: the pending-exports line adds #10960's `EVP_MD_CTX_new`, `EVP_MD_CTX_free`, `EVP_DigestInit`, `EVP_sha1` and `EVP_sha224` to its exclusions, and the Functional entries keep this PR's, then #10960's. - **The count** is 59, the `NotImplemented_nid_no_patch` calls left in the merged `Export.cpp`: `main`'s 68, less this stack's 9. - #10395's cases in `GuestLibreSsl3KeyReference.cpp`, next to this PR's `bio` case, merge without a conflict. This PR's other changed lines over `main` are the same, and it merges cleanly with `main` 7ad9749ed0. - #12754 itself is unchanged. Its conflicts with `main`, in four files, are resolved on this branch. - **`check_conventions.py`:** 0 errors. Its one warning is the pending-exports line's length, 1,046 characters against the 1,000 guide, since the line names each implemented export. - **×10:** `guest_crypto_memcmp` and every test matching `^guest_libressl3`, #10960's `guest_libressl3_evp` and `guest_libressl3_mixed_evp` (Linux only) among them. Linux: 15 run, 15 pass, 0 skip, 0 fail. Windows: 14 run, 14 pass, 0 skip, 0 fail. The libc and libkernel suites run 310 and 329 tests on Linux and 341 and 360 on Windows, with 0 failed. The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **AMD Radeon RX 6300 (RADV NAVI24)**, from TechLevelZero's AMD bot ([report](https://github.com/boykopovar/AnyPS5/pull/12945#issuecomment-6663575835)): this head merged onto `main` e772fb2, Mesa 25.2.8. 2,482 passed, 11 failed (none new: 8 also fail on `main`, 3 unstable on `main`), 17 skipped, with no new validation IDs (1,076 tests on the GPU). `agc_graphics_profile_draw` timed out in the parallel run and passed on its retry. - **ded4b34174, a merge of `main` 04cdd52760,** which brings MarcZX10's #10631 (`OBJ_cmp`) and AlexWhitehouse's #14366 (`RSA_get0_factors` and `RSA_get0_crt_params`) ([×10](https://github.com/EagleBearerYS/AnyPS5/actions/runs/42088485891)). - **Three conflicting files, all resolved by keeping both sides:** - `core/libs/prx/libSceLibreSsl3/include/Key.hpp`: #14366's `LibreSsl3Rsa` field `static_assert`s, then this branch's `LibreSsl3SslCtx` (#12754) and `LibreSsl3Bio` ones; - `core/libs/prx/libSceLibreSsl3/src/Key.cpp`: #14366's two RSA getters, then this branch's `SSL_CTX_up_ref` (#12754) and `BIO_up_ref`; - `docs/dev/debt/libSceLibreSsl3.md`: the pending-exports line adds #10631's `OBJ_cmp` to its exclusions. - **The count** is 58, the `NotImplemented_nid_no_patch` calls left in the merged `Export.cpp`: `main`'s 67, less this stack's 9. - This PR's other changed lines over `main` are the same, and it merges cleanly with `main` 151a2cb6e2. - **`check_conventions.py`:** 0 errors. Its one warning is still the pending-exports line's length, now 1,057 characters against the 1,000 guide. - **×10:** `guest_crypto_memcmp` and every test matching `^guest_libressl3`, #10631's `guest_libressl3_obj_cmp` and #14366's `guest_libressl3_rsa_getters` among them. Linux: 17 run, 17 pass, 0 skip, 0 fail. Windows: 16 run, 16 pass, 0 skip, 0 fail. The libc and libkernel suites run 322 and 334 tests on Linux and 353 and 365 on Windows, with 0 failed. The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **1ee57e1953, a merge of `main` e647fe16fd,** which brings alvaroelpob's #10493 (`X509_get0_extensions`, `X509_get_ext_count` and `X509_get_ext`) and #10452 (`ASN1_STRING_get0_data` and `ASN1_INTEGER_free`) ([×10](https://github.com/EagleBearerYS/AnyPS5/actions/runs/42122242106)). - **Three conflicting files, all resolved by keeping both sides:** - `core/libs/prx/libSceLibreSsl3/Export.cpp`: the stubs go for `ASN1_STRING_get0_data`, `X509_get_ext` and `X509_get_ext_count`, which `main` implements, and for `BIO_up_ref` and `X509_get_version`, which this branch implements; - `core/libs/prx/libSceLibreSsl3/include/Api.hpp`: `main`'s signatures for `ASN1_STRING_get0_data`, `X509_get_ext` and `X509_get_ext_count`, and this branch's for `BIO_up_ref` and `X509_get_version` (#12754); - `docs/dev/debt/libSceLibreSsl3.md`: the pending-exports line adds #10452's and #10493's five exports to its exclusions. - **The count** is 53, the `NotImplemented_nid_no_patch` calls left in the merged `Export.cpp`: `main`'s 62, less this stack's 9. - This PR's other changed lines over `main` are the same. - **`check_conventions.py`:** 0 errors. Its one warning is still the pending-exports line's length, now 1,165 characters against the 1,000 guide. - **×10:** `guest_crypto_memcmp` and every test matching `^guest_libressl3`, #10493's `guest_libressl3_x509_extensions` and #10452's `guest_libressl3_asn1_string` among them. Linux: 19 run, 19 pass, 0 skip, 0 fail. Windows: 18 run, 18 pass, 0 skip, 0 fail. The libc and libkernel suites run 322 and 334 tests on Linux and 353 and 365 on Windows, with 0 failed. The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **273540e752, a merge of `main` 3a2cd3df9e,** which brings atharvjairath's #15031 (the key size, security and comparison queries, `EVP_PKEY_size` among them) ([×10](https://github.com/EagleBearerYS/AnyPS5/actions/runs/42143444292)). - **The one conflict** was the pending-exports line in `docs/dev/debt/libSceLibreSsl3.md`. The merge keeps both sides: the exclusions add #15031's `EVP_PKEY_size`, and the count is 52, the `NotImplemented_nid_no_patch` calls left in the merged `Export.cpp`: `main`'s 61, less this stack's 9. - This PR's other changed lines over `main` are the same. - **`check_conventions.py`:** 0 errors. Its one warning is still the pending-exports line's length, now 1,182 characters against the 1,000 guide. - **×10:** `guest_crypto_memcmp` and every test matching `^guest_libressl3`, #15031's `guest_libressl3_pkey_queries` among them. Linux: 20 run, 20 pass, 0 skip, 0 fail. Windows: 19 run, 19 pass, 0 skip, 0 fail. The libc and libkernel suites run 323 and 338 tests on Linux and 354 and 365 on Windows, with 0 failed. The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **a427257694, a merge of `main` 018cfcbbc4,** after #12754 merged on 11-06 at 07:12Z ([×10](https://github.com/EagleBearerYS/AnyPS5/actions/runs/42180205188)). - **What it brings:** #12754 itself, and the libSceLibreSsl3 PRs merged since 3a2cd3df9e: alvaroelpob's #10491 and #10490, MarcZX10's #10461, atharvjairath's #14992 and jagrat04's #14483. - **The resolution:** #12754's lines take `main`'s version, the one #12754 merged with, in place of this branch's copy of them. Of this PR, only 82c0aa626f's change stays: - `BIO_up_ref` in `Export.cpp`, `include/Api.hpp`, `include/Key.hpp` and `src/Key.cpp`; - its `bio` test case; - its debt entry and its pending-exports count. - **The check:** `git diff 018cfcbbc4 a427257694` gives those 6 files, +32/-7, the same as 82c0aa626f's own diff. The one difference is the pending-exports line: it reads 45, `main`'s 46 less `BIO_up_ref`, with `BIO_up_ref` added to the exclusions. - **`check_conventions.py`:** 0 errors. Its one warning is still the pending-exports line's length, now 1,393 characters against the 1,000 guide. - **×10:** `guest_crypto_memcmp` and every test matching `^guest_libressl3`, with this PR's `bio` case in `guest_libressl3_key_reference`. - Linux: 25 run, 25 pass, 0 skip, 0 fail. - Windows: 24 run, 24 pass, 0 skip, 0 fail. - The libc and libkernel suites run 324 and 338 tests on Linux and 355 and 365 on Windows, with 0 failed. The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **What's left with `main`:** one hunk in `docs/dev/debt/libSceLibreSsl3.md`. ahmadmuj's #11128 adds two entries directly above the pending-exports line this PR changes. Keeping both sides resolves it: #11128's two entries, then this PR's line. Its count stays 45, the `NotImplemented_nid_no_patch` calls in the `Export.cpp` of a merge with `main` e509b29247. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: #12754, merged on 11-06 at 07:12Z. #14890 (Noxy-HNR) goes after this PR (merge order only; it reuses this PR's `LibreSsl3Bio` from `include/Key.hpp`) - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
CnRJay commented 2026-11-01 19:54:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by CnRJay on 2026-11-01T19:54:16Z.

Review: COMMENTED


The diff is +621/-75 across 13 files for one export; please say what else it carries.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5729937794 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12945#pullrequestreview-5729937794). Originally posted by [CnRJay](https://github.com/CnRJay) on 2026-11-01T19:54:16Z. **Review:** COMMENTED --- The diff is +621/-75 across 13 files for one export; please say what else it carries.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!12945
No description provided.