ec_wii: Make getter functions const member functions

This commit is contained in:
Lioncash 2017-01-28 18:01:40 -05:00
parent 5b998ee9b0
commit 650071c3e4
4 changed files with 12 additions and 12 deletions

View File

@ -490,7 +490,7 @@ IPCCommandResult ES::ESGetDeviceID(const IOCtlVRequest& request)
{
_dbg_assert_msg_(IOS_ES, request.io_vectors.size() == 1, "IOCTL_ES_GETDEVICEID no io vectors");
EcWii& ec = EcWii::GetInstance();
const EcWii& ec = EcWii::GetInstance();
INFO_LOG(IOS_ES, "IOCTL_ES_GETDEVICEID %08X", ec.getNgId());
Memory::Write_U32(ec.getNgId(), request.io_vectors[0].address);
return GetDefaultReply(IPC_SUCCESS);
@ -1246,7 +1246,7 @@ IPCCommandResult ES::GetDeviceCertificate(const IOCtlVRequest& request)
_dbg_assert_(IOS_ES, request.io_vectors.size() == 1);
u8* destination = Memory::GetPointer(request.io_vectors[0].address);
EcWii& ec = EcWii::GetInstance();
const EcWii& ec = EcWii::GetInstance();
get_ng_cert(destination, ec.getNgId(), ec.getNgKeyId(), ec.getNgPriv(), ec.getNgSig());
return GetDefaultReply(IPC_SUCCESS);
}
@ -1259,7 +1259,7 @@ IPCCommandResult ES::Sign(const IOCtlVRequest& request)
u32 data_size = request.in_vectors[0].size;
u8* sig_out = Memory::GetPointer(request.io_vectors[0].address);
EcWii& ec = EcWii::GetInstance();
const EcWii& ec = EcWii::GetInstance();
get_ap_sig_and_cert(sig_out, ap_cert_out, m_TitleID, data, data_size, ec.getNgPriv(),
ec.getNgId());

View File

@ -149,7 +149,7 @@ IPCCommandResult NetKDRequest::IOCtl(const IOCtlRequest& request)
u8 id_ctr = config.IdGen();
u8 hardware_model = GetHardwareModel(model);
EcWii& ec = EcWii::GetInstance();
const EcWii& ec = EcWii::GetInstance();
u32 HollywoodID = ec.getNgId();
u64 UserID = 0;

View File

@ -160,22 +160,22 @@ EcWii::~EcWii()
{
}
u32 EcWii::getNgId()
u32 EcWii::getNgId() const
{
return Common::swap32(BootMiiKeysBin.ng_id);
}
u32 EcWii::getNgKeyId()
u32 EcWii::getNgKeyId() const
{
return Common::swap32(BootMiiKeysBin.ng_key_id);
}
const u8* EcWii::getNgPriv()
const u8* EcWii::getNgPriv() const
{
return BootMiiKeysBin.ng_priv;
}
const u8* EcWii::getNgSig()
const u8* EcWii::getNgSig() const
{
return BootMiiKeysBin.ng_sig;
}

View File

@ -39,10 +39,10 @@ public:
EcWii();
~EcWii();
static EcWii& GetInstance();
u32 getNgId();
u32 getNgKeyId();
const u8* getNgPriv();
const u8* getNgSig();
u32 getNgId() const;
u32 getNgKeyId() const;
const u8* getNgPriv() const;
const u8* getNgSig() const;
private:
void InitDefaults();