diff --git a/rpcs3/Crypto/unedat.cpp b/rpcs3/Crypto/unedat.cpp index 0929319060..78116e402d 100644 --- a/rpcs3/Crypto/unedat.cpp +++ b/rpcs3/Crypto/unedat.cpp @@ -714,14 +714,20 @@ bool extract_all_data(const fs::file* input, const fs::file* output, const char* // 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!"); + edat_log.error("EDAT: A valid RAP file is needed for this EDAT file! (local activation)"); return 1; } } else if ((NPD.license & 0x1) == 0x1) // Type 1: Use network activation. { - edat_log.error("EDAT: Network license not supported!"); - return 1; + 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; + } } if (verbose) @@ -916,13 +922,17 @@ bool EDATADecrypter::ReadHeader() 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. { - edat_log.error("EDAT: Network license not supported!"); - return false; + dec_key = std::move(rif_key); + + if (dec_key == v128{}) + { + edat_log.warning("EDAT: Empty Dec key for network activation!"); + } } } diff --git a/rpcs3/Crypto/unself.cpp b/rpcs3/Crypto/unself.cpp index 0c6ae80bad..3cd6fc0180 100644 --- a/rpcs3/Crypto/unself.cpp +++ b/rpcs3/Crypto/unself.cpp @@ -1112,8 +1112,12 @@ bool SELFDecrypter::DecryptNPDRM(u8 *metadata, u32 metadata_size) if (ctrl->npdrm.license == 1) // Network license. { - self_log.error("SELF: Can't decrypt network NPDRM!"); - return false; + // 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!"); + return false; + } } else if (ctrl->npdrm.license == 2) // Local license. {