feat(libSceLibreSsl): implement BN_print #15480
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15480"
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-11-03T14:44:51Z.
What
Implements
BN_printin libSceLibreSsl. It was the lastBN_export left throwing, kept back in #9446 because there was noBIOyet; the memoryBIOis onmainnow.It follows LibreSSL 2.5.4
bn_print.c:-for a negativeBIGNUM, then0whentopis 0, so a negative zero prints-0;BIO_writeper character, returning 0 on the first write that does not write 1 byte, and 1 otherwise.A null
BIGNUMthrows, like the otherBN_calls; LibreSSL dereferences it. A nullBIOreturns 0, asBIO_writedoes there.The debt entry drops the sentence saying
BN_printthrows, and the pending count goes down by one.Tested
GuestLibreSslBn:0,-1A,00F, a two-limb value, a 128-bit value, a non-normalizedBIGNUMwhose top limb is zero, a negative zero, a read-onlyBIOand a nullBIO. The expected strings and return values come from a small program linked against the LibreSSL 2.5.4libcrypto.abuilt by the oracle.libressl|crypto_memcmptests pass on Linux. Not run on Windows or macOS.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