Currently, DigestMiddleware reads the game's user-agent to determine whether to use PS3 or PS4 digest keys/hashing algorithm. However, this will no longer work once we start to verify that the game has a Patchwork user-agent. Also, although it is an emulator bug, ShadPS4 doesn't set the game's user-agent to what DigestMiddleware expects.
While we could fix these issues without touching the middleware, it might be more reliable if we just check whether the user token's TokenPlatform is set to PS4 instead. The middleware already fetches the token for other things, so we can also use it to easily fix this issue.
Currently,
DigestMiddlewarereads the game's user-agent to determine whether to use PS3 or PS4 digest keys/hashing algorithm. However, this will no longer work once we start to verify that the game has a Patchwork user-agent. Also, although it is an emulator bug, ShadPS4 doesn't set the game's user-agent to whatDigestMiddlewareexpects.While we could fix these issues without touching the middleware, it might be more reliable if we just check whether the user token's
TokenPlatformis set toPS4instead. The middleware already fetches the token for other things, so we can also use it to easily fix this issue.