feat(libSceLibreSsl3): implement ASN1_OBJECT_free #10461
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10461"
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 MarcZX10 on 2026-10-24T01:45:46Z.
What
Implements
ASN1_OBJECT_freein libSceLibreSsl3. The 40-byte object layout and ownership flags follow LibreSSL 4.0.0asn1_local.hand itsa_object.cfree routine.ASN1_OBJECT_FLAG_DYNAMIC_STRINGSfrees the short and long names.ASN1_OBJECT_FLAG_DYNAMIC_DATAsecurely clears and frees OID data through the guest libc heap, then clears the data pointer and length.ASN1_OBJECT_FLAG_DYNAMICfrees the object itself.The export and guest-heap behavior are not verified on a PS5. The debt file records that limitation. The PR overlap check found shared CMake/debt edits with #9970 and #10452, but no duplicate export. It could not compare #9959 because that branch conflicts with main; I inspected it manually and confirmed it changes only wide libc formatting files. This PR depends on #9970 and #10452 for the shared-file merge order.
Tested
-Wall -Wextra -Werror: compiled the production source and focused test; passed.-std=c++20 -Wall -Wextra -Werror -fsyntax-only: production source and test compiled.python3 tools/check_conventions.py --base upstream/main: passed.git diff --check upstream/main...HEAD: passed.The focused direct build uses test shims for guest
freeandmemset_s; it does not exercise the complete project runtime. A full project build and console test were not run because third-party submodules are uninitialized in this checkout.Checklist
main; no other open PR implements the same functionNotImplemented_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 harisibrar1 on 2026-10-24T05:38:20Z.
Review: APPROVED
Checked against main
7c2400d29band LibreSSL 4.0.0 (a_object.c/asn1_local.hat ce488b78):ASN1_OBJECT_freematches upstream lines 94-110 step for step: names, then data, then the object. The flag values (0x01/0x04/0x08) and the 40-byte layout matchasn1_local.h:74-80, and static OBJ-table objects are left alone because they have no DYNAMIC flag.free_nid_postfixand wiping throughmemset_s_nid_postfixfollows the same pattern libSceLibreSsl'sCRYPTO_freealready uses. Throwing on a negative length before anything is freed seems better than upstream's huge(size_t)wipe.OBJ_txt2objin this module still throws, so nothing can produce a dynamic object yet. Whoever implements it will need to allocate the object, names and data withmalloc_nid_postfixso they pair with this free. That might be worth a few words in the debt entry.Reviewed with AI assistance (Claude Code); the checks above were run locally on my machine.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-02T04:57:29Z.
Review: COMMENTED
Reviewed — Windows link fix confirmed at head
The fix-up the reviewer pushed is present at this head: the test target links libc before configure_windows_unwind, and the hosted Windows check passed.
What I ran
Results
Findings
Sources
github.com/boykopovar/AnyPS5@b8eea742e3/core/libs/prx/libSceLibreSsl3/CMakeLists.txt (L7-L10)Not verified