Lioncash
a8aca4306d
crypto/key_manager: Remove unused variable in GetTicketblob()
7 years ago
Frederic L
7a5eda5914
global: Use std::optional instead of boost::optional ( #1578 )
...
* 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
7 years ago
Zach Hilman
1fa31cf74d
key_manager: Use isxdigit instead of isdigit when reading key file
...
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.
7 years ago
Lioncash
c6529688fc
key_manager: Remove unused variable in DeriveBase()
7 years ago
Lioncash
6da2ed4232
key_manager/partition_data_manager: Silence truncation compiler warnings
7 years ago
Lioncash
06898263f6
key_manager: Use std::vector's insert() instead of std::copy with a back_inserter
...
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.
7 years ago
Lioncash
e70c08b543
key_manager: Brace long conditional body
...
If a conditional (or it's body) travels more than one line, it should be
braced.
7 years ago
Lioncash
ef5639bfbb
key_manager: Don't assume file seeks and reads will always succeed
...
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.
7 years ago
Lioncash
82ea1cf35a
key_manager: Remove unnecessary seek in DeriveSDSeed()
...
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.
7 years ago
Zach Hilman
3ec054643e
partition_data_manager: Rename system files for hekate
...
x
7 years ago
Zach Hilman
4aad010f7a
key_manager: Add support for loading keys from partition data
7 years ago
Zach Hilman
d041d6231c
key_manager: Add ETicket key derivation
...
Derives titlekeys
7 years ago
Zach Hilman
a57aac5772
key_manager: Add base key derivation
...
Derives master keys, game encryption keys, and package1/2 keys
7 years ago
Zach Hilman
d7398283e3
key_manager: Add BIS key getter
7 years ago
Zach Hilman
d6a0d5d432
key_manager: Add support for more keys
...
TSEC, SBK, BIS, and other Sources for proper derivation
7 years ago
Zach Hilman
c79d2ca6cf
key_manager: Add keyblob support
7 years ago
Zach Hilman
e4602748d6
key_manager: Add support for crypto revisions past 04
7 years ago
Zach Hilman
9e34303fb9
key_manager: Add support for comments in keyfiles
7 years ago
Zach Hilman
ce05df0a6d
key_manager: Add support for console-specific keyfile
7 years ago
Zach Hilman
721632fe66
key_manager: Rename KEK to Kek
7 years ago
fearlessTobi
63c2e32e20
Port #4182 from Citra: "Prefix all size_t with std::"
7 years ago
Zach Hilman
e4e55d064e
nsp: Comply with style and performance guidelines
7 years ago
Zach Hilman
d770c60205
key_manager: Avoid autogeneration if key exists
7 years ago
Lioncash
a813c10e1c
file_sys: Replace includes with forward declarations where applicable
...
Cuts down on include dependencies, resulting in less files that need to
be rebuilt when certain things are changed.
7 years ago
Zach Hilman
6314a799aa
file_sys/crypto: Fix missing/unnecessary includes
7 years ago
Zach Hilman
ccfd176382
key_manager: Eliminate indexed for loop
7 years ago
Zach Hilman
119ab308b5
key_manager: Create keys dir if it dosen't exist
...
On call to WriteKeyToFile, so that the autogenerated file can be written.
7 years ago
Zach Hilman
a7e8d10969
file_sys: Cut down on includes and copies
7 years ago
Zach Hilman
42dc856ce1
crypto: Eliminate magic constants
7 years ago
Zach Hilman
61a5b56abd
key_manager: Add support for autogenerated keys
...
Stored in a separate file than manual keys.
7 years ago
Zach Hilman
f26fc64cb4
key_manager: Add support for KEK and SD seed derivation
7 years ago
Zach Hilman
cde665c565
key_manager: Switch to boost flat_map for keys
...
Should make key gets marginally faster.
7 years ago
Lioncash
b39cd70cd4
common: Namespace hex_util.h/.cpp
...
It's in the common code, so it should be under the Common namespace like
everything else.
7 years ago
Zach Hilman
a27ec24c0f
crypto: Remove hex utilities from key_manager
...
Move to hex_util.h in common
7 years ago
Lioncash
8da651ac4d
core/crypto: Remove unnecessary includes
7 years ago
Lioncash
c1f76abfaf
key_manager: Use regular std::string instead of std::string_view
...
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.
7 years ago
Zach Hilman
187d8e215f
Use more descriptive error codes and messages
7 years ago
Zach Hilman
03149d3e4a
Add missing includes and use const where applicable
7 years ago
Zach Hilman
150527ec19
Allow key loading from %YUZU_DIR%/keys in addition to ~/.switch
7 years ago
Zach Hilman
239a3113e4
Make XCI comply to review and style guidelines
7 years ago
Zach Hilman
df5b75694f
Remove files that are not used
7 years ago