feat(libSceLibreSsl3): implement cipher context flags #15163
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15163"
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 lost9409 on 2026-11-02T19:35:43Z.
What
Implements
EVP_CIPHER_CTX_set_flagsinlibSceLibreSsl3, replacing its throwing placeholder with a typedvoidfunction.The function accumulates flags without clearing existing bits. The signed 32-bit argument is converted to the guest's unsigned 64-bit flag field before OR, following LibreSSL's operation:
github.com/libressl/openbsd@ce488b78e0/src/lib/libcrypto/evp/evp_cipher.cThis uses the existing parent
LibreSslEvpCipherCtxlayout, whose flags are at offset 112, because this module forwards its context constructors to the parent library. It does not assume LibreSSL 4.0.0's different context layout. Console layout and behavior remain unverified and are documented in technical debt. Null contexts throwstd::invalid_argument.Tests cover zero and repeated masks, accumulation, negative masks, preservation of existing high bits, unchanged neighboring bytes and null rejection. This does not implement additional cipher algorithms.
Tested
Tested head:
c2195d12e9849ac90ea432750e32f0967a0a7d04.Rebased onto main commit:
e8b9749c0bea648e02e57f6530378dce5d1113ac.Windows 11, WinLibs GCC 15.2.0, CMake/Ninja, Release, BUILD_TESTING=ON:
guest_libressl3_cipher_tests.guest_libressl3_cipher: 1/1 passed; test 0.03 s, total 1.11 s.python tools/check_conventions.py --base HEAD~1: 0 errors, one debt-length warning (1829 characters).git diff --check HEAD~1 HEADpassed; working tree clean before push.The rebase preserves main's ERR_print_errors_cb and PKCS#8 implementations, SSL_CIPHER_get_id and its tests. The duplicate pending-export paragraph was removed, and the current count was changed from 14 to 13.
No Linux build, console execution, title execution or full-suite validation is claimed for this head.
Overlap review
The previous scan and manual shared-file review are recorded in:
https://github.com/boykopovar/AnyPS5/pull/15163#issuecomment-6876194732
PR #19535 landed first; this head is rebased after it and preserves its changes. No dependency on an unmerged PR has been identified. A fresh open-PR search for EVP_CIPHER_CTX_set_flags returned only this PR.
The earlier manual review is not a combined integration test with all remaining open PRs. Shared-file reconciliation may still be necessary as those branches evolve. This PR remains a draft pending final checks.
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)Historical d64c8e1f5a CTest log
Historical pre-rebase CTest log
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T07:07:01Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this change; the points below are optional.
What I ran
Reviewed head
c2195d12e9849ac90ea432750e32f0967a0a7d04. I readdescription.md,commits.md,manifest.json,diff.patch, and all five changed files:Export.cpp,include/Api.hpp,src/Cipher.cpp,tests/Cipher.cpp, anddocs/dev/debt/libSceLibreSsl3.md. The reader wasrepo_read.py.No commands or tests were run. The Windows test and convention-check results in the PR description are author-reported.
Results
Findings
Blocking
None.
Non-blocking
Not verified
No build, test, convention check, Linux run, console run, or title execution was performed. The full text of the five changed files was included and read;
files.jsonwas not present in the review bundle, so excluded files could not be checked independently. The manifest lists all changed files as included.To get this to a good state
Nothing is required. Optional: verify the context layout and behavior against the console when that environment is available.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T13:16:27Z.
Review: COMMENTED
Checked the branch sources and built the focused tests against the existing Linux runtime.
Cipherpassed, including the cipher-context flag checks.AI-assisted: yes.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.