feat(libSceLibreSsl): implement X509_NAME_get_index_by_NID and X509_NAME_get_text_by_NID #11129
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/11129"
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 ahmadmuj on 2026-10-25T19:01:33Z.
What
Implements
X509_NAME_get_index_by_NIDandX509_NAME_get_text_by_NIDon #10477's layout. Both compare OID bytes, so decoded objects with a zero NID work.The supported subset contains
NID_undef, X.520 attributes, emailAddress, domainComponent and userId. It follows LibreSSL 2.5.4 x509name.c.Other NIDs throw. Main now supports
OBJ_create, so returning -2 or -1 for every dynamic NID gives false lookup failures. This update makes that unsupported path fail explicitly. It adds no dynamic lookup support.The branch includes current main and #10477's current head. The debt file records the subset and unsupported inputs. No new exports are added in this update.
Tested
Ubuntu 24.04 on WSL2, GCC 13.3, Release. Head
bbab30d94893merges main6e6dae4e8b8cand #104776bf0609603b2.X509Name.cppand its test remain byte-identical to the previous published head. The test retains static lookup and dynamic-object checks.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 MarcZX10 on 2026-10-25T19:03:24Z.
Review: APPROVED
Reviewed the change against LibreSSL 2.5.4
x509name.c:get_index_by_NIDdelegates to object lookup and index search, whileget_text_by_NIDreturns the full value length for a null buffer and otherwise copies at mostlen - 1bytes and terminates when the count is nonnegative. The implementation compares decoded OID length and bytes, matchingOBJ_cmpbehavior for DER-decoded entries. The supported attribute OID subset and the conservative unsupported-NID behavior are recorded in the debt entry; tests cover source-derived return values, buffer contents, last-position handling, and table rows. I verified the pinned source paths and the posted test report; hosted eligibility, conventions, intake, labels and progress-report checks pass. Build jobs are skipped for this library-only PR, and the PR reports targeted LibreSSL tests plus a real 2.5.4 differential run.