mirror of
https://github.com/DarkStore-3DS/Project_CTR.git
synced 2026-07-02 16:59:03 +00:00
(ctrtool::CrrProcess) Emit errors/warns/logs in a consistent manner.
This commit is contained in:
@@ -124,7 +124,7 @@ void ctrtool::CrrProcess::verifyData()
|
||||
}
|
||||
else
|
||||
{
|
||||
fmt::print(stderr, "Could not read static CRR public key.\n");
|
||||
fmt::print(stderr, "[{} LOG] Could not read static CRR public key.\n", mModuleLabel);
|
||||
mValidCertificateSignature = ValidState::Fail;
|
||||
}
|
||||
|
||||
@@ -145,6 +145,20 @@ void ctrtool::CrrProcess::verifyData()
|
||||
{
|
||||
mValidUniqueId = ((mBodyHeader.unique_id.unwrap() & mHeader.body_certificate.unique_id_mask.unwrap()) == 0) ? ValidState::Good : ValidState::Fail;
|
||||
}
|
||||
|
||||
// log validation errors
|
||||
if (mValidCertificateSignature != ValidState::Good)
|
||||
{
|
||||
fmt::print(stderr, "[{} LOG] Signature for CRR Certificate was invalid.\n", mModuleLabel);
|
||||
}
|
||||
if (mValidBodySignature != ValidState::Good)
|
||||
{
|
||||
fmt::print(stderr, "[{} LOG] Signature for CRR Body was invalid.\n", mModuleLabel);
|
||||
}
|
||||
if (mValidUniqueId != ValidState::Good)
|
||||
{
|
||||
fmt::print(stderr, "[{} LOG] CRR UniqueId was invalid.\n", mModuleLabel);
|
||||
}
|
||||
}
|
||||
|
||||
void ctrtool::CrrProcess::printData()
|
||||
|
||||
Reference in New Issue
Block a user