feat(libSceLibreSsl3): implement EVP_MD_CTX_md #13663
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/13663"
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 alvaroelpob on 2026-10-30T22:14:53Z.
What
Implements
EVP_MD_CTX_mdin libSceLibreSsl3, an additional export (13.60 table) that threw and was declared without parameters.The signature
const EVP_MD* EVP_MD_CTX_md(const EVP_MD_CTX*)and the behaviour follow LibreSSL 4.0.0evp_digest.c: a null context returns null; otherwise it returns the context'sdigest.digestis the first field ofEVP_MD_CTXin 4.0.0'sevp_local.hand in the 2.5.4 layout of the contexts that the forwarded libSceLibreSslEVP_MD_CTX_*exports handle. The two layouts differ after it (2.5.4 hasengine), so the export reads only the first pointer and declares the context and digest asconst void*. This adds no second context struct beside the one #10960 proposes.The debt entry records the source and what is unverified. The additional-export inventory loses the function's row and its count drops from 180 to 179.
Tested
Ubuntu 26.04 (WSL2, kernel 6.18), GCC 15.2.0, Release, full build with
BUILD_TESTING=ONonmaind4de5943f6(3028/3028 pass).guest_libressl3_digest_contexttest: on 48-byte contexts filled with 0xA5 or zero,EVP_MD_CTX_mdreturns the pointer stored at offset 0, including null, and leaves the context unchanged. A null context returns null.ctest -j16on head339332c7ea: 3029/3029 pass.check_conventions.py --base upstream/mainpasses.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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-30T22:18:26Z.
Review: COMMENTED
Reviewed — approval withheld pending test-report clarification
The accessor matches the pinned LibreSSL implementation and both cited context layouts, but the PR’s test section both reports and denies a full-suite run on this head.
What I ran
Reviewed head
339332c7ea824536875fe7415236cbf142384386against base9605300f293b88295e223a27ff8cfecf24d7ab2a; the individual merge preview is clean. Environment: Debian Linux x86-64, Python 3.11.2; GCC 12.2.0 available but not invoked. No build or C++ test was run locally.For the declared integration order, I also applied
gh pr diffpatches for #13659, then #13662, to a temporary worktree at the base usinggit apply --3way. #13662 conflicted inCMakeLists.txtanddocs/dev/debt/libSceLibreSsl3.md. I did not resolve those conflicts or claim a complete three-PR integration test.Results
EVP_MD_CTX_md_nid_postfixdeclaration and definition map to NIDH1dRCduUy+o.DigestContext.cpp; this is a false positive.339332c7ea, then says the full suite on this branch is “not tested yet.” I did not independently run those tests.Unedited outputs from checks
git diff --checkproduced no output and exited 0.Negative control
I did not build a test binary or run a local negative control. The author’s reported baseline and PR runs are not independently reproduced here.
Findings
Blocking
No implementation defect was confirmed. I am withholding approval until the contradictory test report is clarified; the submitted text does not establish unambiguously whether the claimed 3029-case run covered this head.
Non-blocking
The declared dependency order is clear, but the sequential patch check found conflicts in shared files when #13662 follows #13659. This is an integration refresh to revisit after its prerequisites land, not a request to rebase prematurely.
Sources
Not verified
No local build or runtime test was run. The hosted jobs were queued at the final check snapshot. The author-reported CTest result was not independently verified, and the full three-PR landing sequence was not simulated beyond the reported #13659 → #13662 patch conflict.
To get this to a good state
Please clarify whether
ctest -j16ran on head339332c7ea824536875fe7415236cbf142384386, remove or correct the contradictory “Not tested yet” line, and preserve the exact head and command in the report. After #13659 and #13662 land and the branch is refreshed, rerun the relevant checks on the resulting head; I will reassess that update.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-30T23:11:06Z.
Review: APPROVED
Reviewed — looks good
The exact change matches the pinned LibreSSL implementation and both cited context layouts; I found no blocking issue in the current head.
What I ran
Head
339332c7ea824536875fe7415236cbf142384386; PR base9605300f293b88295e223a27ff8cfecf24d7ab2a. The isolated merge preview was clean against currentmaine9a33a703b3c0d1bd65e4dee7ec608428d62a5f0. Environment: Linux x86_64, Python 3.11.2; no compiler was invoked.The diff, conventions/template check, direct ABI audit (passed, no findings), and individual merge preview passed. The precheck aggregate reported failures because its isolated checkout does not contain the workspace-only audit helpers; I ran the ABI audit directly. Its test-quality helper was unavailable in that checkout, so I manually checked
CMakeLists.txtand confirmed the target and CTest registration. Hosted Windows and policy checks pass; Linux and specialized jobs were skipped. The author reports a full 3,029-test CTest pass on the head; I did not independently run it.Sources
EVP_MD_CTX_mdand context layout.digestfield is shared, while later fields differ.Not verified
I did not build locally, run CTest, or test a title/console. The stack checker identifies the declared landing order
#13659 → #13662 → #13663; it checked each PR separately against currentmain, not the combined sequence. The debt entry records that the PS5 context layout has not been measured directly.