feat(libSceLibreSsl3): implement ASN.1 type teardown and ECDSA_SIG lifetime #15826
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15826"
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 fishingpvalues on 2026-11-04T18:06:31Z.
What
Implements four
libSceLibreSsl3exports that threwNotImplemented_nid_no_patch:ASN1_TYPE_free(whL1IRBxFZA) frees anASN1_TYPEby its type: an object through the0x01/0x04/0x08dynamic flags, a nestedV_ASN1_ANYvalue by recursing into its inner type, a string or other primitive through the string no-free flag0x10and a zeroed data release, a dynamic object with no data without a write or a throw (as LibreSSL's null-safefreezero), and a boolean or null value without touching the inline union. The 16-byte layout is declared asAsn1Typewith the type at offset 0, the union at offset 8 and a static assertion.ECDSA_SIG_new(R3NyckUcClU) allocates the 16-byte{ r, s }object with both components null, and queuesERR_R_MALLOC_FAILURE(65) through libSceLibreSsl when the guest heap refuses it.ECDSA_SIG_set0(xVv3qlSRldc) rejects a null component without mutation, frees the replaced BIGNUMs through libSceLibreSsl'sBN_free, installs the new pair and returns 1.ECDSA_SIG_free(HE-vihq-KKw), previously the unknown placeholderUnknown_HE_minus_vihq_minus_KKw, releases both components throughBN_freeand the 16-byte object; a null signature is a no-op.Semantics follow LibreSSL 4.0.0
a_type.c,tasn_fre.candecs_lib.c, pinned by the existing3rdparty/libressl-openbsdsubmodule. A null signature throws where LibreSSL dereferences it.docs/dev/debt/libSceLibreSsl3.mdloses the three named rows and the one NID-only row (138 to 134 callable exports, 128 to 125 named and 10 to 9 NID-only) and gains one entry for the unverified PS5 ABI and console behaviour.src/EcdsaSig.cppgains the helpers and four exports; newtests/EcdsaSigLifetime.cppis registered asguest_libressl3_ecdsa_sig_lifetime, and the four stubs leaveAdditionalExports.cppwhile the declarations gain their real signatures ininclude/Api.hpp. The branch was rebased onto currentmain4ab649f4d8(which had meanwhile addedECDSA_SIG_get0in the same files) and the inventory counts were recalculated there.Tested
Linux x86-64 (CachyOS, GCC 16.2.1), Release,
BUILD_TESTING=ON, basemain105c9e4d91:guest_libressl3_ecdsa_sig_lifetimecovers the 16-byte layouts, successful and failingECDSA_SIG_new, null-component and null-signature rejection, replacement ordering and freeing of the old BIGNUMs through a recording guest heap, destructor release, the object/string/boolean/null branches ofASN1_TYPE_free, a nestedV_ASN1_ANYvalue, a dynamic object with null data, zeroed data release and the error queue.guest_libressl3_ecdsa_sigstill passes.ctest --test-dir build -R '^guest_libressl3_ecdsa_sig_lifetime$' --output-on-failure: 1/1 passed;guest_ampr_cpp_errorandguest_libc_internal_exception_destructorsalso pass on the same tree.python3 tools/check_conventions.py --base origin/main: passed.python3 tools/pr_overlap.py --branch pr-15826 --jobs 4: exit 2 only because it cannot confirm sharedAdditionalExports.cpp/Api.hpp/debt files from conflicting PR heads; it reports no same exports.Checklist
main; no other open PR implements these exportsNotImplemented_nid_no_patch).mdfiles or images added to the repository