From 530aa2088bf6bd57b68c086957788c04767bed9c Mon Sep 17 00:00:00 2001 From: "john.maia" Date: Fri, 9 Oct 2026 07:56:44 +0100 Subject: [PATCH] feat(libSceNpEntitlementAccess): report signed out for entitlement info lists The unified and service entitlement info list requests and polls threw. They now return SCE_NP_ERROR_SIGNED_OUT, like the consume requests in the same library. Their signatures are unknown, so they stay declared without parameters. PPSA15657 calls the unified request during start-up and continues past the error. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_0134RWCyiyydJBbfKz8g9Bwe --- core/libs/prx/libSceNpEntitlementAccess/Export.cpp | 12 ++++-------- core/libs/tests/GuestOfflineImports.cpp | 10 ++++++++++ docs/dev/TechnicalDebt.md | 1 + 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/core/libs/prx/libSceNpEntitlementAccess/Export.cpp b/core/libs/prx/libSceNpEntitlementAccess/Export.cpp index 69b128037..0cb5f3dd0 100644 --- a/core/libs/prx/libSceNpEntitlementAccess/Export.cpp +++ b/core/libs/prx/libSceNpEntitlementAccess/Export.cpp @@ -160,23 +160,19 @@ int APS5_VABI sceNpEntitlementAccessGetPftFlag(void) { } int APS5_VABI sceNpEntitlementAccessPollServiceEntitlementInfoList() { - NotImplemented_nid_no_patch(__func__); - return 0; + return SCE_NP_ERROR_SIGNED_OUT; } int APS5_VABI sceNpEntitlementAccessPollUnifiedEntitlementInfoList() { - NotImplemented_nid_no_patch(__func__); - return 0; + return SCE_NP_ERROR_SIGNED_OUT; } int APS5_VABI sceNpEntitlementAccessRequestServiceEntitlementInfoList() { - NotImplemented_nid_no_patch(__func__); - return 0; + return SCE_NP_ERROR_SIGNED_OUT; } int APS5_VABI sceNpEntitlementAccessRequestUnifiedEntitlementInfoList() { - NotImplemented_nid_no_patch(__func__); - return 0; + return SCE_NP_ERROR_SIGNED_OUT; } } diff --git a/core/libs/tests/GuestOfflineImports.cpp b/core/libs/tests/GuestOfflineImports.cpp index c2c258810..99d3178f0 100644 --- a/core/libs/tests/GuestOfflineImports.cpp +++ b/core/libs/tests/GuestOfflineImports.cpp @@ -13,6 +13,10 @@ int APS5_VABI sceHttpSetCookieEnabled(int, int); int APS5_VABI sceHttpSendRequest(int, const void*, std::size_t); int APS5_VABI sceNpEntitlementAccessGetEntitlementKey( std::uint32_t, const NpUnifiedEntitlementLabel*, NpEntitlementAccessEntitlementKey*); +int APS5_VABI sceNpEntitlementAccessRequestUnifiedEntitlementInfoList(); +int APS5_VABI sceNpEntitlementAccessPollUnifiedEntitlementInfoList(); +int APS5_VABI sceNpEntitlementAccessRequestServiceEntitlementInfoList(); +int APS5_VABI sceNpEntitlementAccessPollServiceEntitlementInfoList(); int APS5_VABI sceRudpInit_nid_postfix(void*, int); int APS5_VABI sceRudpGetStatus(void*, std::size_t); int APS5_VABI sceRudpTerminate(); @@ -57,6 +61,12 @@ int main() { Require(std::memcmp(&output, original.data(), sizeof(output)) == 0); } + constexpr int signedOut = static_cast(0x80550006); + Require(sceNpEntitlementAccessRequestUnifiedEntitlementInfoList() == signedOut); + Require(sceNpEntitlementAccessPollUnifiedEntitlementInfoList() == signedOut); + Require(sceNpEntitlementAccessRequestServiceEntitlementInfoList() == signedOut); + Require(sceNpEntitlementAccessPollServiceEntitlementInfoList() == signedOut); + std::array status; status.fill(0x5a); const auto originalStatus = status; diff --git a/docs/dev/TechnicalDebt.md b/docs/dev/TechnicalDebt.md index 81b674366..344d082d2 100644 --- a/docs/dev/TechnicalDebt.md +++ b/docs/dev/TechnicalDebt.md @@ -39,6 +39,7 @@ Throughout the project, every function at every stage either **does exactly what ### Unknown function info - [sceNpEntitlementAccessGetEntitlementKey](../../core/libs/prx/libSceNpEntitlementAccess/Export.cpp) - the three-argument signature, 16-byte key and errors `0x817D0002`/`0x817D0007` follow [KytyPS5](https://github.com/KytyPS5/KytyPS5/blob/main/src/libs/libNet.cpp); PPSA01521 passes a service label, entitlement label and output pointer. Only the no-key path is implemented: local entitlement labels carry no keys, and the output is untouched on failure. Console error precedence and key provisioning are unverified +- [sceNpEntitlementAccess{Request,Poll}{Unified,Service}EntitlementInfoList](../../core/libs/prx/libSceNpEntitlementAccess/Export.cpp) - signatures unknown; no reference implements them, so they are declared without parameters. Like the consume requests in the same library, they report the signed-out NP state with `SCE_NP_ERROR_SIGNED_OUT` (`0x80550006`) and write nothing. PPSA15657 calls the unified request during start-up and continues past the error. Whether the console fails at the request or at the poll when signed out is unverified - [sceRudpGetStatus](../../core/libs/prx/libSceRudp/Export.cpp) - PPSA01521 passes an output pointer and byte count `0xF8`; the status layout, size rules and error behavior are unknown. The export throws without writing output, including after initialization. [shadPS4](https://github.com/shadps4-emu/shadPS4/blob/main/src/core/libraries/rudp/rudp.cpp) declares it without arguments and returns success without writing status - [sceHttpSetCookieEnabled](../../core/libs/prx/libSceHttp/Export.cpp) - the two-argument signature and 0/1 enable values follow [VitaSDK](https://github.com/vitasdk/vita-headers/blob/master/include/psp2/net/http.h) and [shadPS4](https://github.com/shadps4-emu/shadPS4/blob/main/src/core/libraries/network/http.cpp); PPSA01521 passes 0 to disable cookies. Disabling succeeds because the offline HTTP backend has no cookie engine; enabling throws. Invalid enable values use the same error as `sceHttpSetInflateGZIPEnabled`. Like the existing offline HTTP setters, the handle is not validated; requests still fail with the network error. Console behavior is unverified