Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Merge pull request #3697 from lioncash/declarations | bunnei | 2020-04-23 | 1 | -4/+3 |
|\ | | | | | CMakeLists: Enable -Wmissing-declarations on Linux builds | ||||
| * | General: Resolve warnings related to missing declarations | Lioncash | 2020-04-17 | 1 | -4/+3 |
| | | |||||
* | | key_manager: Resolve missing field initializer warning | Lioncash | 2020-04-17 | 1 | -1/+2 |
|/ | |||||
* | Merge pull request #3091 from lioncash/core-conversion | bunnei | 2019-11-15 | 2 | -11/+12 |
|\ | | | | | core: Make most implicit type conversion warnings errors on MSVC | ||||
| * | externals: Update httplib | Lioncash | 2019-11-12 | 1 | -1/+1 |
| | | | | | | | | | | | | | | Since the introduction of this library, numerous improvements have been made. Notably, many of the warnings we would get by simply including the library header have now been fixed. This makes it much easier to make conversion warning an error. | ||||
| * | crypto: Resolve sign-conversion warnings | Lioncash | 2019-11-12 | 2 | -11/+12 |
| | | |||||
* | | Merge pull request #3093 from lioncash/mbedtls | bunnei | 2019-11-14 | 2 | -3/+3 |
|\ \ | | | | | | | core: Migrate off deprecated mbedtls functions | ||||
| * | | core: Migrate off deprecated mbedtls functions | Lioncash | 2019-11-12 | 2 | -3/+3 |
| |/ | | | | | | | | | These functions are marked for deprecation and it's recommended that the *_ret variants be used instead. | ||||
* / | key_manager: Make use of IOFile in WriteKeyToFile() | Lioncash | 2019-11-12 | 1 | -11/+15 |
|/ | | | | | | | | | This properly handles unicode-based paths on Windows, while opening a raw stream doesn't out-of-the-box. Prevents file creation from potentially failing on Windows PCs that make use of unicode characters in their save paths (e.g. writing to a user's AppData folder, where the user has a name with non-ASCII characters). | ||||
* | [crypto] Use IsAllZeroArray helper function | vperus | 2019-10-02 | 1 | -1/+1 |
| | |||||
* | partition_data_manager: Add accessor for decrypted PRODINFO partition | Zach Hilman | 2019-09-21 | 2 | -0/+5 |
| | |||||
* | key_manager: Convert Ticket union to std::variant | Zach Hilman | 2019-07-08 | 2 | -55/+86 |
| | |||||
* | es: Populate/synthesize tickets on construction | Zach Hilman | 2019-07-08 | 2 | -13/+14 |
| | |||||
* | key_manager: Add structure for Ticket parsing | Zach Hilman | 2019-07-08 | 2 | -35/+185 |
| | |||||
* | key_manager: Add accessors/helpers for ticket management | Zach Hilman | 2019-07-08 | 2 | -14/+100 |
| | |||||
* | key_manager: Add equality operator for RSAKeyPair | Zach Hilman | 2019-07-08 | 1 | -0/+7 |
| | |||||
* | Merge pull request #2546 from DarkLordZach/kips | bunnei | 2019-06-21 | 1 | -118/+13 |
|\ | | | | | loader, file_sys: Add support for parsing and loading KIP (Kernel Internal Process) files | ||||
| * | partition_data_manager: Remove KIP processing and use FileSys | Zach Hilman | 2019-06-05 | 1 | -118/+13 |
| | | | | | | | | Previously, this TU contained the necessary headers to parse KIP/INI but now it should just use the FileSys class. | ||||
* | | common/hex_util: Combine HexVectorToString() and HexArrayToString() | Lioncash | 2019-06-12 | 1 | -2/+2 |
|/ | | | | | | These can be generified together by using a concept type to designate them. This also has the benefit of not making copies of potentially very large arrays. | ||||
* | core: Port current uses of RegisteredCache to ContentProvider | Zach Hilman | 2019-03-27 | 1 | -1/+2 |
| | |||||
* | Fixes Unicode Key File Directories (#2120) | Jungy | 2019-02-21 | 1 | -1/+2 |
| | | | | | | | | | | | | | | | | | | | | | * Fixes Unicode Key File Directories Adds code so that when loading a file it converts to UTF16 first, to ensure the files can be opened. Code borrowed from FileUtil::Exists. * Update src/core/crypto/key_manager.cpp Co-Authored-By: Jungorend <Jungorend@users.noreply.github.com> * Update src/core/crypto/key_manager.cpp Co-Authored-By: Jungorend <Jungorend@users.noreply.github.com> * Using FileUtil instead to be cleaner. * Update src/core/crypto/key_manager.cpp Co-Authored-By: Jungorend <Jungorend@users.noreply.github.com> | ||||
* | Merge pull request #1836 from lioncash/unused | bunnei | 2018-12-05 | 1 | -1/+0 |
|\ | | | | | crypto/key_manager: Remove unused variable in GetTicketblob() | ||||
| * | crypto/key_manager: Remove unused variable in GetTicketblob() | Lioncash | 2018-12-02 | 1 | -1/+0 |
| | | |||||
* | | filesystem: De-globalize registered_cache_union | Lioncash | 2018-12-02 | 1 | -1/+1 |
|/ | | | | | | | | | We can just return a new instance of this when it's requested. This only ever holds pointers to the existing registed caches, so it's not a large object. Plus, this also gets rid of the need to keep around a separate member function just to properly clear out the union. Gets rid of one of five globals in the filesystem code. | ||||
* | global: Use std::optional instead of boost::optional (#1578) | Frederic L | 2018-10-30 | 2 | -26/+27 |
| | | | | | | | | | | | | | | | | * get rid of boost::optional * Remove optional references * Use std::reference_wrapper for optional references * Fix clang format * Fix clang format part 2 * Adressed feedback * Fix clang format and MacOS build | ||||
* | key_manager: Use isxdigit instead of isdigit when reading key file | Zach Hilman | 2018-10-28 | 1 | -1/+1 |
| | | | | Crypto revisions are hex numbers and this function only checks if the string is valid for stoul in base 16, so it should be isxdigit. | ||||
* | key_manager: Remove unused variable in DeriveBase() | Lioncash | 2018-10-24 | 1 | -1/+0 |
| | |||||
* | crypto: Use compressed sizes in offset calculation for KIP decompression | Zach Hilman | 2018-10-20 | 1 | -1/+2 |
| | | | | Fixes a fatal crash on start when deriving keys. | ||||
* | crypto: Various crypto fixes for quickstart guide | Zach Hilman | 2018-10-15 | 1 | -2/+2 |
| | |||||
* | partition_data_manager: Reserve and insert data within output vector in DecryptPackage2() | Lioncash | 2018-10-13 | 1 | -20/+16 |
| | | | | | | | | | | | | | | | | | | We can just reserve the memory then perform successive insertions instead of needing to use memcpy. This also avoids the need to zero out the output vector's memory before performing the insertions. We can also std::move the output std::vector into the destination so that we don't need to make a completely new copy of the vector, getting rid of an unnecessary allocation. Additionally, we can use iterators to determine the beginning and end ranges of the std::vector instances that comprise the output vector, as the end of one range just becomes the beginning for the next successive range, and since std::vector's iterator constructor copies data within the range [begin, end), this is more straightforward and gets rid of the need to have an offset variable that keeps getting incremented to determine where to do the next std::memcpy. | ||||
* | partition_data_manager: Remove unused std::map instance within DecryptPackage2() | Lioncash | 2018-10-13 | 1 | -2/+0 |
| | | | | | Aside from emplacing elements into the map, the map itself is never actually queried for contained data. | ||||
* | partition_data_manager: Take package2_keys by const reference | Lioncash | 2018-10-13 | 2 | -2/+3 |
| | | | | | These are only ever read from, so we don't need to make a copy of all the keys here. | ||||
* | partition_data_manager: Move IV data to where it's needed in DecryptPackage2() | Lioncash | 2018-10-13 | 1 | -3/+1 |
| | | | | | | Given it's only used in one spot and has a fairly generic name, we can just specify it directly in the function call. This also the benefit of automatically moving it. | ||||
* | partition_data_manager: Remove commented out code | Lioncash | 2018-10-13 | 1 | -2/+0 |
| | | | | | Commented out code shouldn't be left in without a reason indicating why in a comment. | ||||
* | key_manager/partition_data_manager: Silence truncation compiler warnings | Lioncash | 2018-10-13 | 4 | -10/+15 |
| | |||||
* | partition_data_manager: Dehardcode array bounds | Lioncash | 2018-10-13 | 2 | -7/+12 |
| | | | | | | Instead, we can make it part of the type and make named variables for them, so they only require one definition (and if they ever change for whatever reason, they only need to be changed in one spot). | ||||
* | partition_data_manager: Take VirtualFile by const reference in constructor | Lioncash | 2018-10-13 | 2 | -2/+2 |
| | | | | | | Given the VirtualFile instance isn't stored into the class as a data member, or written to, this can just be turned into a const reference, as the constructor doesn't need to make a copy of it. | ||||
* | partition_data_manager: Amend constructor initializer list order | Lioncash | 2018-10-13 | 1 | -2/+3 |
| | | | | | Orders the members in the exact order they would be initialized. This also prevents compiler warnings about this sort of thing. | ||||
* | partition_data_manager: Remove unused includes | Lioncash | 2018-10-13 | 2 | -4/+1 |
| | | | | | Gets unused includes out of the headers and moves them into the cpp file if they're used there instead. | ||||
* | key_manager: Use std::vector's insert() instead of std::copy with a back_inserter | Lioncash | 2018-10-13 | 1 | -2/+2 |
| | | | | | | If the data is unconditionally being appended to the back of a std::vector, we can just directly insert it there without the need to insert all of the elements one-by-one with a std::back_inserter. | ||||
* | key_manager: Brace long conditional body | Lioncash | 2018-10-13 | 1 | -1/+2 |
| | | | | | If a conditional (or it's body) travels more than one line, it should be braced. | ||||
* | key_manager: Don't assume file seeks and reads will always succeed | Lioncash | 2018-10-13 | 1 | -7/+17 |
| | | | | | | | | | | | | Given the filesystem should always be assumed to be volatile, we should check and bail out if a seek operation isn't successful. This'll prevent potentially writing/returning garbage data from the function in rare cases. This also allows removing a check to see if an offset is within the bounds of a file before perfoming a seek operation. If a seek is attempted beyond the end of a file, it will fail, so this essentially combines two checks into one in one place. | ||||
* | key_manager: Remove unnecessary seek in DeriveSDSeed() | Lioncash | 2018-10-13 | 1 | -1/+0 |
| | | | | | | Given the file is opened a few lines above and no operations are done, other than check if the file is in a valid state, the read/write pointer will always be at the beginning of the file. | ||||
* | partition_data_manager: Rename system files for hekate | Zach Hilman | 2018-10-07 | 4 | -178/+228 |
| | | | | x | ||||
* | crypto: Add PartitionDataManager | Zach Hilman | 2018-10-07 | 2 | -0/+690 |
| | | | | Keeps track of system files for key derivation | ||||
* | key_manager: Add support for loading keys from partition data | Zach Hilman | 2018-10-07 | 2 | -0/+88 |
| | |||||
* | key_manager: Add ETicket key derivation | Zach Hilman | 2018-10-07 | 2 | -2/+276 |
| | | | | Derives titlekeys | ||||
* | key_manager: Add base key derivation | Zach Hilman | 2018-10-07 | 2 | -4/+220 |
| | | | | Derives master keys, game encryption keys, and package1/2 keys | ||||
* | key_manager: Add BIS key getter | Zach Hilman | 2018-10-07 | 2 | -2/+19 |
| | |||||
* | key_manager: Add support for more keys | Zach Hilman | 2018-10-07 | 2 | -3/+99 |
| | | | | TSEC, SBK, BIS, and other Sources for proper derivation | ||||
* | key_manager: Add keyblob support | Zach Hilman | 2018-10-07 | 2 | -0/+14 |
| | |||||
* | key_manager: Add support for crypto revisions past 04 | Zach Hilman | 2018-10-07 | 1 | -43/+63 |
| | |||||
* | key_manager: Add support for comments in keyfiles | Zach Hilman | 2018-10-07 | 1 | -0/+3 |
| | |||||
* | key_manager: Add support for console-specific keyfile | Zach Hilman | 2018-10-07 | 2 | -3/+13 |
| | |||||
* | key_manager: Rename KEK to Kek | Zach Hilman | 2018-10-07 | 2 | -8/+9 |
| | |||||
* | Port #4182 from Citra: "Prefix all size_t with std::" | fearlessTobi | 2018-09-15 | 10 | -47/+51 |
| | |||||
* | game_list: Use RegisteredCacheUnion for installed | Zach Hilman | 2018-09-04 | 1 | -1/+1 |
| | | | | Reduces code | ||||
* | aes_util: Fix error involving reads of less than 0x10 | Zach Hilman | 2018-09-04 | 1 | -0/+14 |
| | | | | Issues with block size are fixed by making all reads minimum length of 0x10 | ||||
* | nsp: Comply with style and performance guidelines | Zach Hilman | 2018-09-04 | 1 | -1/+1 |
| | |||||
* | card_image: Parse XCI secure partition with NSP | Zach Hilman | 2018-09-04 | 1 | -0/+2 |
| | | | | Eliminated duplicate code and adds support for Rev1+ carts | ||||
* | key_manager: Avoid autogeneration if key exists | Zach Hilman | 2018-09-04 | 1 | -3/+13 |
| | |||||
* | file_sys: Replace includes with forward declarations where applicable | Lioncash | 2018-09-04 | 2 | -4/+8 |
| | | | | | Cuts down on include dependencies, resulting in less files that need to be rebuilt when certain things are changed. | ||||
* | file_sys/crypto: Fix missing/unnecessary includes | Zach Hilman | 2018-08-25 | 4 | -4/+4 |
| | |||||
* | key_manager: Eliminate indexed for loop | Zach Hilman | 2018-08-23 | 1 | -6/+13 |
| | |||||
* | key_manager: Create keys dir if it dosen't exist | Zach Hilman | 2018-08-23 | 1 | -0/+1 |
| | | | | On call to WriteKeyToFile, so that the autogenerated file can be written. | ||||
* | file_sys: Cut down on includes and copies | Zach Hilman | 2018-08-23 | 2 | -15/+13 |
| | |||||
* | crypto: Eliminate magic constants | Zach Hilman | 2018-08-23 | 2 | -16/+19 |
| | |||||
* | key_manager: Add support for autogenerated keys | Zach Hilman | 2018-08-23 | 2 | -3/+45 |
| | | | | Stored in a separate file than manual keys. | ||||
* | key_manager: Add support for KEK and SD seed derivation | Zach Hilman | 2018-08-23 | 2 | -5/+135 |
| | |||||
* | key_manager: Switch to boost flat_map for keys | Zach Hilman | 2018-08-23 | 2 | -32/+14 |
| | | | | Should make key gets marginally faster. | ||||
* | xts_encryption_layer: Implement XTSEncryptionLayer | Zach Hilman | 2018-08-23 | 2 | -0/+80 |
| | |||||
* | aes_util: Make XTSTranscode stricter about sizes | Zach Hilman | 2018-08-23 | 1 | -5/+2 |
| | | | | XTS with Nintendo Tweak will fail mysteriously if the sector size is not 0x4000. Upgrade the critical log to an assert to prevent undefined behavior. | ||||
* | ctr_encryption_layer: Fix bug when transcoding small data | Zach Hilman | 2018-08-23 | 1 | -5/+3 |
| | | | | Fixes a bug where data lengths of less than size 0x10 will fail or have misleading return values. | ||||
* | common: Namespace hex_util.h/.cpp | Lioncash | 2018-08-16 | 1 | -4/+4 |
| | | | | | It's in the common code, so it should be under the Common namespace like everything else. | ||||
* | crypto: Remove hex utilities from key_manager | Zach Hilman | 2018-08-12 | 2 | -36/+2 |
| | | | | Move to hex_util.h in common | ||||
* | aes_util: Add static assertion to Transcode() and XTSTranscode() to ensure well-defined behavior | Lioncash | 2018-08-04 | 1 | -0/+4 |
| | | | | These functions should only be given trivially-copyable types. | ||||
* | aes_util: Make CalculateNintendoTweak() an internally linked function | Lioncash | 2018-08-04 | 2 | -12/+10 |
| | | | | | This function doesn't directly depend on class state, so it can be hidden entirely from the interface in the cpp file. | ||||
* | aes_util: Make Transcode() a const member function | Lioncash | 2018-08-04 | 2 | -8/+9 |
| | | | | This doesn't modify member state, so it can be made const. | ||||
* | core/crypto: Remove unnecessary includes | Lioncash | 2018-08-04 | 4 | -5/+5 |
| | |||||
* | key_manager: Use regular std::string instead of std::string_view | Lioncash | 2018-08-04 | 2 | -10/+7 |
| | | | | | | | The benefit of std::string_view comes from the idea of avoiding copies (essentially acting as a non-owning view), however if we're just going to copy into a local variable immediately, there's not much benefit gained here. | ||||
* | Use more descriptive error codes and messages | Zach Hilman | 2018-08-01 | 2 | -5/+24 |
| | |||||
* | Use static const instead of const static | Zach Hilman | 2018-08-01 | 1 | -2/+2 |
| | |||||
* | Add missing includes and use const where applicable | Zach Hilman | 2018-08-01 | 6 | -15/+23 |
| | |||||
* | Allow key loading from %YUZU_DIR%/keys in addition to ~/.switch | Zach Hilman | 2018-08-01 | 2 | -7/+20 |
| | |||||
* | Make XCI comply to review and style guidelines | Zach Hilman | 2018-08-01 | 8 | -405/+187 |
| | |||||
* | Extract mbedtls to cpp file | Zach Hilman | 2018-08-01 | 2 | -85/+123 |
| | |||||
* | Add missing string.h include | Zach Hilman | 2018-08-01 | 1 | -0/+1 |
| | |||||
* | Update mbedtls and fix compile error | Zach Hilman | 2018-08-01 | 1 | -0/+1 |
| | |||||
* | Remove files that are not used | Zach Hilman | 2018-08-01 | 10 | -0/+834 |