mirror of
https://github.com/Dark98/threeSD.git
synced 2026-07-05 08:39:04 +00:00
Add CIABuildType to CIABuilder; Add legit ticket handling
This commit is contained in:
@@ -25,6 +25,12 @@ constexpr std::size_t CIA_METADATA_SIZE = 0x3AC0;
|
||||
struct Config;
|
||||
class HashedFile;
|
||||
|
||||
enum class CIABuildType {
|
||||
Standard, /// Decrypted CIA with generalized ticket
|
||||
PirateLegit, /// Uses legit TMD and encryption, but with generalized ticket
|
||||
Legit, /// Fully legit, with personal ticket containing console ID and eshop account
|
||||
};
|
||||
|
||||
class CIABuilder {
|
||||
public:
|
||||
explicit CIABuilder();
|
||||
@@ -34,8 +40,9 @@ public:
|
||||
* Initializes the building of the CIA.
|
||||
* @return true on success, false otherwise
|
||||
*/
|
||||
bool Init(const std::string& destination, TitleMetadata tmd, const Config& config,
|
||||
std::size_t total_size, const Common::ProgressCallback& callback);
|
||||
bool Init(CIABuildType type, const std::string& destination, TitleMetadata tmd,
|
||||
const Config& config, std::size_t total_size,
|
||||
const Common::ProgressCallback& callback);
|
||||
|
||||
/**
|
||||
* Adds an NCCH content to the CIA.
|
||||
@@ -93,6 +100,8 @@ private:
|
||||
bool WriteCert(const std::string& certs_db_path);
|
||||
bool WriteTicket(const std::string& ticket_db_path, const std::string& enc_title_keys_bin_path);
|
||||
|
||||
CIABuildType type;
|
||||
|
||||
Header header{};
|
||||
Metadata meta{};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user