feat(libSceLibreSsl): implement the OCSP status and reason strings #9949
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9949"
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 wrocketdev on 2026-10-22T23:34:13Z.
What
Implements
OCSP_response_status_str,OCSP_cert_status_strandOCSP_crl_reason_strin libSceLibreSsl. Each one maps a 64-bitlongcode to a static string, using the tables in LibreSSL's ocsp_prn.c. These tables have not changed from revision 1.8 (2015) to 1.12 (2025), so the module's unknown LibreSSL version does not matter here. A value that is not in a table returns(UNKNOWN), as LibreSSL'stable2stringdoes. The three stubs are removed fromExport.cpp, and the gap (strings not measured on the console) is recorded indocs/dev/debt/libSceLibreSsl.md.Tested
macOS 26 arm64 (AppleClang,
-std=c++20 -Wall -Wextra -Werror): builtsrc/Ocsp.cppwith the newGuestLibreSslOcsp.cpptest, natively and outside the CMake tree. It passes: every code of each table, the gaps (response 4, reason 7), negative values, values above 32 bits and theint64limits. The full x86-64 Linux/Windows build andctestwere not run on this machine.tools/check_conventions.py --base origin/mainpasses.tools/pr_overlap.pyreports no shared exports; the only conflict is the pending-export count line in the debt file, which every open libSceLibreSsl PR edits.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
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T23:36:26Z.
Review: APPROVED
Reviewed the complete diff against the cited LibreSSL OCSP tables and behavior. The three mappings, gaps (response status 4 and CRL reason 7), and fallback match the reference. I compiled the submitted and with g++ 12 in C++20 mode using and ran the focused test successfully. The PR's conventions, intake, and labels checks also pass; full hosted Linux/Windows jobs are not present under the repository's PR workflow policy.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T23:36:49Z.
Review: APPROVED
Clarification on my review note: I compiled the submitted Ocsp.cpp and GuestLibreSslOcsp.cpp with g++ 12 using C++20, -Wall, -Wextra, and -Werror, then ran the resulting focused OCSP test successfully. The OCSP mappings and unknown-value behavior match the cited LibreSSL implementation.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-23T00:29:18Z.
Review: APPROVED
Reviewed the table mappings, signed 64-bit interface, unknown-value behavior, test coverage, and overlap report. The mappings match the cited LibreSSL OCSP tables; missing codes and out-of-range values return
(UNKNOWN). I independently compiled the exact-headOcsp.cppandGuestLibreSslOcsp.cppwith GCC 12.2 using-std=c++20 -Wall -Wextra -Werror, then ran the resulting test executable successfully. The author’s macOS test also covers each table code and 64-bit boundaries. Hosted conventions/intake/labels checks pass; full Linux/Windows product builds were not run. Approved at head 0a6d367787643c41a3b2ffa5c47e8946c1bc30f8.Imported from boykopovar/AnyPS5. Originally posted by ahmadmuj on 2026-10-25T18:47:02Z.
Review: APPROVED
Reviewed head
00843ba7d261merged onto maina7a2eece499e(clean merge-tree), Linux x86_64, GCC 13.3.What I ran:
src/Ocsp.cppunchanged next toOCSP_*_strfrom a 2.5.4libcrypto.a, compared the strings for every value in -100000..100000, each 2^k / -2^k with low bits 0..9, INT64_MIN/MAX neighbours, random high words over low codes 0..9, and 10M random int64s. 10,211,577 values per function, 0 mismatches. Only 0-3,5,6 / 0-2 / 0-6,8 give a non-(UNKNOWN)string on both sides, so the gaps at response 4 and reason 7 are right.ctest -R "guest_libressl|^public_headers", 76/76 pass,guest_libressl_ocspincluded.tools/check_conventions.py --base mainpasses.TableToStringcompare only the low 32 bits.guest_libressl_ocspthen aborts onOCSP_response_status_str(4294967296), so the test catches alongtruncated toint.Sources: tables and
table2string(long, ...)in 2.5.4ocsp_prn.c(rev 1.8) and the codes inocsp.h. The pending-export count is 342 in both Export.cpp and the debt line after the merge (345 on main).No findings. Not checked: anything on a console or with a real title, and the claim in the debt entry that ocsp_prn.c is unchanged up to rev 1.12.