feat(libSceLibreSsl3): accept NULL in PKCS7_free, PKCS8_PRIV_KEY_INFO_free and OCSP_CERTID_free #16111
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/16111"
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 MarrasFederico on 2026-11-05T17:31:28Z.
What
PKCS7_free,PKCS8_PRIV_KEY_INFO_freeandOCSP_CERTID_freein libSceLibreSsl3 threw for every call, NULL included. Cleanup code usually calls these on pointers that may still be NULL. In LibreSSL 4.0.0 each one isASN1_item_free, which returns at once for NULL.All three now return without action for NULL. A non-null object still throws: this module has no constructor for these types (
d2i_PKCS7,d2i_PKCS8_PRIV_KEY_INFO_bioandOCSP_cert_to_idare unimplemented), so no such object can be released correctly yet.Export.cpptosrc/Asn1Free.cppwithvoid (void*)signatures, as in LibreSSL.Not measured on a console.
Tested
Ubuntu 26.04.1, kernel 7.0.0, GCC 15.2.0, Release,
BUILD_TESTING=ON, on main6e6dae4e8b. Windows and macOS were not compiled here. No title was run.guest_libressl3_asn1_freepasses: each function returns for NULL without throwing. All 14 LibreSSL3 tests pass.(void)declarations, and the placeholders throw.check_conventions.py --base upstream/mainpasses.pr_overlap.py: several open LibreSSL3 PRs (#15631, #15737, #15758, #15760, #15761, #15765, #15770, #15899) and my #15599 and #15601 touch the same CMake, header and pending-export lines; none implements these three functions (searched by name in open PRs).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)Pull request closed