Repository navigation
feat(libSceLibreSsl): implement OBJ_create and free added objects in OBJ_cleanup - #13562
Conversation
…OBJ_cleanup Port OBJ_create and a2d_ASN1_OBJECT from LibreSSL 2.5.4, keep the added objects by encoding and NID, and look them up in OBJ_obj2txt before the built-in table. OBJ_cleanup now drops them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
@JaceTheBlu Thanks, this matches LibreSSL 2.5.4's
|
|
Verified
Review items from @oneandonlydean (all three still open — head is unchanged since
Not approving — awaiting the maintainer's three requested changes. |
…J_create throws Take ownership before publishing an object, roll back the NID index if the encoding index cannot grow, and test every allocation failure. Keep the LibreSSL copyright notice of the ported code and drop the executable bit of ObjectCreate.cpp. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@oneandonlydean Thanks, all three are addressed in
The same notice was missing from my other LibreSSL PRs, so #13266, #13546, #13547 and #13285 now carry the matching headers: the OpenSSL licence for the |
|
Checked the three points from review against |
docs/dev/debt/libSceLibreSsl.md: the pending-exports line counts 286 named callable exports, the NotImplemented_nid_no_patch calls left in the merged Export.cpp after boykopovar#13562 implemented OBJ_create.
docs/dev/debt/libSceLibreSsl.md: the pending-exports line counts 281 named callable exports, the NotImplemented_nid_no_patch calls left in the merged Export.cpp after #13562 implemented OBJ_create.
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