feat(libressl): implement X509 extension getters #10078

Merged
atharvjairath merged 1 commit from upstream-pr/10078 into main 2026-11-02 08:00:02 +00:00
atharvjairath commented 2026-10-23 08:40:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by atharvjairath on 2026-10-23T08:40:32Z.


What

Implement X509_EXTENSION_get_critical, X509_EXTENSION_get_data and X509_EXTENSION_get_object in libSceLibreSsl. Callers can read an extension's critical flag and borrowed ASN.1 object/data pointers instead of hitting unsupported-export exceptions. Null extensions return zero/null; the critical flag is true only for a positive signed 32-bit value, so the upstream default -1 remains false. Pointer values are returned unchanged without decoding, copying or taking ownership.

The contract follows LibreSSL 2.5.4 x509_v3.c and the 24-byte LP64 layout in x509.h. The implementation reads only the requested field, using fixed-width critical storage and byte copies to avoid aliasing assumptions. Published firmware 13.40 measurements identify this module as LibreSSL 2.5.4. These getters and this layout have not been independently measured on a console; that limitation is recorded in the existing debt file.

The progress scanner counts three additional completed functions on the same main baseline (main: 103/401; this PR: 106/401), corresponding exactly to these three exported getters. Its denominator includes helper callbacks, so 401 is not an export inventory or a compatibility measure. The actual unsupported-export block contains 287 exports, recounted from source against main's 290. Main's implementations and partial implementations are not attributed to this PR.

Landing status: Based on main ba627802e2210187d417deb64c8f2fed8e33011f, with no open prerequisites. This refresh resolves the debt-document conflict while preserving every main entry and the unchanged getter debt; actual unsupported exports are main 290, this branch 287. Every own production/API/CMake/fixture addition and deletion is unchanged from prior head fd8bf3b3911eec664d7a0ca190d353c9bb49a05c. Main's complete source, canonical APIs, registrations and expanded fixtures remain intact, including GeneralName disposal, object creation/cleanup, protocol selection and the later LibreSSL3 getters/verification-parameter changes. The earlier pending-count review remains addressed.

The public-header review is addressed by replacing the three extension getter placeholders in include/Api.hpp with their documented signatures. The fixture uses the public umbrella header without duplicate local declarations. Main now provides the canonical cipher declarations. Getter bodies and regression assertions are unchanged.

Tested

Exact tested head ca7fd1e8e58c41d543783572737609cc7c3029d0, parent/main base ba627802e2210187d417deb64c8f2fed8e33011f, tree 26a224078f3a55c62b460134df6c5f7b2d9d6dda. Recovery ref backup/pr-10078-before-general-name-refresh-20261101-1750 preserves prior remote fd8bf3b3911eec664d7a0ca190d353c9bb49a05c. Both author and committer are atharvjairath <[email protected]>.

  • Linux x86-64, Ubuntu 24.04/GCC 13.3 Release under native ARM QEMU 11.0.3: 39/39 passed, 2.62 s.
  • Windows x86-64, WinLibs GCC 15.2 UCRT Release through Wine 9/QEMU 11.0.3: 33/39 passed, 211.27 s. The same six previously recorded Wine cases fail or time out. Current signatures: guest_libressl_ui: 0xc000001d/liblibc.dll+0xd2f49; guest_libressl_ex_data: St12system_error/guest_libressl_ex_data_tests.exe+0x9758; guest_libressl_x509_store_context: 0xc000001d/liblibc.dll+0xd2f49; guest_libressl_x509_store: 0xc000001d/liblibc.dll+0xd2f49; guest_libressl_x509_verify_param: 0xc000001d/liblibc.dll+0xd2f49; guest_libressl_x509_lookup: 0xc000001d/liblibc.dll+0xd2f49.
  • A freshly rebuilt complete LibreSSL DLL from the exact main base above, including GeneralName disposal, object creation/cleanup and protocol selection but excluding these getters, reproduces all six failures with the same rebuilt libc/mbedcrypto and unchanged executables. All five primary libc fault offsets and the ExData exception/offset match. Wine loader traces confirm that each control loaded the separate main DLL. These are focused Wine limitations, not proof of native Windows behavior.
  • Complete real libc, LibreSSL and LibreSSL3 libraries were rebuilt on both targets. All 39 registrations and emulators were verified. This matrix includes the five newer upstream fixtures for GeneralName disposal and LibreSSL3 PKEY, digest-context, cipher and verification-parameter behavior. The getters, protocol-selection and object-creation/allocation cases, and every case outside the six limitations pass on both targets. Object allocation reports 18 fast cases, 153 allocation-fault cases and 803 checks, with zero failures, escaped exceptions or live allocations on both targets. The 1,100 extension cases and cipher alias/full-width-ID assertions are unchanged. The separately packaged protocol NID fixture and whole-product packaging were not run by this focused harness.
  • After-commit conventions, whitespace checks and the public-header audit pass (399 libraries, 26,227 exports). The canonical LibreSSL umbrella compiles standalone, included twice, with Linux C++20 and -Werror. Main's PRIVATE cxx_std_23 requirement for object allocation is retained. No source, assertion or gate was weakened.
  • The exact tools/pr_overlap.py --branch feat/libressl-x509-extension-getters CLI returned 2, requiring manual comparison of base-conflicted peers; this is not an automated pass. All 41 external report peers were independently verified OPEN/current, with complete full/shared patches and all merge bases retained. Twenty-one shared payloads match the previously reviewed baseline, fifteen more change only pending counts, and the remaining five shared changes were manually reviewed. Distinct additions cover cipher block size, algorithm/configuration setup/cleanup and object-to-NID conversion, plus debt corrections. No independent duplicate of the three getters or open prerequisite was found; no unmerged implementation was imported. Broader non-shared peer changes and firmware/runtime claims were not independently validated.

JUnit, full logs, manifests, main-control results and artifact hashes are retained in /private/tmp/anyps5-monitor-20261101-1002/extension. The external Wine manifest retains APS5_NO_WRITE_WATCH=1 only for guest_libressl_runtime and guest_libressl_asn1; all other cases and controls use defaults. No new runtime switch or workaround was added. Historical default-Wine runtime/ASN.1 and mutation controls were not rerun. Diagnostics from passing cases remain in the logs and are separate from failed-case signatures.

Source/merge scope: The tested parent retains all earlier main unions and the new GeneralName, LibreSSL3, CES, shared libc and build/tool changes. Relevant source/API/CMake/fixture/debt and shared build/tool changes were reviewed; other main paths received path-level scope review only. Shared libc was rebuilt for this focused matrix, not an all-libc or whole-project run. The default-OFF oracle was not enabled, downloaded or run.

Historical native Windows CI: Previous head fd8bf3b3911eec664d7a0ca190d353c9bb49a05c integrated with main 73f4f7e06e4f210a8c6570e335fd654dc0a86134 passed the changed-guest runtime step in Windows job 124551771359. All 37 LibreSSL-related registrations explicitly passed, including the getter fixture and six cases that fail under local Wine. The complete result was 1,629 passed, 894 skipped, zero failed (2,523 rows, 129.37 s). This is evidence for that older pinned integration, not native Windows verification of the refreshed head or proof that the local Wine failures are fixed. Separate full-build/runtime/skip-audit steps were skipped.

Both owned patches also merge cleanly with later observed main 500b0252ec8c8800d35f77219d45e8c21d32ada2, preserving all own changes. The later root CMake change adds a shader-scan tool test; progress-tool changes add shader reporting and leave library counting unchanged. Other later UserService/NKWebKit/workflow/docs/tool paths received scope-only review. These checks do not extend the pinned runtime coverage.

Separate firmware report: BunnyFl reports testing firmware 13.42's library in an emulator. Offset-marker inputs produced object/data reads at 0/16, a signed critical field at 8 with critical > 0, and null results for null extensions in two runs. This agrees with this implementation. It is attributed emulated-library evidence, not independent hardware validation here or a review approval.

Separate contributor evidence: benjaminmathias reports native Windows validation of previous extension head cb6734063f5fd3f4d7612eea44fff5749fbe4454, including cipher 0390178ba06a360f4c4799725bf0699e3a3c4916, integrated with main 16ff208dc32cf3927ba1bae492eee363a5ae7ae8. On Windows 11 Pro with WinLibs GCC 15.2 UCRT, the runtime, ASN.1 conversion, ASN.1 allocator, cipher and extension tests each passed three repetitions with APS5_NO_WRITE_WATCH unset. The report also records failing main-library controls for the two getter fixtures and passing results after restoring the candidate library. This is attributed evidence for those test paths on that pinned integration, not independent reproduction here, approval, or native validation of the refreshed head above. Logs and hashes are retained by the contributor.

The refreshed tree has not been run on native Windows here. Whole-project, title and PS5 console validation were not performed; console layout and ABI limitations remain. Full upstream product CI requires maintainer dispatch.

Focused runtime build recipe

Use this CMake project outside the checkout, with repository-pinned ZArchive, zstd and mbedTLS checkouts under its 3rdparty/ directory (mbedTLS 068ff080b369adfac81509f9b57b2afabaf82dc5, including its pinned framework submodule):

cmake_minimum_required(VERSION 3.20)
project(ExtensionValidation LANGUAGES CXX)
enable_testing()
set(CMAKE_CXX_STANDARD 20)
set(BUILD_TESTING ON)
set(ANYPS5_SOURCE_ROOT /src CACHE PATH "AnyPS5 source checkout")
set(LIBS_INCLUDE_DIR ${ANYPS5_SOURCE_ROOT}/core/libs)
set(ANYPS5_TEST_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/tests)
set(ANYPS5_WINDOWS_TEST_EXIT ${ANYPS5_SOURCE_ROOT}/cmake/WindowsTestExit.cpp)
add_compile_options(-ffunction-sections -fdata-sections)
add_link_options(-Wl,--gc-sections)
function(add_test_executable target)
    add_executable(${target} ${ARGN})
    set_target_properties(${target} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "$<1:${ANYPS5_TEST_OUTPUT_DIRECTORY}>")
    if(MINGW)
        target_sources(${target} PRIVATE "${ANYPS5_WINDOWS_TEST_EXIT}")
        target_link_options(${target} PRIVATE LINKER:--wrap=main)
    endif()
endfunction()
function(add_asan_test_options test options)
    if(ANYPS5_ENABLE_ASAN)
        set_property(TEST ${test} APPEND PROPERTY ENVIRONMENT_MODIFICATION "ASAN_OPTIONS=string_append::${options}")
    endif()
endfunction()
function(configure_windows_unwind target)
    if(MINGW)
        if(NOT EXISTS "${CMAKE_OBJCOPY}")
            message(FATAL_ERROR "Windows DWARF unwinding requires objcopy")
        endif()
        add_custom_command(TARGET ${target} POST_BUILD
                COMMAND "${CMAKE_OBJCOPY}" --rename-section .eh_frame=.ehfram --rename-section .eh_fram=.ehfram "$<TARGET_FILE:${target}>"
                VERBATIM
        )
    endif()
endfunction()
if(MINGW)
    add_compile_options(-fno-asynchronous-unwind-tables)
endif()
include(${ANYPS5_SOURCE_ROOT}/cmake/ZArchive.cmake)
set(BUILD_TESTING OFF)
add_library(libc SHARED)
add_subdirectory(${ANYPS5_SOURCE_ROOT}/core/libs/prx/libc libc)
configure_windows_unwind(libc)
if(WIN32)
    target_compile_options(libc PRIVATE "SHELL:-include \"${LIBS_INCLUDE_DIR}/prx/libc/include/HostStandardStreams.hpp\"")
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
    target_link_options(libc PRIVATE LINKER:-z,now)
    target_link_options(libc INTERFACE LINKER:--no-as-needed)
endif()
add_subdirectory(${ANYPS5_SOURCE_ROOT}/core/libs/prx/libSceSsl ssl)
set(BUILD_TESTING ON)
add_subdirectory(${ANYPS5_SOURCE_ROOT}/core/libs/prx/libSceLibreSsl libressl)
add_subdirectory(${ANYPS5_SOURCE_ROOT}/core/libs/prx/libSceLibreSsl3 libressl3)
foreach(target IN ITEMS libSceLibreSsl libSceLibreSsl3)
    target_link_libraries(${target} PUBLIC libc)
    if(WIN32)
        target_compile_options(${target} PRIVATE "SHELL:-include \"${LIBS_INCLUDE_DIR}/prx/libc/include/HostStandardStreams.hpp\"")
    endif()
endforeach()

target_sources(libSceLibreSsl PRIVATE ${ANYPS5_SOURCE_ROOT}/core/libs/prx/libSceLibreSsl/src/ProtocolSelection.cpp)
add_test_executable(guest_libressl_protocol_tests ${LIBS_INCLUDE_DIR}/tests/GuestLibreSslProtocol.cpp)
target_include_directories(guest_libressl_protocol_tests PRIVATE ${LIBS_INCLUDE_DIR})
target_link_libraries(guest_libressl_protocol_tests PRIVATE ${CMAKE_DL_LIBS})
if(WIN32)
    target_link_libraries(guest_libressl_protocol_tests PRIVATE libc)
endif()
add_dependencies(guest_libressl_protocol_tests libSceLibreSsl)
configure_windows_unwind(guest_libressl_protocol_tests)
add_test(NAME guest_libressl_protocol COMMAND guest_libressl_protocol_tests $<TARGET_FILE:libSceLibreSsl> SSL_select_next_proto_nid_postfix)
set_tests_properties(guest_libressl_protocol PROPERTIES TIMEOUT 30)

Configure with -DANYPS5_SOURCE_ROOT=<checkout> -DCMAKE_BUILD_TYPE=Release, build, then run ctest --test-dir <build> --output-on-failure. Linux in this environment sets CMAKE_CROSSCOMPILING_EMULATOR to the native ARM QEMU 11.0.3 x86-64 binary; omit this on native x86-64 Linux. Windows builds use WinLibs GCC 15.2.0 UCRT r7 and compile serially under Wine. The actual Windows executables run through QEMU/Wine with WINELOADERNOEXEC=1, WINEPREFIX=/build/wine, and WINEPATH containing the build directory, both LibreSSL DLL directories and WinLibs bin.

For the reported Wine run, the external Windows CTest manifest additionally sets ENVIRONMENT "APS5_NO_WRITE_WATCH=1" only on guest_libressl_runtime and guest_libressl_asn1, because Wine page write watching faults in this environment. The separate contributor report above covers those default native Windows paths on its pinned earlier integration; the refreshed head has not been tested natively on Windows here.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4980142663 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10078). Originally posted by [atharvjairath](https://github.com/atharvjairath) on 2026-10-23T08:40:32Z. --- ### What Implement `X509_EXTENSION_get_critical`, `X509_EXTENSION_get_data` and `X509_EXTENSION_get_object` in libSceLibreSsl. Callers can read an extension's critical flag and borrowed ASN.1 object/data pointers instead of hitting unsupported-export exceptions. Null extensions return zero/null; the critical flag is true only for a positive signed 32-bit value, so the upstream default `-1` remains false. Pointer values are returned unchanged without decoding, copying or taking ownership. The contract follows [LibreSSL 2.5.4 x509_v3.c](https://github.com/libressl/openbsd/blob/2e2c612066aa993717528a0249c15c51128d61cb/src/lib/libcrypto/x509/x509_v3.c#L273-L299) and the 24-byte LP64 layout in [x509.h](https://github.com/libressl/openbsd/blob/2e2c612066aa993717528a0249c15c51128d61cb/src/lib/libcrypto/x509/x509.h#L196-L201). The implementation reads only the requested field, using fixed-width critical storage and byte copies to avoid aliasing assumptions. [Published firmware 13.40 measurements](https://github.com/boykopovar/AnyPS5/discussions/8981#discussioncomment-19111214) identify this module as LibreSSL 2.5.4. These getters and this layout have not been independently measured on a console; that limitation is recorded in the existing debt file. The progress scanner counts **three additional completed functions** on the same main baseline (main: 103/401; this PR: 106/401), corresponding exactly to these three exported getters. Its denominator includes helper callbacks, so 401 is not an export inventory or a compatibility measure. The actual unsupported-export block contains **287 exports**, recounted from source against main's 290. Main's implementations and partial implementations are not attributed to this PR. **Landing status:** Based on main `ba627802e2210187d417deb64c8f2fed8e33011f`, with no open prerequisites. This refresh resolves the debt-document conflict while preserving every main entry and the unchanged getter debt; actual unsupported exports are main 290, this branch 287. Every own production/API/CMake/fixture addition and deletion is unchanged from prior head `fd8bf3b3911eec664d7a0ca190d353c9bb49a05c`. Main's complete source, canonical APIs, registrations and expanded fixtures remain intact, including GeneralName disposal, object creation/cleanup, protocol selection and the later LibreSSL3 getters/verification-parameter changes. The earlier [pending-count review](https://github.com/boykopovar/AnyPS5/pull/10078#issuecomment-6465988457) remains addressed. The [public-header review](https://github.com/boykopovar/AnyPS5/pull/10078#issuecomment-6391391621) is addressed by replacing the three extension getter placeholders in `include/Api.hpp` with their documented signatures. The fixture uses the public umbrella header without duplicate local declarations. Main now provides the canonical cipher declarations. Getter bodies and regression assertions are unchanged. ### Tested Exact tested head `ca7fd1e8e58c41d543783572737609cc7c3029d0`, parent/main base `ba627802e2210187d417deb64c8f2fed8e33011f`, tree `26a224078f3a55c62b460134df6c5f7b2d9d6dda`. Recovery ref `backup/pr-10078-before-general-name-refresh-20261101-1750` preserves prior remote `fd8bf3b3911eec664d7a0ca190d353c9bb49a05c`. Both author and committer are `atharvjairath <54663702+[email protected]>`. - Linux x86-64, Ubuntu 24.04/GCC 13.3 Release under native ARM QEMU 11.0.3: **39/39 passed**, 2.62 s. - Windows x86-64, WinLibs GCC 15.2 UCRT Release through Wine 9/QEMU 11.0.3: **33/39 passed**, 211.27 s. The same six previously recorded Wine cases fail or time out. Current signatures: `guest_libressl_ui`: `0xc000001d/liblibc.dll+0xd2f49`; `guest_libressl_ex_data`: `St12system_error/guest_libressl_ex_data_tests.exe+0x9758`; `guest_libressl_x509_store_context`: `0xc000001d/liblibc.dll+0xd2f49`; `guest_libressl_x509_store`: `0xc000001d/liblibc.dll+0xd2f49`; `guest_libressl_x509_verify_param`: `0xc000001d/liblibc.dll+0xd2f49`; `guest_libressl_x509_lookup`: `0xc000001d/liblibc.dll+0xd2f49`. - A freshly rebuilt complete LibreSSL DLL from the exact main base above, including GeneralName disposal, object creation/cleanup and protocol selection but excluding these getters, **reproduces all six failures** with the same rebuilt libc/mbedcrypto and unchanged executables. All five primary libc fault offsets and the ExData exception/offset match. Wine loader traces confirm that each control loaded the separate main DLL. These are focused Wine limitations, not proof of native Windows behavior. - Complete real libc, LibreSSL and LibreSSL3 libraries were rebuilt on both targets. All **39** registrations and emulators were verified. This matrix includes the five newer upstream fixtures for GeneralName disposal and LibreSSL3 PKEY, digest-context, cipher and verification-parameter behavior. The getters, protocol-selection and object-creation/allocation cases, and every case outside the six limitations pass on both targets. Object allocation reports 18 fast cases, 153 allocation-fault cases and 803 checks, with zero failures, escaped exceptions or live allocations on both targets. The 1,100 extension cases and cipher alias/full-width-ID assertions are unchanged. The separately packaged protocol NID fixture and whole-product packaging were not run by this focused harness. - After-commit conventions, whitespace checks and the public-header audit pass (**399 libraries, 26,227 exports**). The canonical LibreSSL umbrella compiles standalone, included twice, with Linux C++20 and `-Werror`. Main's PRIVATE `cxx_std_23` requirement for object allocation is retained. No source, assertion or gate was weakened. - The exact `tools/pr_overlap.py --branch feat/libressl-x509-extension-getters` CLI returned **2**, requiring manual comparison of base-conflicted peers; this is not an automated pass. All **41 external report peers** were independently verified OPEN/current, with complete full/shared patches and all merge bases retained. Twenty-one shared payloads match the previously reviewed baseline, fifteen more change only pending counts, and the remaining five shared changes were manually reviewed. Distinct additions cover cipher block size, algorithm/configuration setup/cleanup and object-to-NID conversion, plus debt corrections. No independent duplicate of the three getters or open prerequisite was found; no unmerged implementation was imported. Broader non-shared peer changes and firmware/runtime claims were not independently validated. JUnit, full logs, manifests, main-control results and artifact hashes are retained in `/private/tmp/anyps5-monitor-20261101-1002/extension`. The external Wine manifest retains `APS5_NO_WRITE_WATCH=1` only for `guest_libressl_runtime` and `guest_libressl_asn1`; all other cases and controls use defaults. No new runtime switch or workaround was added. Historical default-Wine runtime/ASN.1 and mutation controls were not rerun. Diagnostics from passing cases remain in the logs and are separate from failed-case signatures. **Source/merge scope:** The tested parent retains all earlier main unions and the new GeneralName, LibreSSL3, CES, shared libc and build/tool changes. Relevant source/API/CMake/fixture/debt and shared build/tool changes were reviewed; other main paths received path-level scope review only. Shared libc was rebuilt for this focused matrix, not an all-libc or whole-project run. The default-OFF oracle was not enabled, downloaded or run. **Historical native Windows CI:** Previous head `fd8bf3b3911eec664d7a0ca190d353c9bb49a05c` integrated with main `73f4f7e06e4f210a8c6570e335fd654dc0a86134` passed the changed-guest runtime step in [Windows job 124551771359](https://github.com/boykopovar/AnyPS5/actions/runs/41206231370/job/124551771359). All 37 LibreSSL-related registrations explicitly passed, including the getter fixture and six cases that fail under local Wine. The complete result was 1,629 passed, 894 skipped, zero failed (2,523 rows, 129.37 s). This is evidence for that older pinned integration, not native Windows verification of the refreshed head or proof that the local Wine failures are fixed. Separate full-build/runtime/skip-audit steps were skipped. Both owned patches also merge cleanly with later observed main `500b0252ec8c8800d35f77219d45e8c21d32ada2`, preserving all own changes. The later root CMake change adds a shader-scan tool test; progress-tool changes add shader reporting and leave library counting unchanged. Other later UserService/NKWebKit/workflow/docs/tool paths received scope-only review. These checks do not extend the pinned runtime coverage. **Separate firmware report:** [BunnyFl reports testing firmware 13.42's library in an emulator](https://github.com/boykopovar/AnyPS5/pull/10078#issuecomment-6402431176). Offset-marker inputs produced object/data reads at 0/16, a signed critical field at 8 with `critical > 0`, and null results for null extensions in two runs. This agrees with this implementation. It is attributed emulated-library evidence, not independent hardware validation here or a review approval. **Separate contributor evidence:** [benjaminmathias reports native Windows validation](https://github.com/boykopovar/AnyPS5/pull/10078#issuecomment-6397203467) of previous extension head `cb6734063f5fd3f4d7612eea44fff5749fbe4454`, including cipher `0390178ba06a360f4c4799725bf0699e3a3c4916`, integrated with main `16ff208dc32cf3927ba1bae492eee363a5ae7ae8`. On Windows 11 Pro with WinLibs GCC 15.2 UCRT, the runtime, ASN.1 conversion, ASN.1 allocator, cipher and extension tests each passed three repetitions with `APS5_NO_WRITE_WATCH` unset. The report also records failing main-library controls for the two getter fixtures and passing results after restoring the candidate library. This is attributed evidence for those test paths on that pinned integration, not independent reproduction here, approval, or native validation of the refreshed head above. Logs and hashes are retained by the contributor. The refreshed tree has not been run on native Windows here. Whole-project, title and PS5 console validation were not performed; console layout and ABI limitations remain. Full upstream product CI requires maintainer dispatch. <details> <summary>Focused runtime build recipe</summary> Use this CMake project outside the checkout, with repository-pinned ZArchive, zstd and mbedTLS checkouts under its `3rdparty/` directory (mbedTLS `068ff080b369adfac81509f9b57b2afabaf82dc5`, including its pinned framework submodule): ```cmake cmake_minimum_required(VERSION 3.20) project(ExtensionValidation LANGUAGES CXX) enable_testing() set(CMAKE_CXX_STANDARD 20) set(BUILD_TESTING ON) set(ANYPS5_SOURCE_ROOT /src CACHE PATH "AnyPS5 source checkout") set(LIBS_INCLUDE_DIR ${ANYPS5_SOURCE_ROOT}/core/libs) set(ANYPS5_TEST_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/tests) set(ANYPS5_WINDOWS_TEST_EXIT ${ANYPS5_SOURCE_ROOT}/cmake/WindowsTestExit.cpp) add_compile_options(-ffunction-sections -fdata-sections) add_link_options(-Wl,--gc-sections) function(add_test_executable target) add_executable(${target} ${ARGN}) set_target_properties(${target} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "$<1:${ANYPS5_TEST_OUTPUT_DIRECTORY}>") if(MINGW) target_sources(${target} PRIVATE "${ANYPS5_WINDOWS_TEST_EXIT}") target_link_options(${target} PRIVATE LINKER:--wrap=main) endif() endfunction() function(add_asan_test_options test options) if(ANYPS5_ENABLE_ASAN) set_property(TEST ${test} APPEND PROPERTY ENVIRONMENT_MODIFICATION "ASAN_OPTIONS=string_append::${options}") endif() endfunction() function(configure_windows_unwind target) if(MINGW) if(NOT EXISTS "${CMAKE_OBJCOPY}") message(FATAL_ERROR "Windows DWARF unwinding requires objcopy") endif() add_custom_command(TARGET ${target} POST_BUILD COMMAND "${CMAKE_OBJCOPY}" --rename-section .eh_frame=.ehfram --rename-section .eh_fram=.ehfram "$<TARGET_FILE:${target}>" VERBATIM ) endif() endfunction() if(MINGW) add_compile_options(-fno-asynchronous-unwind-tables) endif() include(${ANYPS5_SOURCE_ROOT}/cmake/ZArchive.cmake) set(BUILD_TESTING OFF) add_library(libc SHARED) add_subdirectory(${ANYPS5_SOURCE_ROOT}/core/libs/prx/libc libc) configure_windows_unwind(libc) if(WIN32) target_compile_options(libc PRIVATE "SHELL:-include \"${LIBS_INCLUDE_DIR}/prx/libc/include/HostStandardStreams.hpp\"") endif() if(CMAKE_SYSTEM_NAME STREQUAL "Linux") target_link_options(libc PRIVATE LINKER:-z,now) target_link_options(libc INTERFACE LINKER:--no-as-needed) endif() add_subdirectory(${ANYPS5_SOURCE_ROOT}/core/libs/prx/libSceSsl ssl) set(BUILD_TESTING ON) add_subdirectory(${ANYPS5_SOURCE_ROOT}/core/libs/prx/libSceLibreSsl libressl) add_subdirectory(${ANYPS5_SOURCE_ROOT}/core/libs/prx/libSceLibreSsl3 libressl3) foreach(target IN ITEMS libSceLibreSsl libSceLibreSsl3) target_link_libraries(${target} PUBLIC libc) if(WIN32) target_compile_options(${target} PRIVATE "SHELL:-include \"${LIBS_INCLUDE_DIR}/prx/libc/include/HostStandardStreams.hpp\"") endif() endforeach() target_sources(libSceLibreSsl PRIVATE ${ANYPS5_SOURCE_ROOT}/core/libs/prx/libSceLibreSsl/src/ProtocolSelection.cpp) add_test_executable(guest_libressl_protocol_tests ${LIBS_INCLUDE_DIR}/tests/GuestLibreSslProtocol.cpp) target_include_directories(guest_libressl_protocol_tests PRIVATE ${LIBS_INCLUDE_DIR}) target_link_libraries(guest_libressl_protocol_tests PRIVATE ${CMAKE_DL_LIBS}) if(WIN32) target_link_libraries(guest_libressl_protocol_tests PRIVATE libc) endif() add_dependencies(guest_libressl_protocol_tests libSceLibreSsl) configure_windows_unwind(guest_libressl_protocol_tests) add_test(NAME guest_libressl_protocol COMMAND guest_libressl_protocol_tests $<TARGET_FILE:libSceLibreSsl> SSL_select_next_proto_nid_postfix) set_tests_properties(guest_libressl_protocol PROPERTIES TIMEOUT 30) ``` Configure with `-DANYPS5_SOURCE_ROOT=<checkout> -DCMAKE_BUILD_TYPE=Release`, build, then run `ctest --test-dir <build> --output-on-failure`. Linux in this environment sets `CMAKE_CROSSCOMPILING_EMULATOR` to the native ARM QEMU 11.0.3 x86-64 binary; omit this on native x86-64 Linux. Windows builds use WinLibs GCC 15.2.0 UCRT r7 and compile serially under Wine. The actual Windows executables run through QEMU/Wine with `WINELOADERNOEXEC=1`, `WINEPREFIX=/build/wine`, and `WINEPATH` containing the build directory, both LibreSSL DLL directories and WinLibs bin. For the reported Wine run, the external Windows CTest manifest additionally sets `ENVIRONMENT "APS5_NO_WRITE_WATCH=1"` only on `guest_libressl_runtime` and `guest_libressl_asn1`, because Wine page write watching faults in this environment. The separate contributor report above covers those default native Windows paths on its pinned earlier integration; the refreshed head has not been tested natively on Windows here. </details> <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none <!-- #PR, or none --> - [x] Fixes: none <!-- issue it closes as Fixes #N, or none --> - [x] Unblocks: none <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> - [x] GPUs tested: n/a <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> - [x] AI-assisted: yes <!-- yes / no -->
MarcZX10 commented 2026-10-23 13:13:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-23T13:13:39Z.

Review: CHANGES_REQUESTED


Reviewed exact head abc991925908a7b7fb695f21f89f0eee609d9977. The X509 getter implementation follows the cited LP64 layout using byte copies, preserves borrowed pointers, and the focused 1,100-case fixture exercises signed critical values, pointer preservation and non-mutation. The description reports exact-head Linux and Windows 6/6 runs and records that console validation is outstanding. Hosted eligibility, conventions, labels and report checks pass; hosted product jobs are path-skipped. I have not independently run the local test suite.\n\nOne contribution-rule item needs resolving before merge: a direct merge preview of this head with your open #10071 reports a content conflict in docs/dev/debt/libSceLibreSsl.md (both edit the same pending-export count and add a debt entry). Please coordinate which lands first, declare that order with Depends on, and make sure the second branch keeps both entries and the corrected count. This is a keep-both sequencing request; neither PR needs to be closed.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5628719155 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10078#pullrequestreview-5628719155). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-23T13:13:39Z. **Review:** CHANGES_REQUESTED --- Reviewed exact head `abc991925908a7b7fb695f21f89f0eee609d9977`. The X509 getter implementation follows the cited LP64 layout using byte copies, preserves borrowed pointers, and the focused 1,100-case fixture exercises signed critical values, pointer preservation and non-mutation. The description reports exact-head Linux and Windows 6/6 runs and records that console validation is outstanding. Hosted eligibility, conventions, labels and report checks pass; hosted product jobs are path-skipped. I have not independently run the local test suite.\n\nOne contribution-rule item needs resolving before merge: a direct merge preview of this head with your open #10071 reports a content conflict in `docs/dev/debt/libSceLibreSsl.md` (both edit the same pending-export count and add a debt entry). Please coordinate which lands first, declare that order with `Depends on`, and make sure the second branch keeps both entries and the corrected count. This is a keep-both sequencing request; neither PR needs to be closed.
MarcZX10 commented 2026-10-23 20:02:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-23T20:02:25Z.

Review: APPROVED


Reviewed exact head b0c5bea6437635b385edb3ba2f519048344e2b01, comparing the feature commit against its declared prerequisite #10071. The three getters follow the cited LibreSSL 2.5.4 layout and signed critical rule, preserve borrowed object/data pointers, and leave the extension bytes untouched; the focused test covers null inputs, signed boundaries, pointer preservation, and adjacent-byte canaries. The refreshed branch merges cleanly with #10071 (git merge-tree); the checklist now declares Depends on: #10071, matching the recorded landing order. Author-reported Linux and Windows focused runs pass, current hosted conventions/eligibility/labels/report pass, product jobs are path-skipped. I did not run the tests locally.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5633795648 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10078#pullrequestreview-5633795648). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-23T20:02:25Z. **Review:** APPROVED --- Reviewed exact head b0c5bea6437635b385edb3ba2f519048344e2b01, comparing the feature commit against its declared prerequisite #10071. The three getters follow the cited LibreSSL 2.5.4 layout and signed critical rule, preserve borrowed object/data pointers, and leave the extension bytes untouched; the focused test covers null inputs, signed boundaries, pointer preservation, and adjacent-byte canaries. The refreshed branch merges cleanly with #10071 (`git merge-tree`); the checklist now declares `Depends on: #10071`, matching the recorded landing order. Author-reported Linux and Windows focused runs pass, current hosted conventions/eligibility/labels/report pass, product jobs are path-skipped. I did not run the tests locally.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!10078
No description provided.