mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
IOS: Remove ec_wii functions
This commit is contained in:
@ -27,7 +27,6 @@
|
||||
#include "Core/IOS/ES/Formats.h"
|
||||
#include "Core/IOS/IOSC.h"
|
||||
#include "Core/IOS/VersionInfo.h"
|
||||
#include "Core/ec_wii.h"
|
||||
|
||||
namespace IOS
|
||||
{
|
||||
@ -218,9 +217,7 @@ bool ES::LaunchTitle(u64 title_id, bool skip_reload)
|
||||
|
||||
NOTICE_LOG(IOS_ES, "Launching title %016" PRIx64 "...", title_id);
|
||||
|
||||
u32 device_id;
|
||||
if (title_id == Titles::SHOP &&
|
||||
(GetDeviceId(&device_id) != IPC_SUCCESS || device_id == DEFAULT_WII_DEVICE_ID))
|
||||
if (title_id == Titles::SHOP && m_ios.GetIOSC().IsUsingDefaultId())
|
||||
{
|
||||
ERROR_LOG(IOS_ES, "Refusing to launch the shop channel with default device credentials");
|
||||
CriticalAlertT("You cannot use the Wii Shop Channel without using your own device credentials."
|
||||
|
@ -10,7 +10,6 @@
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Core/HW/Memmap.h"
|
||||
#include "Core/IOS/ES/Formats.h"
|
||||
#include "Core/ec_wii.h"
|
||||
|
||||
namespace IOS
|
||||
{
|
||||
@ -20,8 +19,7 @@ namespace Device
|
||||
{
|
||||
ReturnCode ES::GetDeviceId(u32* device_id) const
|
||||
{
|
||||
const EcWii& ec = EcWii::GetInstance();
|
||||
*device_id = ec.GetNGID();
|
||||
*device_id = m_ios.GetIOSC().GetDeviceId();
|
||||
INFO_LOG(IOS_ES, "GetDeviceId: %08X", *device_id);
|
||||
return IPC_SUCCESS;
|
||||
}
|
||||
@ -92,10 +90,9 @@ IPCCommandResult ES::GetDeviceCertificate(const IOCtlVRequest& request)
|
||||
return GetDefaultReply(ES_EINVAL);
|
||||
|
||||
INFO_LOG(IOS_ES, "IOCTL_ES_GETDEVICECERT");
|
||||
u8* destination = Memory::GetPointer(request.io_vectors[0].address);
|
||||
|
||||
const EcWii& ec = EcWii::GetInstance();
|
||||
MakeNGCert(destination, ec.GetNGID(), ec.GetNGKeyID(), ec.GetNGPriv(), ec.GetNGSig());
|
||||
const auto cert = m_ios.GetIOSC().GetDeviceCertificate();
|
||||
Memory::CopyToEmu(request.io_vectors[0].address, cert.data(), cert.size());
|
||||
return GetDefaultReply(IPC_SUCCESS);
|
||||
}
|
||||
|
||||
@ -113,10 +110,7 @@ IPCCommandResult ES::Sign(const IOCtlVRequest& request)
|
||||
if (!m_title_context.active)
|
||||
return GetDefaultReply(ES_EINVAL);
|
||||
|
||||
const EcWii& ec = EcWii::GetInstance();
|
||||
MakeAPSigAndCert(sig_out, ap_cert_out, m_title_context.tmd.GetTitleId(), data, data_size,
|
||||
ec.GetNGPriv(), ec.GetNGID());
|
||||
|
||||
m_ios.GetIOSC().Sign(sig_out, ap_cert_out, m_title_context.tmd.GetTitleId(), data, data_size);
|
||||
return GetDefaultReply(IPC_SUCCESS);
|
||||
}
|
||||
} // namespace Device
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include "Core/CommonTitles.h"
|
||||
#include "Core/HW/Memmap.h"
|
||||
#include "Core/IOS/ES/Formats.h"
|
||||
#include "Core/ec_wii.h"
|
||||
|
||||
namespace IOS
|
||||
{
|
||||
@ -63,7 +62,7 @@ ReturnCode ES::ImportTicket(const std::vector<u8>& ticket_bytes, const std::vect
|
||||
return ES_EINVAL;
|
||||
|
||||
const u32 ticket_device_id = ticket.GetDeviceId();
|
||||
const u32 device_id = EcWii::GetInstance().GetNGID();
|
||||
const u32 device_id = m_ios.GetIOSC().GetDeviceId();
|
||||
if (type == TicketImportType::PossiblyPersonalised && ticket_device_id != 0)
|
||||
{
|
||||
if (device_id != ticket_device_id)
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include "Common/StringUtil.h"
|
||||
#include "Common/Swap.h"
|
||||
#include "Core/IOS/Device.h"
|
||||
#include "Core/ec_wii.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
@ -444,6 +443,11 @@ ReturnCode IOSC::SetOwnership(Handle handle, u32 new_owner, u32 pid)
|
||||
return IPC_SUCCESS;
|
||||
}
|
||||
|
||||
bool IOSC::IsUsingDefaultId() const
|
||||
{
|
||||
return GetDeviceId() == DEFAULT_DEVICE_ID;
|
||||
}
|
||||
|
||||
u32 IOSC::GetDeviceId() const
|
||||
{
|
||||
return m_key_entries[HANDLE_CONSOLE_ID].misc_data;
|
||||
|
@ -200,6 +200,7 @@ public:
|
||||
ReturnCode GetOwnership(Handle handle, u32* owner) const;
|
||||
ReturnCode SetOwnership(Handle handle, u32 owner, u32 pid);
|
||||
|
||||
bool IsUsingDefaultId() const;
|
||||
u32 GetDeviceId() const;
|
||||
Certificate GetDeviceCertificate() const;
|
||||
void Sign(u8* sig_out, u8* ap_cert_out, u64 title_id, const u8* data, u32 data_size) const;
|
||||
|
@ -17,7 +17,6 @@
|
||||
#include "Core/CommonTitles.h"
|
||||
#include "Core/HW/Memmap.h"
|
||||
#include "Core/IOS/Network/Socket.h"
|
||||
#include "Core/ec_wii.h"
|
||||
|
||||
namespace IOS
|
||||
{
|
||||
@ -101,8 +100,7 @@ IPCCommandResult NetKDRequest::IOCtl(const IOCtlRequest& request)
|
||||
u8 id_ctr = config.IdGen();
|
||||
u8 hardware_model = GetHardwareModel(model);
|
||||
|
||||
const EcWii& ec = EcWii::GetInstance();
|
||||
u32 HollywoodID = ec.GetNGID();
|
||||
u32 HollywoodID = m_ios.GetIOSC().GetDeviceId();
|
||||
u64 UserID = 0;
|
||||
|
||||
s32 ret = NWC24MakeUserID(&UserID, HollywoodID, id_ctr, hardware_model, area_code);
|
||||
|
Reference in New Issue
Block a user