Compare commits

...

2 Commits

Author SHA1 Message Date
David Korth 6d5b19a8a6 SubmitScreen.cpp: Zero an unused OTP area before hashing.
This should normally be zero anyway, but zero it again just in case.
2023-07-05 10:30:43 +02:00
David Korth a6efca8a74 SubmitScreen.cpp: Mention IDs; consolidate model and serial number to one line. 2023-07-05 10:30:33 +02:00
1 changed files with 4 additions and 3 deletions

View File

@ -81,14 +81,14 @@ const char desc[] =
"but personally identifying information will be kept confidential.\n"
"\n"
"Information that will be submitted:\n"
"\uff65 System model\n"
"\uff65 System serial number (excluding the last 3 digits)\n"
"\uff65 System model and serial number (excluding the last 3 digits)\n"
"\uff65 Manufacturing date\n"
"\uff65 Region information\n"
"\uff65 Security level (keyset), sataDevice, consoleType, BSP revision\n"
"\uff65 boardType, boardRevision, bootSource, ddr3Size, ddr3Speed, ddr3Vendor\n"
"\uff65 MLC manufacturer, revision, name, size, and CID\n"
"\uff65 Device certificate and SHA-256 hash of OTP (to prevent duplicates)\n"
"\uff64 MS, CA, NG, and NG key IDs\n"
"\n"
"Do you want to submit your console's system data?\n";
}
@ -174,7 +174,7 @@ size_t SubmitScreen::CurlWriteCallback(void* contents, size_t size, size_t nmemb
void SubmitScreen::SubmitSystemData()
{
const auto& otp = OTP::Get();
auto otp = OTP::Get();
const auto& seeprom = SEEPROM::Get();
WUT_ALIGNAS(0x40) MCPSysProdSettings sysProd{};
int32_t mcpHandle = MCP_Open();
@ -259,6 +259,7 @@ void SubmitScreen::SubmitSystemData()
// is fully contained within the MLC CID.
}
memset(&otp.miscBank, 0, 0x40);
if (Utils::SHA256(&otp, sizeof(otp), pd->otp_sha256, sizeof(pd->otp_sha256)) != 0) {
error = "Failed to hash otp data";
return;