mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-08-07 08:39:28 +00:00
Look for rap file for network license
A network license should be the same as a local license, with the difference that a local license is only checked online once, while a network license is checked online on each boot. Since we don't check online anyway, the two should theoretically be identical for our purposes.
This commit is contained in:
parent
3f534b33ec
commit
6540393df5
2 changed files with 22 additions and 8 deletions
|
@ -714,15 +714,21 @@ bool extract_all_data(const fs::file* input, const fs::file* output, const char*
|
||||||
// Make sure we don't have an empty RIF key.
|
// Make sure we don't have an empty RIF key.
|
||||||
if (key == v128{})
|
if (key == v128{})
|
||||||
{
|
{
|
||||||
edat_log.error("EDAT: A valid RAP file is needed for this EDAT file!");
|
edat_log.error("EDAT: A valid RAP file is needed for this EDAT file! (local activation)");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ((NPD.license & 0x1) == 0x1) // Type 1: Use network activation.
|
else if ((NPD.license & 0x1) == 0x1) // Type 1: Use network activation.
|
||||||
{
|
{
|
||||||
edat_log.error("EDAT: Network license not supported!");
|
memcpy(&key, rifkey, 0x10);
|
||||||
|
|
||||||
|
// Make sure we don't have an empty RIF key.
|
||||||
|
if (key == v128{})
|
||||||
|
{
|
||||||
|
edat_log.error("EDAT: A valid RAP file is needed for this EDAT file! (network activation)");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (verbose)
|
if (verbose)
|
||||||
{
|
{
|
||||||
|
@ -916,13 +922,17 @@ bool EDATADecrypter::ReadHeader()
|
||||||
|
|
||||||
if (dec_key == v128{})
|
if (dec_key == v128{})
|
||||||
{
|
{
|
||||||
edat_log.warning("EDAT: Empty Dec key!");
|
edat_log.warning("EDAT: Empty Dec key for local actívation!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ((npdHeader.license & 0x1) == 0x1) // Type 1: Use network activation.
|
else if ((npdHeader.license & 0x1) == 0x1) // Type 1: Use network activation.
|
||||||
{
|
{
|
||||||
edat_log.error("EDAT: Network license not supported!");
|
dec_key = std::move(rif_key);
|
||||||
return false;
|
|
||||||
|
if (dec_key == v128{})
|
||||||
|
{
|
||||||
|
edat_log.warning("EDAT: Empty Dec key for network activation!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1111,10 +1111,14 @@ bool SELFDecrypter::DecryptNPDRM(u8 *metadata, u32 metadata_size)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctrl->npdrm.license == 1) // Network license.
|
if (ctrl->npdrm.license == 1) // Network license.
|
||||||
|
{
|
||||||
|
// Try to find a RAP file to get the key.
|
||||||
|
if (!GetKeyFromRap(ctrl->npdrm.content_id, npdrm_key))
|
||||||
{
|
{
|
||||||
self_log.error("SELF: Can't decrypt network NPDRM!");
|
self_log.error("SELF: Can't decrypt network NPDRM!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (ctrl->npdrm.license == 2) // Local license.
|
else if (ctrl->npdrm.license == 2) // Local license.
|
||||||
{
|
{
|
||||||
// Try to find a RAP file to get the key.
|
// Try to find a RAP file to get the key.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue