feat(libSceNpEntitlementAccess): report signed out from the consumable entitlement requests #8646
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8646"
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 nikowolf123 on 2026-10-20T20:04:02Z.
What
sceNpEntitlementAccessRequestConsumeEntitlement,sceNpEntitlementAccessRequestConsumableEntitlementInfoandsceNpEntitlementAccessPollConsumableEntitlementInfothrewnot implemented. There is no PSN sign-in, so they now give the signed-out answer that the library's other entitlement requests and polls already give (the consume calls since #292 and #763, the entitlement info calls since #2077 and #3603):sceNpEntitlementAccessRequestConsumeEntitlement(userId, serviceLabel, entitlementLabel, transactionId, useCount, requestId)returnsSCE_NP_ERROR_SIGNED_OUT(0x80550006) and does not write*requestId.sceNpEntitlementAccessRequestConsumableEntitlementInfo(userId, serviceLabel, entitlementLabel, requestId)returns0x80550006and does not write*requestId.sceNpEntitlementAccessPollConsumableEntitlementInfo(requestId, result, info)returns0x80550006and writes neither*resultnor*info.The answer is the same for every argument, null pointers included: no argument is read and there is no state.
Sources, pinned:
scenpentitlementaccess_exports.cppL146-L220, a replacement libSceNpEntitlementAccess PRX built against the SDK header (dlc_content.hL13 includesnp/np_entitlement_access.h). idlesauce's ps4-eboot-dlc-patcher, L185-L254 marks its lists for the same three functions as "parameters assumed" and differs in two parameters: aSceNpServiceEntitlementLabel*in the consume request and anint32_t* useLimitas the poll's third argument. Those two are declaredconst void*andvoid*, as is the transaction id (sceNpEntitlementAccessGenerateTransactionIdalready takes it asvoid*); nothing reads them.SCE_NP_ERROR_SIGNED_OUT = 0x80550006: shadPS4np_error.hL15. The constant was already defined inExport.cpp.Unverified, recorded in
docs/dev/debt/libSceNpEntitlementAccess.md:sceNpEntitlementAccessRequestConsumeUnifiedEntitlement"returns ok even offline" and thatsceNpEntitlementAccessPollConsumeEntitlementreports0x817D0019(TITLE_TOKENin their header, L83).requestIdcheck both sources make (their parameter error,0x817D0002in idlesauce's header, L81). It is not made here because its order against the signed-out failure is unknown.sceNpEntitlementAccessGetAddcontEntitlementInfoIndividualas having no credible prototype now names only that function.Nothing here is measured on a PS5.
Tested
libSceNpEntitlementAccessandguest_offline_imports_testswith no warnings, then ranctest -R '^guest_offline_imports$':guest_offline_importspassed (1/1). Again at17934e157onmain2c4b116da: passed (1/1).guest_offline_importsnow calls the three functions with valid-looking arguments (user 1, service label 0, a unified entitlement label, a zeroed 72-byte transaction id, use count 1) and with null pointers, requires0x80550006from every call, and checks that the request id, the result and a 64-byte info buffer keep their fill values.main: with only the test file changed, the same build and ctest run aborts at the first new call withsceNpEntitlementAccessRequestConsumeEntitlement not implemented.tools/check_conventions.py --base origin/mainpasses.tools/progress.py --module libSceNpEntitlementAccesscounts the three functions as done: 24 of 25 (21 of 25 onmain).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 ycbuzi on 2026-10-21T06:58:30Z.
Windows run of 1f53254d46 merged onto
mainec7eacc62d(d2f1758db6, clean), the build the description lists as not done. Windows 11 Home 10.0.26200, MinGW-w64 GCC 15.2.0 (ucrt-posix-seh r7), Release,BUILD_TESTING=ON.Built
libSceNpEntitlementAccessandguest_offline_imports_testswith no errors or warnings;ctest --repeat until-fail:2onguest_offline_imports: passes on both repeats. Not run: the negative control againstmain's library, a title.Imported from boykopovar/AnyPS5. Originally posted by harisibrar1 on 2026-10-24T15:32:43Z.
Review: COMMENTED
Checked against main
b607bfdc8b, dlc_emu fcf69b16 (scenpentitlementaccess_exports.cppL145-220) and idlesauce d1d1e0f0 (libSceNpEntitlementAccess.cL185-290):sceNpEntitlementAccessRequestConsumeUnifiedEntitlement"returns ok even offline". That's PS4 and offline rather than PS5 signed out, so it isn't conclusive, but it suggests the request may succeed and the poll fail.core/libs/tests/GuestOfflineImports.cpp, where the test prelude now uses typed signatures. Main also types transaction ids asNpEntitlementAccessTransactionId(Export.cpp:135, :144, :149; SceTypes.hpp:1520), so theconst void*reasoning no longer applies to the transaction id.Reviewed with AI assistance (Claude Code); the checks above were run locally on my machine.