summaryrefslogtreecommitdiff
path: root/src/core/crypto (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Revert "core: Fix clang build"Gravatar bunnei2020-10-202-6/+3
|
* core: Fix clang buildGravatar Lioncash2020-10-172-3/+6
| | | | | | | Recent changes to the build system that made more warnings be flagged as errors caused building via clang to break. Fixes #4795
* core/CMakeLists: Make some warnings errorsGravatar Lioncash2020-10-131-1/+1
| | | | | | | | | Makes our error coverage a little more consistent across the board by applying it to Linux side of things as well. This also makes it more consistent with the warning settings in other libraries in the project. This also updates httplib to 0.7.9, as there are several warning cleanups made that allow us to enable several warnings as errors.
* crypto/key_manager: Remove dependency on the global system accessorGravatar Lioncash2020-09-142-5/+8
| | | | | We can supply the content provider as an argument instead of hardcoding a global accessor in the implementation.
* Merge pull request #4564 from lioncash/file-includeGravatar bunnei2020-09-021-0/+1
|\ | | | | file_sys: Replace inclusions with forward declarations where applicable
| * file_sys: Replace inclusions with forward declarations where applicableGravatar Lioncash2020-08-231-0/+1
| | | | | | | | Same behavior, minus unnecessary inclusions where not necessary.
* | key_manager: Make data arrays constexprGravatar Lioncash2020-08-222-75/+82
|/ | | | | We can convert these maps into constexpr arrays to eliminate some runtime static constructors.
* Merge pull request #4535 from lioncash/fileutilGravatar bunnei2020-08-172-112/+178
|\ | | | | common/fileutil: Convert namespace to Common::FS
| * common/fileutil: Convert namespace to Common::FSGravatar Lioncash2020-08-162-112/+178
| | | | | | | | | | | | | | | | | | | | | | | | Migrates a remaining common file over to the Common namespace, making it consistent with the rest of common files. This also allows for high-traffic FS related code to alias the filesystem function namespace as namespace FS = Common::FS; for more concise typing.
* | Merge pull request #4494 from lioncash/transcodeGravatar bunnei2020-08-172-3/+3
|\ \ | |/ |/| aes_util: Make use of non-template variant of Transcode
| * partition_data_manager: Eliminate magic valueGravatar Lioncash2020-08-061-2/+2
| | | | | | | | | | We can use sizeof to make it obvious at the call site where the value is coming from.
| * aes_util: Make use of non-template variant of TranscodeGravatar Lioncash2020-08-061-1/+1
| | | | | | | | Same behavior, less template instantiations.
* | Merge pull request #4483 from lioncash/constexpr-hexGravatar bunnei2020-08-062-98/+118
|\ \ | |/ |/| partition_data_manager: Make data arrays constexpr
| * partition_data_manager: Update master key hashesGravatar Lioncash2020-08-061-5/+5
| | | | | | | | Fills in some hashes that were previously unhandled.
| * partition_data_manager: Make data arrays constexprGravatar Lioncash2020-08-062-98/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously the constructor for all of these would run at program startup, consuming time before the application can enter main(). This is also particularly dangerous, given the logging system wouldn't have been initialized properly yet, yet the program would use the logs to signify an error. To rectify this, we can replace the literals with constexpr functions that perform the conversion at compile-time, completely eliminating the runtime cost of initializing these arrays.
* | aes_util: Allow SetIV to be non-allocatingGravatar Lioncash2020-08-035-23/+30
|/ | | | | | In a few places, the data to be set as the IV is already within an array. We shouldn't require this data to be heap-allocated if it doesn't need to be. This allows certain callers to reduce heap churn.
* KeyManager: Prevent writing of invalid keysGravatar Morph2020-07-101-4/+8
| | | | If the keys are zero, don't write them to the autogenerated file.
* key_manager: Correct casing of instance()Gravatar Lioncash2020-07-011-1/+1
| | | | Our codebase uppercases member function names.
* key_manager: Delete move operationsGravatar Lioncash2020-07-011-0/+3
| | | | Prevents the singleton from being moved from.
* key_manager: Make use of canonical deleted operator=Gravatar Lioncash2020-07-011-2/+2
| | | | | | | operator= typically returns a reference, it's not void. While we're at it, we can correct the parameter formatting to adhere to the codebase.
* crypto: Make KeyManager a singleton classGravatar FearlessTobi2020-05-201-1/+9
| | | | | | Previously, we were reading the keys everytime a KeyManager object was created, causing yuzu to reread the keys file multiple hundreds of times when loading the game list. With this change, it is only loaded once. On my system, this decreased game list loading times by a factor of 20.
* Merge pull request #3697 from lioncash/declarationsGravatar bunnei2020-04-231-4/+3
|\ | | | | CMakeLists: Enable -Wmissing-declarations on Linux builds
| * General: Resolve warnings related to missing declarationsGravatar Lioncash2020-04-161-4/+3
| |
* | key_manager: Resolve missing field initializer warningGravatar Lioncash2020-04-161-1/+2
|/
* Merge pull request #3091 from lioncash/core-conversionGravatar bunnei2019-11-152-11/+12
|\ | | | | core: Make most implicit type conversion warnings errors on MSVC
| * externals: Update httplibGravatar Lioncash2019-11-121-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 warningsGravatar Lioncash2019-11-122-11/+12
| |
* | Merge pull request #3093 from lioncash/mbedtlsGravatar bunnei2019-11-142-3/+3
|\ \ | | | | | | core: Migrate off deprecated mbedtls functions
| * | core: Migrate off deprecated mbedtls functionsGravatar Lioncash2019-11-122-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()Gravatar Lioncash2019-11-121-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 functionGravatar vperus2019-10-021-1/+1
|
* partition_data_manager: Add accessor for decrypted PRODINFO partitionGravatar Zach Hilman2019-09-212-0/+5
|
* key_manager: Convert Ticket union to std::variantGravatar Zach Hilman2019-07-072-55/+86
|
* es: Populate/synthesize tickets on constructionGravatar Zach Hilman2019-07-072-13/+14
|
* key_manager: Add structure for Ticket parsingGravatar Zach Hilman2019-07-072-35/+185
|
* key_manager: Add accessors/helpers for ticket managementGravatar Zach Hilman2019-07-072-14/+100
|
* key_manager: Add equality operator for RSAKeyPairGravatar Zach Hilman2019-07-071-0/+7
|
* Merge pull request #2546 from DarkLordZach/kipsGravatar bunnei2019-06-211-118/+13
|\ | | | | loader, file_sys: Add support for parsing and loading KIP (Kernel Internal Process) files
| * partition_data_manager: Remove KIP processing and use FileSysGravatar Zach Hilman2019-06-051-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()Gravatar Lioncash2019-06-121-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 ContentProviderGravatar Zach Hilman2019-03-261-1/+2
|
* Fixes Unicode Key File Directories (#2120)Gravatar Jungy2019-02-201-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/unusedGravatar bunnei2018-12-041-1/+0
|\ | | | | crypto/key_manager: Remove unused variable in GetTicketblob()
| * crypto/key_manager: Remove unused variable in GetTicketblob()Gravatar Lioncash2018-12-011-1/+0
| |
* | filesystem: De-globalize registered_cache_unionGravatar Lioncash2018-12-011-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)Gravatar Frederic L2018-10-302-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 fileGravatar Zach Hilman2018-10-271-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()Gravatar Lioncash2018-10-241-1/+0
|
* crypto: Use compressed sizes in offset calculation for KIP decompressionGravatar Zach Hilman2018-10-191-1/+2
| | | | Fixes a fatal crash on start when deriving keys.
* crypto: Various crypto fixes for quickstart guideGravatar Zach Hilman2018-10-141-2/+2
|