feat(libSceLibreSsl): implement OBJ_create and free added objects in OBJ_cleanup #13562
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/13562"
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 JaceTheBlu on 2026-10-30T18:22:23Z.
What
Implements
OBJ_createin libSceLibreSsl and makesOBJ_cleanup, until now an empty stub, free what it adds.OBJ_obj2txt(behindi2t_ASN1_OBJECT) now names added objects.The new
src/ObjectCreate.cppfollows LibreSSL 2.5.4obj_dat.c:OBJ_createparses the dotted text with a port ofa2d_ASN1_OBJECT(a_object.c):1., adds nothing and queues nothing.NUM_NID).OBJ_add_object. The latest object with a given encoding wins.ObjectText.cppfollowOBJ_obj2nidandOBJ_nid2ln/OBJ_nid2sn:OBJ_R_UNKNOWN_NID; before that, and afterOBJ_cleanup, it queues nothing.OBJ_cleanupdrops every added object and the table, but keeps the NID counter.The
OBJ_cleanuppart of the silent-stub entry and thei2t_ASN1_OBJECTentry are updated, and there is a new entry indocs/dev/debt/libSceLibreSsl.md. The pending count goes from 293 to 292.Remaining differences from LibreSSL:
ERR_R_MALLOC_FAILURE.OBJ_cleanupis never deferred.check_deferonly fires for ciphers or digests with an added NID, and no export registers one.OBJ_sn2nid,OBJ_ln2nid) are not kept, since no export reads them yet.Tested
Debian container, GCC 14.2, full Release build of head
50527ff1d6:ctest -R 'libressl|crypto_memcmp'passes 34 of 34.tools/check_test_registration.pyandpython3 tools/check_conventions.py --base upstream/mainpass.guest_libressl_object_textchecks:OBJ_cleanup;commonNameoverriding the table;OBJ_R_UNKNOWN_NIDqueue before and afterOBJ_cleanup;OBJ_cleanuprestores built-in names.guest_libressl_oracle(ANYPS5_LIBRESSL_ORACLE) now also runs 20,000 rounds ofOBJ_createon both implementations, with an occasionalOBJ_cleanupon both. Each round uses:After each call it compares the result and the error queue. It then compares
i2t_ASN1_OBJECT, with random buffer sizes, on four objects drawn from built-in and created encodings, some with a preset NID around the end of the table. The 20,000 rounds show no difference. The only differences the oracle reports are the 6AES_set_*_keycases already described in the debt file.Not tested on Windows, on a title or on a console.
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)🤖 Generated with Claude Code