feat(libSceLibreSsl): implement BN_print #16242
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/16242"
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 nabil88 on 2026-11-05T22:35:21Z.
What
BN_printin libSceLibreSsl threw throughNotImplemented_nid_no_patch. It now writes the uppercase hexadecimal form with no leading zeros, as LibreSSL 2.5.4bn_print.cdoes, returning 0 when a write fails. A null BIGNUM or BIO throws, where LibreSSL dereferences it. The console behavior is not verified.Tested
Windows, WinLibs GCC 15.2.0, Release,
BUILD_TESTING=ON:ctest --test-dir build-full -R "guest_libressl_bn"passesguest_libressl_bn, including the new zero, leading-zero, negative and wide-value print checks.python tools/check_conventions.py --base origin/mainpasses.pr_overlapreports no overlap with any open pull request.Not tested on a console; the behavior follows the public LibreSSL source, unverified against the 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)Imported from boykopovar/AnyPS5. Originally posted by ahmadmuj on 2026-11-06T09:01:12Z.
Review: COMMENTED
Head
08d6b9b2ca5c3fc3cd76dda3516ffecfc9513755, PR based9d067f4e0b1025b099d6fe83ad8cae1826d6260. Linux:guest_libressl_bnpasses. A separate probe links the actuallibSceLibreSslmodule. Its negative-zero case fails, passes with a temporary BN_print-only sign correction, then fails after restoration. Other zero, negative-one, positive and wide controls pass throughout.At
Bignum.cpp:320,loaded.negloses a valid zero sign. Native LibreSSL 2.5.4BN_hex2bn("-0")createstop=0, neg=1;BN_printreturns 1 and writes exactly two bytes,-0. Using the public guestBignumdeclaration with live limb storage, this head returns 1 but writes one byte,0. Both probes check exact bytes, length, return and unchanged input. Could BN_print read the original sign instead of the arithmetic-normalized sign from Load?This head's own BN_hex2bn normalizes
-0to unsigned zero, so that parser cannot supply the failing input. The probe constructs the source-supported state directly. This is a source compatibility finding, not a console or security claim. Current-main integration is checked for a clean merge only; runtime evidence is from the exact head.Pull request closed