feat(libressl3): implement ASN.1 object header parsing #14465
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14465"
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 Ninot1Quyi on 2026-11-01T14:43:21Z.
What
Implement the previously throwing
ASN1_get_objectexport in libSceLibreSsl3, using the existing bounded BER identifier/length readers. Valid headers advance the input cursor and return the tag, class, length and constructed/indefinite flags. A truncated payload still returns its decoded header with the error flag; malformed headers reset the outputs without advancing the cursor. Errors enter the existing parent-library queue.The behavior reference is LibreSSL 4.0.0, pinned to OpenBSD commit
ce488b78e0bd994780569df718596b9776ff681a. The new code is independently written and reuses project code; no third-party sources were copied. Console ABI/error-queue sharing is unverified and documented, as are exceptions for negative bounds and faulting null arguments. The existing integer decoder behavior is unchanged.Based on main
f1a7b02028ae50adaf6c5aaaef892a51841b25bf. No dependency on the separate ASN1_TIME_diff candidate.Tested
Linux x86-64:
guest_libressl3_CTests passed, including the new object-header test linked to the real guest libraries (0.01 seconds), and the existing ASN.1 integer decoder regression.detect_leaks=0. The focused link discards unrelated unused exports; the full build/CTest above validates integration.Overlap audit: all 1,669 open PRs were scanned. The checker exited 2 because 11 shared branches could not merge with main. The 22 shared heads were unchanged from the earlier full manual audit; the additional shared IntegerDecoder.cpp patch in #14292 was read in full and only changes d2i fault exceptions. No same export or same new test exists. Debt text overlaps mechanically with #14292 and #14366; this implementation does not depend on them.
The complete CTest suite, LSan, PS5/title behavior and Windows/macOS were not tested. Upstream CI has not run for this unpublished candidate. No CI conditions were changed.
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 CnRJay on 2026-11-01T19:47:03Z.
Review: COMMENTED
Withdrawn. This review applied a title-ID/log requirement that is not in CONTRIBUTING (
Unblocks: noneis allowed), and it contained no code review.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-02T05:50:26Z.
Review: COMMENTED
Reviewed — no blocking findings
This replaces the
ASN1_get_objectstub with a BER header parser: identifier, length (short, long and indefinite forms), and the constructed, indefinite and too-long flags. The Windows CTest run was cancelled, so nothing ran for this head. The helpers advance the input span by reference, so the caller's pointer moves past the header. The error codes and the test follow the rules in the debt entry. The test was read, not run.What I ran
1a0d0b71e512fc129344d5ed8fc2fd5301eafe21; based8b60b46ed425b117b6fae18900fe6ab81ed6661. 6 files, +142/-8:src/IntegerDecoder.cpp(+34),tests/ObjectHeader.cpp(+94, new),CMakeLists.txt(+10, newguest_libressl3_object_headertest),include/Api.hpp(declaration with five parameters),AdditionalExports.cpp(stub removed),docs/dev/debt/libSceLibreSsl3.md(+6/-2).ASN1_get_object_nid_postfix, theReadIdentifierandReadLengthhelpers it calls, and the new test in full, plus the debt diff and the declaration.windowsis cancelled, so there is no CTest result for this head. Linux and the relinker jobs are skipped.Results
Api.hppand inIntegerDecoder.cpp*inputmoves past the header)ReadIdentifierandReadLengthtake the span by referenceguest_libressl3_object_header(hosted)Read-only check output
Precheck was not run: no PR-head code is run here. Diff check: passed. Conventions: passed. ABI audit: passed (270 symbols). Stack check: passed. Hosted:
gh api repos/boykopovar/AnyPS5/commits/1a0d0b71e512fc129344d5ed8fc2fd5301eafe21/check-runs.Negative control
Not run here. A negative control needs a build, and code from this head is not run here.
Findings
Blocking
None.
Non-blocking
Sources
github.com/boykopovar/AnyPS5@1a0d0b71e5/core/libs/prx/libSceLibreSsl3/src/IntegerDecoder.cppgithub.com/boykopovar/AnyPS5@1a0d0b71e5/core/libs/prx/libSceLibreSsl3/tests/ObjectHeader.cppgithub.com/boykopovar/AnyPS5@1a0d0b71e5/core/libs/prx/libSceLibreSsl3/CMakeLists.txtgithub.com/boykopovar/AnyPS5@1a0d0b71e5/docs/dev/debt/libSceLibreSsl3.mdNot verified
To get this to a good state
guest_libressl3_object_headeron Windows and Linux would settle the test result. Recounting the export list would make the debt counts checkable.