Commit graph

80 commits

Author SHA1 Message Date
Megamouse 18983f5476 Fix warnings: Remove unused decryption code 2024-02-28 14:25:20 +01:00
Eladash 34e945128f Crypto\EDATA: Optimize decrypt_block to avoid an allocation 2024-02-14 15:11:52 +02:00
Eladash 883f2e92ae EDATA: Add more logging 2024-02-14 15:11:52 +02:00
Eladash ed66e9e9b9 Fix EDATADecrypter::ReadData 2024-02-14 15:11:52 +02:00
Eladash 40c51a1f05 Crypto/unedat.cpp: remove extract_all_data 2024-02-05 21:56:04 +02:00
Eladash a6c2e995af Crypto/PKG installer: Fix potential RAM shortage when extracing EDAT files 2024-02-05 21:56:04 +02:00
Eladash 596e671973 Crypto/sys_fs: Fix potential RAM shortage in NPDRM decryption
Previous code was structured very naively: if 8GB read is requested, it would allocate 8GB of memory. Without considering recycling memory for each block.
2024-02-05 21:56:04 +02:00
Eladash d38b2eb8ef Crypto/sys_fs: Remove some seek operations 2024-02-05 21:56:04 +02:00
Megamouse 59c58aa3cf fix some warnings 2023-12-30 19:07:35 +01:00
Eladash 90b6f5613e Fix some warnings 2023-12-19 15:34:07 +02:00
Eladash af850dac99 Crypto: Fix endianess, avoid crashing on invalid values 2023-08-31 01:32:28 +02:00
Megamouse de15c9746f ecdsa: clean up some code 2023-07-16 09:32:39 +02:00
Eladash dddea008e9 unedat.cpp: Remove outdated lock 2022-12-30 17:48:14 +03:00
NicknineTheEagle 83ca7654b1 Return NPD header in verify_npdrm_self_headers and VerifyEDATHeaderWithKLicense 2022-05-10 23:24:00 +02:00
NicknineTheEagle 8065dbc2e7 Unified NPD header in unedat.h 2022-05-10 23:24:00 +02:00
Eladash cfe08de951
Account empty EDAT (#11146)
* Improve sys_fs_open logging
2021-11-14 02:15:27 +03:00
Eladash c49ebba648 Fixes of PS3 filesystem EDAT/SDAT handling
* Return EFSSPEIFIC if encountered corrupted EDAT or an unmatched key in sys_fs_open and sys_fs_read.
* Fix validate_dev_klic() for license-free EDAT.
* Fix EDATADecrypter::ReadData() for when size + pos > file_size but pos < file_size.
* Try to save up to 16 decryption keys. Educated guess based on NPDRM file descriptors count llimit.
* Return LICENCE_NOT_FOUND if needed RAP file is not found in sceNpDrmIsAvailable.
* Check additional sys_fs_open errors for sceNpDrmOpen. (EISDIR, ENOTMOUNTED)
2021-11-04 21:32:15 +03:00
Eladash 63f16d7a46 GUI Utilities: Implement PS3 SDAT/EDAT decryption 2021-10-02 11:29:01 +02:00
Megamouse 1dc00ccedd edat: Remove redundant logging 2021-05-19 21:09:18 +02:00
Megamouse a16d8ba3ea More random changes 2021-04-11 14:01:51 +03:00
Nekotekina 87af905018 Enable -Wunused-parameter 2021-03-06 18:07:08 +03:00
Nekotekina 4bee8dc37f Crypto: modernize key_vault.h
Use constexpr, remove warning guards
2021-01-14 15:23:52 +03:00
Nekotekina caf02d1841 Crypto: don't modify EDAT_IV (all zeros)
I didn't notice where it gets restored to zeros.
2021-01-13 21:57:38 +03:00
Nekotekina 6cf73fad13 Crypto: workaround -Wunused-variable
Ignore for key vault for now.
2021-01-13 19:02:14 +03:00
Megamouse 56488a4ac9 Use boolean values in unedat 2021-01-12 14:13:15 +01:00
Megamouse 4a75f44d47 Minor include cleanup in utlis.h 2021-01-12 14:13:15 +01:00
Nekotekina db8e6fe7a7 Enable -Wunused-variable 2021-01-12 14:34:14 +03:00
Nekotekina bd269bccaf types.hpp: remove intrinsic includes
Replace v128 with u128 in some places.
Removed some unused files.
2020-12-21 21:11:25 +03:00
Nekotekina eec11bfba9 Move align helpers to util/asm.hpp
Also add some files:
GLTextureCache.cpp
VKTextureCache.cpp
2020-12-18 18:07:42 +03:00
Nekotekina fb29933d3d Add usz alias for std::size_t 2020-12-18 12:23:53 +03:00
Nekotekina e321765c54 Split BEType.h to util/v128.hpp and util/to_endian.hpp 2020-12-13 16:34:45 +03:00
Nekotekina 5d934c8759 Improve narrow() and size32() with src_loc detection 2020-12-09 16:26:20 +03:00
RipleyTom af8c661a64 Remove BOM markers 2020-12-06 15:30:12 +03:00
Nekotekina e0635cf65c Remove unneeded non-ASCII character (unedat.cpp) 2020-11-29 16:18:22 +03:00
Bevan Weiss 2c8b3f05ac FIX: MAX_PATH is used within Windows headers, we should use a different define internally
Replace MAX_PATH usage with EMU_MAX_PATH, this prevents the redefine warning, and ensures that we don't mess up other usages (which will likely want MAX_PATH as 260, like Windows defines, not 4096 like we do).
The replacement has been done based on what MSVC was telling me the define values were at each point (i.e. whether we wanted it or not, these usages were using our 4906 value, not the 260 value from Windows)
2020-10-10 23:09:05 +03:00
Megamouse 6540393df5 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.
2020-09-17 00:39:41 +02:00
Eladash 8e2b07ba9e sceNpDrm: Relax file extension checks 2020-09-04 22:35:18 +02:00
Eladash a7a5034958
remove redundent include in Crypto/unedat.cpp (#8527) 2020-06-29 18:03:38 +01:00
Eladash 2483cc6f8d Fix race in Crypto/unedat.cpp, Make NPDRM keys usage atomic 2020-06-28 23:26:10 +01:00
Nekotekina Aux1 250736ece5 Fix warnings in emucore 2020-03-04 21:23:34 +03:00
gamerforEA 93552a5958 Apply some Clang-Tidy fixes 2020-02-27 00:38:55 +03:00
Nekotekina 92e3eaf3ff Fix signed-unsigned comparisons and mark warning as error (part 2). 2020-02-19 22:54:58 +03:00
Nekotekina 3c0bd821c8 Give log channels fancier names
Improve LOG_CHANNEL macro to accept custom name.
2020-02-01 10:43:43 +03:00
Nekotekina 3eca2d5d6c Remove legacy LOADER log channel 2020-02-01 07:49:38 +03:00
Nekotekina ad9c9f0183 C-style cast cleanup II 2019-11-30 18:17:45 +03:00
mp-t 607d2486ea Code review (#3114)
* Fix always-true conditions in sceNp module

* gl_render_targets: useless check on unsigned variable, possible bug

* fixed UB in crypto utility functions

* copy-paste error in vk::init_default_resources

* pass strings by const ref

* Dont copy vectors. Make sure copies are not needed because functions are used in a multi-threaded context.
2017-08-01 20:22:33 +03:00
Nekotekina d86858da64 Fix tabs 2017-06-24 14:25:11 +03:00
Jake 16d7eb4f55 [Crypto] Edat cleanup 2017-04-29 01:26:03 +03:00
Jake 65696bf6a3 Crypto: fix sprx/self check in npDrm and edata fixes 2017-03-25 14:26:27 +03:00
Jake a6f8e4f6b3 Edat / Sdata: On the fly decryption for edat, fix EDAT_FLAG_0x20 decryption 2017-03-10 19:39:01 -06:00