diff options
| author | 2018-10-30 05:03:25 +0100 | |
|---|---|---|
| committer | 2018-10-30 00:03:25 -0400 | |
| commit | 7a5eda59146306dedaf3e6f07f97a8c6898543dd (patch) | |
| tree | 78e07b43fb0113f95e1c8e9426d3b394b9524d4e /src/core/crypto/key_manager.h | |
| parent | Merge pull request #1621 from lioncash/ipc (diff) | |
| download | yuzu-7a5eda59146306dedaf3e6f07f97a8c6898543dd.tar.gz yuzu-7a5eda59146306dedaf3e6f07f97a8c6898543dd.tar.xz yuzu-7a5eda59146306dedaf3e6f07f97a8c6898543dd.zip | |
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
Diffstat (limited to 'src/core/crypto/key_manager.h')
| -rw-r--r-- | src/core/crypto/key_manager.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/crypto/key_manager.h b/src/core/crypto/key_manager.h index cccb3c0ae..22f268c65 100644 --- a/src/core/crypto/key_manager.h +++ b/src/core/crypto/key_manager.h | |||
| @@ -6,9 +6,10 @@ | |||
| 6 | 6 | ||
| 7 | #include <array> | 7 | #include <array> |
| 8 | #include <map> | 8 | #include <map> |
| 9 | #include <optional> | ||
| 9 | #include <string> | 10 | #include <string> |
| 11 | |||
| 10 | #include <boost/container/flat_map.hpp> | 12 | #include <boost/container/flat_map.hpp> |
| 11 | #include <boost/optional.hpp> | ||
| 12 | #include <fmt/format.h> | 13 | #include <fmt/format.h> |
| 13 | #include "common/common_types.h" | 14 | #include "common/common_types.h" |
| 14 | #include "core/crypto/partition_data_manager.h" | 15 | #include "core/crypto/partition_data_manager.h" |
| @@ -191,14 +192,14 @@ Key128 DeriveMasterKey(const std::array<u8, 0x90>& keyblob, const Key128& master | |||
| 191 | std::array<u8, 0x90> DecryptKeyblob(const std::array<u8, 0xB0>& encrypted_keyblob, | 192 | std::array<u8, 0x90> DecryptKeyblob(const std::array<u8, 0xB0>& encrypted_keyblob, |
| 192 | const Key128& key); | 193 | const Key128& key); |
| 193 | 194 | ||
| 194 | boost::optional<Key128> DeriveSDSeed(); | 195 | std::optional<Key128> DeriveSDSeed(); |
| 195 | Loader::ResultStatus DeriveSDKeys(std::array<Key256, 2>& sd_keys, KeyManager& keys); | 196 | Loader::ResultStatus DeriveSDKeys(std::array<Key256, 2>& sd_keys, KeyManager& keys); |
| 196 | 197 | ||
| 197 | std::vector<TicketRaw> GetTicketblob(const FileUtil::IOFile& ticket_save); | 198 | std::vector<TicketRaw> GetTicketblob(const FileUtil::IOFile& ticket_save); |
| 198 | 199 | ||
| 199 | // Returns a pair of {rights_id, titlekey}. Fails if the ticket has no certificate authority (offset | 200 | // Returns a pair of {rights_id, titlekey}. Fails if the ticket has no certificate authority (offset |
| 200 | // 0x140-0x144 is zero) | 201 | // 0x140-0x144 is zero) |
| 201 | boost::optional<std::pair<Key128, Key128>> ParseTicket( | 202 | std::optional<std::pair<Key128, Key128>> ParseTicket(const TicketRaw& ticket, |
| 202 | const TicketRaw& ticket, const RSAKeyPair<2048>& eticket_extended_key); | 203 | const RSAKeyPair<2048>& eticket_extended_key); |
| 203 | 204 | ||
| 204 | } // namespace Core::Crypto | 205 | } // namespace Core::Crypto |