mirror of
https://github.com/jakcron/nstool
synced 2024-12-28 08:01:14 +00:00
46 lines
No EOL
1.2 KiB
C++
46 lines
No EOL
1.2 KiB
C++
#pragma once
|
|
#include <string>
|
|
#include <fnd/types.h>
|
|
#include <fnd/IFile.h>
|
|
#include <fnd/SharedPtr.h>
|
|
#include <nn/hac/Meta.h>
|
|
#include "KeyConfiguration.h"
|
|
|
|
#include "common.h"
|
|
|
|
class MetaProcess
|
|
{
|
|
public:
|
|
MetaProcess();
|
|
|
|
void process();
|
|
|
|
void setInputFile(const fnd::SharedPtr<fnd::IFile>& file);
|
|
void setKeyCfg(const KeyConfiguration& keycfg);
|
|
void setCliOutputMode(CliOutputMode type);
|
|
void setVerifyMode(bool verify);
|
|
|
|
const nn::hac::Meta& getMeta() const;
|
|
|
|
private:
|
|
const std::string kModuleName = "MetaProcess";
|
|
|
|
fnd::SharedPtr<fnd::IFile> mFile;
|
|
KeyConfiguration mKeyCfg;
|
|
CliOutputMode mCliOutputMode;
|
|
bool mVerify;
|
|
|
|
nn::hac::Meta mMeta;
|
|
|
|
void importMeta();
|
|
|
|
void validateAcidSignature(const nn::hac::AccessControlInfoDesc& acid, byte_t key_generation);
|
|
void validateAciFromAcid(const nn::hac::AccessControlInfo& aci, const nn::hac::AccessControlInfoDesc& acid);
|
|
|
|
void displayMetaHeader(const nn::hac::Meta& hdr);
|
|
void displayAciHdr(const nn::hac::AccessControlInfo& aci);
|
|
void displayAciDescHdr(const nn::hac::AccessControlInfoDesc& aci);
|
|
void displayFac(const nn::hac::FileSystemAccessControl& fac);
|
|
void displaySac(const nn::hac::ServiceAccessControl& sac);
|
|
void displayKernelCap(const nn::hac::KernelCapabilityControl& kern);
|
|
}; |