mirror of
https://github.com/jakcron/nstool
synced 2024-11-15 02:06:40 +00:00
Change names for NCA content keys internally.
This commit is contained in:
parent
93fc2e29bc
commit
0cb9608590
2 changed files with 10 additions and 10 deletions
|
@ -433,8 +433,8 @@ nstool::SettingsInitializer::SettingsInitializer(const std::vector<std::string>&
|
||||||
mShowLayout(false),
|
mShowLayout(false),
|
||||||
mShowKeydata(false),
|
mShowKeydata(false),
|
||||||
mVerbose(false),
|
mVerbose(false),
|
||||||
mTitleKey(),
|
mNcaEncryptedContentKey(),
|
||||||
mBodyKey(),
|
mNcaContentKey(),
|
||||||
mTikPath(),
|
mTikPath(),
|
||||||
mCertPath()
|
mCertPath()
|
||||||
{
|
{
|
||||||
|
@ -486,8 +486,8 @@ nstool::SettingsInitializer::SettingsInitializer(const std::vector<std::string>&
|
||||||
|
|
||||||
// generate keybag
|
// generate keybag
|
||||||
opt.keybag = KeyBagInitializer(opt.is_dev, mKeysetPath, mTikPath, mCertPath);
|
opt.keybag = KeyBagInitializer(opt.is_dev, mKeysetPath, mTikPath, mCertPath);
|
||||||
opt.keybag.fallback_enc_content_key = mTitleKey;
|
opt.keybag.fallback_enc_content_key = mNcaEncryptedContentKey;
|
||||||
opt.keybag.fallback_content_key = mBodyKey;
|
opt.keybag.fallback_content_key = mNcaContentKey;
|
||||||
|
|
||||||
// dump keys if requires
|
// dump keys if requires
|
||||||
if (mShowKeydata) // but not opt.cli_output_mode.show_keydata, since this that enabled by toggling -v,--verbose, personally I don't think a summary of imported keydata should be included in verbose output.
|
if (mShowKeydata) // but not opt.cli_output_mode.show_keydata, since this that enabled by toggling -v,--verbose, personally I don't think a summary of imported keydata should be included in verbose output.
|
||||||
|
@ -549,8 +549,8 @@ void nstool::SettingsInitializer::parse_args(const std::vector<std::string>& arg
|
||||||
|
|
||||||
// get user-provided keydata
|
// get user-provided keydata
|
||||||
opts.registerOptionHandler(std::shared_ptr<SingleParamPathOptionHandler>(new SingleParamPathOptionHandler(mKeysetPath, {"-k", "--keyset"})));
|
opts.registerOptionHandler(std::shared_ptr<SingleParamPathOptionHandler>(new SingleParamPathOptionHandler(mKeysetPath, {"-k", "--keyset"})));
|
||||||
opts.registerOptionHandler(std::shared_ptr<SingleParamAesKeyOptionHandler>(new SingleParamAesKeyOptionHandler(mTitleKey, {"--titlekey"})));
|
opts.registerOptionHandler(std::shared_ptr<SingleParamAesKeyOptionHandler>(new SingleParamAesKeyOptionHandler(mNcaEncryptedContentKey, {"--titlekey"})));
|
||||||
opts.registerOptionHandler(std::shared_ptr<SingleParamAesKeyOptionHandler>(new SingleParamAesKeyOptionHandler(mBodyKey, {"--bodykey"})));
|
opts.registerOptionHandler(std::shared_ptr<SingleParamAesKeyOptionHandler>(new SingleParamAesKeyOptionHandler(mNcaContentKey, {"--contentkey", "--bodykey"})));
|
||||||
opts.registerOptionHandler(std::shared_ptr<SingleParamPathOptionHandler>(new SingleParamPathOptionHandler(mTikPath, {"--tik"})));
|
opts.registerOptionHandler(std::shared_ptr<SingleParamPathOptionHandler>(new SingleParamPathOptionHandler(mTikPath, {"--tik"})));
|
||||||
opts.registerOptionHandler(std::shared_ptr<SingleParamPathOptionHandler>(new SingleParamPathOptionHandler(mCertPath, {"--cert"})));
|
opts.registerOptionHandler(std::shared_ptr<SingleParamPathOptionHandler>(new SingleParamPathOptionHandler(mCertPath, {"--cert"})));
|
||||||
|
|
||||||
|
@ -732,8 +732,8 @@ void nstool::SettingsInitializer::usage_text() const
|
||||||
fmt::print(" {:s} [--fstree] [-x [<virtual path>] <out path>] [--bodykey <key> --titlekey <key> -tik <tik path>] <.nca file>\n", BIN_NAME);
|
fmt::print(" {:s} [--fstree] [-x [<virtual path>] <out path>] [--bodykey <key> --titlekey <key> -tik <tik path>] <.nca file>\n", BIN_NAME);
|
||||||
fmt::print(" --fstree Print filesystem tree.\n");
|
fmt::print(" --fstree Print filesystem tree.\n");
|
||||||
fmt::print(" -x, --extract Extract a file or directory to local filesystem.\n");
|
fmt::print(" -x, --extract Extract a file or directory to local filesystem.\n");
|
||||||
fmt::print(" --titlekey Specify title key extracted from ticket.\n");
|
fmt::print(" --titlekey Specify (encrypted) title key extracted from ticket.\n");
|
||||||
fmt::print(" --bodykey Specify body encryption key.\n");
|
fmt::print(" --contentkey Specify content key.\n");
|
||||||
fmt::print(" --tik Specify ticket to source title key.\n");
|
fmt::print(" --tik Specify ticket to source title key.\n");
|
||||||
fmt::print(" --cert Specify certificate chain to verify ticket.\n");
|
fmt::print(" --cert Specify certificate chain to verify ticket.\n");
|
||||||
fmt::print(" --part0 Extract partition \"0\" to directory. (Alias for \"-x /0 <out path>\")\n");
|
fmt::print(" --part0 Extract partition \"0\" to directory. (Alias for \"-x /0 <out path>\")\n");
|
||||||
|
|
|
@ -133,8 +133,8 @@ private:
|
||||||
bool mVerbose;
|
bool mVerbose;
|
||||||
|
|
||||||
tc::Optional<tc::io::Path> mKeysetPath;
|
tc::Optional<tc::io::Path> mKeysetPath;
|
||||||
tc::Optional<KeyBag::aes128_key_t> mTitleKey;
|
tc::Optional<KeyBag::aes128_key_t> mNcaEncryptedContentKey;
|
||||||
tc::Optional<KeyBag::aes128_key_t> mBodyKey;
|
tc::Optional<KeyBag::aes128_key_t> mNcaContentKey;
|
||||||
tc::Optional<tc::io::Path> mTikPath;
|
tc::Optional<tc::io::Path> mTikPath;
|
||||||
tc::Optional<tc::io::Path> mCertPath;
|
tc::Optional<tc::io::Path> mCertPath;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue