mirror of
https://github.com/DarkStore-3DS/Project_CTR.git
synced 2026-12-06 03:07:20 +00:00
(ctrtool::CrrProcess) Emit errors/warns/logs in a consistent manner.
This commit is contained in:
1 parent
6509b431d8
commit
4652a08d10
1 file changed
+15
-1
@@ -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