fix(libSceLibreSsl): queue LibreSSL errors in EVP digest and HMAC functions #16079

Merged
puridanish284 merged 7 commits from upstream-pr/16079 into main 2026-11-10 16:52:50 +00:00
puridanish284 commented 2026-11-05 15:38:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by puridanish284 on 2026-11-05T15:38:55Z.


What

libSceLibreSsl's EVP digest and HMAC functions returned their failure values without queuing an error, where LibreSSL 2.5.4, the version libSceLibreSsl reports, queues one through EVPerror, that is ERR_PACK(ERR_LIB_EVP (6), 0xfff, reason). Every such path now queues the same code through LibreSslPutError_nid_no_patch. The return values are unchanged.

Path Reason LibreSSL 2.5.4
EVP_MD_size(NULL), returns -1 EVP_R_MESSAGE_DIGEST_IS_NULL (159) evp_lib.c L289-L296
EVP_DigestInit_ex without a type on a context without a digest EVP_R_NO_DIGEST_SET (139) digest.c L188-L191
EVP_DigestInit_ex failing to allocate md_data ERR_R_MALLOC_FAILURE (65) digest.c L203-L209
EVP_DigestFinal_ex with md_size above EVP_MAX_MD_SIZE EVP_R_TOO_LARGE (164) digest.c L250-L253
the context copy (EVP_MD_CTX_copy_ex) that HMAC and EVP_DigestVerifyFinal use, from a context without a digest EVP_R_INPUT_NOT_INITIALIZED (111) digest.c L277-L280
the same copy failing to allocate ERR_R_MALLOC_FAILURE (65) digest.c L300-L305
HMAC_Init_ex with a block size above the 128-byte key EVP_R_BAD_BLOCK_LENGTH (136) hmac.c L88-L91
HMAC_Init_ex with a negative key length on its current digest EVP_R_BAD_KEY_LENGTH (137) hmac.c L101-L104

The values come from evp.h and err.h at the same commit, which defines only OPENSSL_NO_DYNAMIC_ENGINE, so the ENGINE block that holds the EVP_R_NO_DIGEST_SET check is compiled.

Each failure queues one code. Nested calls pass the inner failure on without adding another, as in LibreSSL: an allocation failure inside HMAC_Init_ex or HMAC queues one ERR_R_MALLOC_FAILURE. Paths where LibreSSL queues nothing still queue nothing: HMAC_Init_ex changing the digest without a key or with no digest at all, HMAC_Update and HMAC_Final without a digest, and EVP_MD_CTX_create's failed calloc. The ENGINE and null-context paths still throw.

libSceLibreSsl3 forwards EVP_MD_size, EVP_DigestInit_ex, EVP_DigestFinal_ex, EVP_Digest, HMAC_Init_ex, HMAC_Final and HMAC to these functions, and its ERR_get_error, ERR_peek_error and ERR_clear_error read the same queue. LibreSSL 4.0.0 queues the same codes on these paths, with one exception: 4.0.0 has no ENGINE code, so EVP_DigestInit_ex(ctx, NULL, NULL) on an empty context dereferences the null digest there. The forwarded export keeps 2.5.4's return of 0 and now its EVP_R_NO_DIGEST_SET.

Callers: in core/, the changed functions are called by the libSceLibreSsl3 forwarders, by HMAC through HMAC_Init, by RSA_padding_add_PKCS1_PSS and RSA_verify_PKCS1_PSS, which boykopovar/AnyPS5#11175 merged after this PR was opened, and by EVP_DigestVerifyInit and EVP_DigestVerifyFinal, which boykopovar/AnyPS5#16719 merged on 2026-11-10. EVP_DigestVerifyFinal queued EVP_R_INPUT_NOT_INITIALIZED itself after a failed context copy; the fourth merge of main removes that, because the copy now queues it, and LibreSSL 2.5.4's m_sigver.c L182-L183 returns -1 after EVP_MD_CTX_copy_ex without adding one. A failed digest data allocation in EVP_DigestVerifyInit and a failed digest data copy in EVP_DigestVerifyFinal now queue ERR_R_MALLOC_FAILURE, which m_sigver.c L108-L109 passes on unchanged; a failed key context copy still queues nothing, as in EVP_PKEY_CTX_dup and pkey_rsa_init. With that, none of the callers adds an error after a failed call, as in LibreSSL, so no path queues a duplicate error. The PSS calls use EVP_MD_size, EVP_DigestInit_ex and EVP_DigestFinal_ex as LibreSSL 2.5.4's rsa_pss.c (L96-L98, L202-L204) and PKCS1_MGF1 do, so a null digest there now queues EVP_R_MESSAGE_DIGEST_IS_NULL and a digest above 64 bytes EVP_R_TOO_LARGE, the codes LibreSSL queues.

Debt: the EVP digest and HMAC entry no longer lists failures that queue nothing, and the RSA PSS entry no longer says the EVP errors for a null or over-64-byte digest are missing. The "Error publication" entry names EVP cipher instead of EVP/HMAC among the implementations without error publication, because main's EVP cipher functions still queue no error. Main's EVP_DigestVerifyInit and EVP_DigestVerifyFinal entry no longer lists the digest and copy malloc failures among the errors not queued.

The branch has two commits, EVP_MD_size first and then the context and HMAC paths; two merges of main, which resolve debt-file conflicts next to the EC entry and then next to the RSA PSS entry; a test commit that makes the RSA PSS test require those EVP codes where it only checked that no RSA error was queued; a third merge of main, which resolves the debt-file conflict with the EC entries that boykopovar/AnyPS5#15827 reworded and added below the EVP entry; and a fourth merge of main, which resolves the include and debt-file conflicts with boykopovar/AnyPS5#16719, removes the duplicate error from EVP_DigestVerifyFinal and makes guest_libressl_digest_verify_allocator check the queue after each failed allocation.

Overlap: no open PR shares an export or a new file with this one. In the debt file, six open PRs edit lines next to the three entries this branch changes, none of them the same entry, and a merge keeps both sides: boykopovar/AnyPS5#12729 and boykopovar/AnyPS5#12730 edit the SSL_get_ex_new_index entry above the RSA PSS entry; boykopovar/AnyPS5#11146 edits or moves the EC entry below the EVP entries; and boykopovar/AnyPS5#16694, boykopovar/AnyPS5#16717 and boykopovar/AnyPS5#16718 add an entry directly before "Error publication". boykopovar/AnyPS5#15827, which edited the EC entry and added one after it, merged on 2026-11-08, and boykopovar/AnyPS5#16719, which added the EVP_DigestVerify and EVP_PKEY_CTX entries after the EVP entry, merged on 2026-11-10; the third and fourth merges of main keep both sides. Five libSceLibreSsl3 PRs add calls to the changed functions; four of them have merged into main since, so the fourth merge includes them and their tests pass on it. boykopovar/AnyPS5#15622 (PBKDF2, merged) checks for a null digest itself and queues 0x06fff09f before calling EVP_MD_size, and its failing HMAC_Init_ex calls change the digest without a key or with a negative key length, which still queue nothing, so its empty-queue checks hold. boykopovar/AnyPS5#16535 (PBKDF2, merged) returns 0 when EVP_MD_size fails; for a null digest that call now queues 0x06fff09f, as LibreSSL's PKCS5_PBKDF2_HMAC does, and its test does not read the queue. boykopovar/AnyPS5#16819 (HKDF, open) queues ERR_R_CRYPTO_LIB after a failed HMAC, and its failing HMAC calls have no digest, or a negative key length on a new context, which still queue nothing, so its single-error checks hold. boykopovar/AnyPS5#15514 and boykopovar/AnyPS5#15625 (merged) call them only in tests that expect success, as does boykopovar/AnyPS5#16258.

Tested

Windows 11 Pro 25H2 (build 26200.9711) with WSL2 Ubuntu 24.04.5 LTS, gcc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0, -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON, full build of head f685673242 (main e8b1bd3d7f merged in). No title or console.

  • ctest --test-dir build -R "libressl|libre_ssl|crypto_memcmp|digest_extents|^public_headers$": 93 of 93 pass. These are all tests whose executables link or load libSceLibreSsl or libSceLibreSsl3, plus public_headers.
  • guest_libressl_evp asserts every code above with ERR_get_error and an empty queue afterwards, and that a non-null EVP_MD_size and EVP_MD_CTX_create's failed allocation queue nothing. guest_libressl_rsa_pss now requires EVP_R_MESSAGE_DIGEST_IS_NULL alone for a null digest and EVP_R_TOO_LARGE alone for a 65-byte digest. Against main's Evp.cpp they abort at lines 208 and 604.
  • Mutation check: turning each of the seven new return Fail(...) back into return 0 fails guest_libressl_evp at that code's own assertion (Evp.cpp line → test line: 307 NoDigestSet → 289, 318 MallocFailure → 396, 337 TooLarge → 327, 353 InputNotInitialized → 355, 369 MallocFailure → 422, 406 BadBlockLength → 353, 412 BadKeyLength → 342). The TooLarge one also fails guest_libressl_rsa_pss at line 837, and leaving EVP_MD_size(NULL) without its error fails it at line 604.
  • python3 tools/check_conventions.py --base origin/main: all conventions checks passed.
  • tools/pr_overlap.py --branch claude/zealous-brown-h1u67r (2026-11-06): against main e8b1bd3d7f and the 1869 open PRs it reported seven adjacent debt-file conflicts and no shared exports or new files. It failed closed on 19 PRs that already conflict with main; merging each of them into main and into this branch gives the same conflicts.
  • 2026-11-07, merged into main c06e4c075f (same compiler and options, test targets only): the filter above selects 100 tests and all pass, and main's check_conventions.py passes. With each of the five libSceLibreSsl3 PRs above merged on top as well, the filter and their new tests (guest_libressl3_pbkdf2, guest_libressl3_sha512_256, guest_libressl3_hkdf, guest_libressl3_hmac_context) pass; boykopovar/AnyPS5#16535 extends guest_libressl3_digest instead, and boykopovar/AnyPS5#15514 was built with its debt-file conflict with main left in place. Each of the eight debt-file neighbours conflicts with that merge only in docs/dev/debt/libSceLibreSsl.md.
  • 2026-11-08, after boykopovar/AnyPS5#15827 merged: head 76432389fc (main f5fe807353 merged in; same compiler and options, test targets only): the filter above selects 107 tests and all pass, and check_conventions.py --base upstream/main passes. Against that head, the seven debt-file neighbours still conflict in docs/dev/debt/libSceLibreSsl.md only on adjacent lines, which a merge keeps from both sides, and the five libSceLibreSsl3 PRs conflict in the same files as they do with main.
  • 2026-11-10, after boykopovar/AnyPS5#16719 merged: head 9c1c7f233b (main c5488026ab merged in; same compiler and options, test targets only): the filter above selects 128 tests and all pass, among them guest_libressl_digest_verify, guest_libressl_digest_verify_allocator and the tests of the four merged libSceLibreSsl3 PRs above (guest_libressl3_pbkdf2, guest_libressl3_sha512_256, guest_libressl3_hmac_context, guest_libressl3_digest). Putting back boykopovar/AnyPS5#16719's own EVP_R_INPUT_NOT_INITIALIZED in EVP_DigestVerifyFinal fails guest_libressl_digest_verify with "a context without a digest queues the input not initialized error". check_conventions.py --base upstream/main passes, and the head merges cleanly with main b8194198cf. Against that head, the six open debt-file neighbours conflict in docs/dev/debt/libSceLibreSsl.md only on adjacent lines, which a merge keeps from both sides, and boykopovar/AnyPS5#11146 and boykopovar/AnyPS5#16819 conflict in the same files as they do with main.
  • ANYPS5_LIBRESSL_ORACLE was not run. The reference behaviour comes from the LibreSSL sources linked above.

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: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5174280876 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/16079). Originally posted by [puridanish284](https://github.com/puridanish284) on 2026-11-05T15:38:55Z. --- ### What libSceLibreSsl's EVP digest and HMAC functions returned their failure values without queuing an error, where LibreSSL 2.5.4, the version libSceLibreSsl reports, queues one through `EVPerror`, that is `ERR_PACK(ERR_LIB_EVP (6), 0xfff, reason)`. Every such path now queues the same code through `LibreSslPutError_nid_no_patch`. The return values are unchanged. | Path | Reason | LibreSSL 2.5.4 | |---|---|---| | `EVP_MD_size(NULL)`, returns -1 | `EVP_R_MESSAGE_DIGEST_IS_NULL` (159) | [`evp_lib.c` L289-L296](https://github.com/libressl/openbsd/blob/2e2c612066aa993717528a0249c15c51128d61cb/src/lib/libcrypto/evp/evp_lib.c#L289-L296) | | `EVP_DigestInit_ex` without a type on a context without a digest | `EVP_R_NO_DIGEST_SET` (139) | [`digest.c` L188-L191](https://github.com/libressl/openbsd/blob/2e2c612066aa993717528a0249c15c51128d61cb/src/lib/libcrypto/evp/digest.c#L188-L191) | | `EVP_DigestInit_ex` failing to allocate `md_data` | `ERR_R_MALLOC_FAILURE` (65) | [`digest.c` L203-L209](https://github.com/libressl/openbsd/blob/2e2c612066aa993717528a0249c15c51128d61cb/src/lib/libcrypto/evp/digest.c#L203-L209) | | `EVP_DigestFinal_ex` with `md_size` above `EVP_MAX_MD_SIZE` | `EVP_R_TOO_LARGE` (164) | [`digest.c` L250-L253](https://github.com/libressl/openbsd/blob/2e2c612066aa993717528a0249c15c51128d61cb/src/lib/libcrypto/evp/digest.c#L250-L253) | | the context copy (`EVP_MD_CTX_copy_ex`) that HMAC and `EVP_DigestVerifyFinal` use, from a context without a digest | `EVP_R_INPUT_NOT_INITIALIZED` (111) | [`digest.c` L277-L280](https://github.com/libressl/openbsd/blob/2e2c612066aa993717528a0249c15c51128d61cb/src/lib/libcrypto/evp/digest.c#L277-L280) | | the same copy failing to allocate | `ERR_R_MALLOC_FAILURE` (65) | [`digest.c` L300-L305](https://github.com/libressl/openbsd/blob/2e2c612066aa993717528a0249c15c51128d61cb/src/lib/libcrypto/evp/digest.c#L300-L305) | | `HMAC_Init_ex` with a block size above the 128-byte key | `EVP_R_BAD_BLOCK_LENGTH` (136) | [`hmac.c` L88-L91](https://github.com/libressl/openbsd/blob/2e2c612066aa993717528a0249c15c51128d61cb/src/lib/libcrypto/hmac/hmac.c#L88-L91) | | `HMAC_Init_ex` with a negative key length on its current digest | `EVP_R_BAD_KEY_LENGTH` (137) | [`hmac.c` L101-L104](https://github.com/libressl/openbsd/blob/2e2c612066aa993717528a0249c15c51128d61cb/src/lib/libcrypto/hmac/hmac.c#L101-L104) | The values come from `evp.h` and `err.h` at the same commit, which defines only `OPENSSL_NO_DYNAMIC_ENGINE`, so the ENGINE block that holds the `EVP_R_NO_DIGEST_SET` check is compiled. Each failure queues one code. Nested calls pass the inner failure on without adding another, as in LibreSSL: an allocation failure inside `HMAC_Init_ex` or `HMAC` queues one `ERR_R_MALLOC_FAILURE`. Paths where LibreSSL queues nothing still queue nothing: `HMAC_Init_ex` changing the digest without a key or with no digest at all, `HMAC_Update` and `HMAC_Final` without a digest, and `EVP_MD_CTX_create`'s failed `calloc`. The ENGINE and null-context paths still throw. libSceLibreSsl3 forwards `EVP_MD_size`, `EVP_DigestInit_ex`, `EVP_DigestFinal_ex`, `EVP_Digest`, `HMAC_Init_ex`, `HMAC_Final` and `HMAC` to these functions, and its `ERR_get_error`, `ERR_peek_error` and `ERR_clear_error` read the same queue. LibreSSL 4.0.0 queues the same codes on these paths, with one exception: 4.0.0 has no ENGINE code, so `EVP_DigestInit_ex(ctx, NULL, NULL)` on an empty context dereferences the null digest there. The forwarded export keeps 2.5.4's return of 0 and now its `EVP_R_NO_DIGEST_SET`. Callers: in `core/`, the changed functions are called by the libSceLibreSsl3 forwarders, by `HMAC` through `HMAC_Init`, by `RSA_padding_add_PKCS1_PSS` and `RSA_verify_PKCS1_PSS`, which [boykopovar/AnyPS5#11175](https://github.com/boykopovar/AnyPS5/pull/11175) merged after this PR was opened, and by `EVP_DigestVerifyInit` and `EVP_DigestVerifyFinal`, which [boykopovar/AnyPS5#16719](https://github.com/boykopovar/AnyPS5/pull/16719) merged on 2026-11-10. `EVP_DigestVerifyFinal` queued `EVP_R_INPUT_NOT_INITIALIZED` itself after a failed context copy; the fourth merge of `main` removes that, because the copy now queues it, and LibreSSL 2.5.4's [`m_sigver.c` L182-L183](https://github.com/libressl/openbsd/blob/2e2c612066aa993717528a0249c15c51128d61cb/src/lib/libcrypto/evp/m_sigver.c#L182-L183) returns -1 after `EVP_MD_CTX_copy_ex` without adding one. A failed digest data allocation in `EVP_DigestVerifyInit` and a failed digest data copy in `EVP_DigestVerifyFinal` now queue `ERR_R_MALLOC_FAILURE`, which [`m_sigver.c` L108-L109](https://github.com/libressl/openbsd/blob/2e2c612066aa993717528a0249c15c51128d61cb/src/lib/libcrypto/evp/m_sigver.c#L108-L109) passes on unchanged; a failed key context copy still queues nothing, as in [`EVP_PKEY_CTX_dup`](https://github.com/libressl/openbsd/blob/2e2c612066aa993717528a0249c15c51128d61cb/src/lib/libcrypto/evp/pmeth_lib.c#L343-L345) and [`pkey_rsa_init`](https://github.com/libressl/openbsd/blob/2e2c612066aa993717528a0249c15c51128d61cb/src/lib/libcrypto/rsa/rsa_pmeth.c#L101-L103). With that, none of the callers adds an error after a failed call, as in LibreSSL, so no path queues a duplicate error. The PSS calls use `EVP_MD_size`, `EVP_DigestInit_ex` and `EVP_DigestFinal_ex` as LibreSSL 2.5.4's `rsa_pss.c` ([L96-L98](https://github.com/libressl/openbsd/blob/2e2c612066aa993717528a0249c15c51128d61cb/src/lib/libcrypto/rsa/rsa_pss.c#L96-L98), [L202-L204](https://github.com/libressl/openbsd/blob/2e2c612066aa993717528a0249c15c51128d61cb/src/lib/libcrypto/rsa/rsa_pss.c#L202-L204)) and [`PKCS1_MGF1`](https://github.com/libressl/openbsd/blob/2e2c612066aa993717528a0249c15c51128d61cb/src/lib/libcrypto/rsa/rsa_oaep.c#L186-L225) do, so a null digest there now queues `EVP_R_MESSAGE_DIGEST_IS_NULL` and a digest above 64 bytes `EVP_R_TOO_LARGE`, the codes LibreSSL queues. Debt: the EVP digest and HMAC entry no longer lists failures that queue nothing, and the RSA PSS entry no longer says the EVP errors for a null or over-64-byte digest are missing. The "Error publication" entry names EVP cipher instead of EVP/HMAC among the implementations without error publication, because main's EVP cipher functions still queue no error. Main's `EVP_DigestVerifyInit` and `EVP_DigestVerifyFinal` entry no longer lists the digest and copy malloc failures among the errors not queued. The branch has two commits, `EVP_MD_size` first and then the context and HMAC paths; two merges of `main`, which resolve debt-file conflicts next to the EC entry and then next to the RSA PSS entry; a test commit that makes the RSA PSS test require those EVP codes where it only checked that no RSA error was queued; a third merge of `main`, which resolves the debt-file conflict with the EC entries that [boykopovar/AnyPS5#15827](https://github.com/boykopovar/AnyPS5/pull/15827) reworded and added below the EVP entry; and a fourth merge of `main`, which resolves the include and debt-file conflicts with [boykopovar/AnyPS5#16719](https://github.com/boykopovar/AnyPS5/pull/16719), removes the duplicate error from `EVP_DigestVerifyFinal` and makes `guest_libressl_digest_verify_allocator` check the queue after each failed allocation. Overlap: no open PR shares an export or a new file with this one. In the debt file, six open PRs edit lines next to the three entries this branch changes, none of them the same entry, and a merge keeps both sides: [boykopovar/AnyPS5#12729](https://github.com/boykopovar/AnyPS5/pull/12729) and [boykopovar/AnyPS5#12730](https://github.com/boykopovar/AnyPS5/pull/12730) edit the `SSL_get_ex_new_index` entry above the RSA PSS entry; [boykopovar/AnyPS5#11146](https://github.com/boykopovar/AnyPS5/pull/11146) edits or moves the EC entry below the EVP entries; and [boykopovar/AnyPS5#16694](https://github.com/boykopovar/AnyPS5/pull/16694), [boykopovar/AnyPS5#16717](https://github.com/boykopovar/AnyPS5/pull/16717) and [boykopovar/AnyPS5#16718](https://github.com/boykopovar/AnyPS5/pull/16718) add an entry directly before "Error publication". [boykopovar/AnyPS5#15827](https://github.com/boykopovar/AnyPS5/pull/15827), which edited the EC entry and added one after it, merged on 2026-11-08, and [boykopovar/AnyPS5#16719](https://github.com/boykopovar/AnyPS5/pull/16719), which added the `EVP_DigestVerify` and `EVP_PKEY_CTX` entries after the EVP entry, merged on 2026-11-10; the third and fourth merges of `main` keep both sides. Five libSceLibreSsl3 PRs add calls to the changed functions; four of them have merged into `main` since, so the fourth merge includes them and their tests pass on it. [boykopovar/AnyPS5#15622](https://github.com/boykopovar/AnyPS5/pull/15622) (PBKDF2, merged) checks for a null digest itself and queues `0x06fff09f` before calling `EVP_MD_size`, and its failing `HMAC_Init_ex` calls change the digest without a key or with a negative key length, which still queue nothing, so its empty-queue checks hold. [boykopovar/AnyPS5#16535](https://github.com/boykopovar/AnyPS5/pull/16535) (PBKDF2, merged) returns 0 when `EVP_MD_size` fails; for a null digest that call now queues `0x06fff09f`, as LibreSSL's `PKCS5_PBKDF2_HMAC` does, and its test does not read the queue. [boykopovar/AnyPS5#16819](https://github.com/boykopovar/AnyPS5/pull/16819) (HKDF, open) queues `ERR_R_CRYPTO_LIB` after a failed `HMAC`, and its failing `HMAC` calls have no digest, or a negative key length on a new context, which still queue nothing, so its single-error checks hold. [boykopovar/AnyPS5#15514](https://github.com/boykopovar/AnyPS5/pull/15514) and [boykopovar/AnyPS5#15625](https://github.com/boykopovar/AnyPS5/pull/15625) (merged) call them only in tests that expect success, as does [boykopovar/AnyPS5#16258](https://github.com/boykopovar/AnyPS5/pull/16258). ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Windows 11 Pro 25H2 (build 26200.9711) with WSL2 Ubuntu 24.04.5 LTS, gcc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0, `-DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON`, full build of head `f685673242` (`main` `e8b1bd3d7f` merged in). No title or console. - `ctest --test-dir build -R "libressl|libre_ssl|crypto_memcmp|digest_extents|^public_headers$"`: 93 of 93 pass. These are all tests whose executables link or load libSceLibreSsl or libSceLibreSsl3, plus `public_headers`. - `guest_libressl_evp` asserts every code above with `ERR_get_error` and an empty queue afterwards, and that a non-null `EVP_MD_size` and `EVP_MD_CTX_create`'s failed allocation queue nothing. `guest_libressl_rsa_pss` now requires `EVP_R_MESSAGE_DIGEST_IS_NULL` alone for a null digest and `EVP_R_TOO_LARGE` alone for a 65-byte digest. Against `main`'s `Evp.cpp` they abort at lines 208 and 604. - Mutation check: turning each of the seven new `return Fail(...)` back into `return 0` fails `guest_libressl_evp` at that code's own assertion (`Evp.cpp` line → test line: 307 `NoDigestSet` → 289, 318 `MallocFailure` → 396, 337 `TooLarge` → 327, 353 `InputNotInitialized` → 355, 369 `MallocFailure` → 422, 406 `BadBlockLength` → 353, 412 `BadKeyLength` → 342). The `TooLarge` one also fails `guest_libressl_rsa_pss` at line 837, and leaving `EVP_MD_size(NULL)` without its error fails it at line 604. - `python3 tools/check_conventions.py --base origin/main`: all conventions checks passed. - `tools/pr_overlap.py --branch claude/zealous-brown-h1u67r` (2026-11-06): against `main` `e8b1bd3d7f` and the 1869 open PRs it reported seven adjacent debt-file conflicts and no shared exports or new files. It failed closed on 19 PRs that already conflict with `main`; merging each of them into `main` and into this branch gives the same conflicts. - 2026-11-07, merged into `main` `c06e4c075f` (same compiler and options, test targets only): the filter above selects 100 tests and all pass, and `main`'s `check_conventions.py` passes. With each of the five libSceLibreSsl3 PRs above merged on top as well, the filter and their new tests (`guest_libressl3_pbkdf2`, `guest_libressl3_sha512_256`, `guest_libressl3_hkdf`, `guest_libressl3_hmac_context`) pass; [boykopovar/AnyPS5#16535](https://github.com/boykopovar/AnyPS5/pull/16535) extends `guest_libressl3_digest` instead, and [boykopovar/AnyPS5#15514](https://github.com/boykopovar/AnyPS5/pull/15514) was built with its debt-file conflict with `main` left in place. Each of the eight debt-file neighbours conflicts with that merge only in `docs/dev/debt/libSceLibreSsl.md`. - 2026-11-08, after [boykopovar/AnyPS5#15827](https://github.com/boykopovar/AnyPS5/pull/15827) merged: head `76432389fc` (`main` `f5fe807353` merged in; same compiler and options, test targets only): the filter above selects 107 tests and all pass, and `check_conventions.py --base upstream/main` passes. Against that head, the seven debt-file neighbours still conflict in `docs/dev/debt/libSceLibreSsl.md` only on adjacent lines, which a merge keeps from both sides, and the five libSceLibreSsl3 PRs conflict in the same files as they do with `main`. - 2026-11-10, after [boykopovar/AnyPS5#16719](https://github.com/boykopovar/AnyPS5/pull/16719) merged: head `9c1c7f233b` (`main` `c5488026ab` merged in; same compiler and options, test targets only): the filter above selects 128 tests and all pass, among them `guest_libressl_digest_verify`, `guest_libressl_digest_verify_allocator` and the tests of the four merged libSceLibreSsl3 PRs above (`guest_libressl3_pbkdf2`, `guest_libressl3_sha512_256`, `guest_libressl3_hmac_context`, `guest_libressl3_digest`). Putting back [boykopovar/AnyPS5#16719](https://github.com/boykopovar/AnyPS5/pull/16719)'s own `EVP_R_INPUT_NOT_INITIALIZED` in `EVP_DigestVerifyFinal` fails `guest_libressl_digest_verify` with "a context without a digest queues the input not initialized error". `check_conventions.py --base upstream/main` passes, and the head merges cleanly with `main` `b8194198cf`. Against that head, the six open debt-file neighbours conflict in `docs/dev/debt/libSceLibreSsl.md` only on adjacent lines, which a merge keeps from both sides, and [boykopovar/AnyPS5#11146](https://github.com/boykopovar/AnyPS5/pull/11146) and [boykopovar/AnyPS5#16819](https://github.com/boykopovar/AnyPS5/pull/16819) conflict in the same files as they do with `main`. - `ANYPS5_LIBRESSL_ORACLE` was not run. The reference behaviour comes from the LibreSSL sources linked above. ### 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: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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!16079
No description provided.