mirror of
https://github.com/DarkStore-3DS/Project_CTR.git
synced 2026-07-04 08:49:03 +00:00
Change signing errors to be warnings when they fail.
This commit is contained in:
+10
-2
@@ -83,12 +83,20 @@ int SignTicketHeader(buffer_struct *tik, keys_struct *keys)
|
||||
|
||||
if (Rsa2048Key_CanSign(&keys->rsa.xs) == false)
|
||||
{
|
||||
printf("[TIK WARNING] Failed to sign header\n");
|
||||
printf("[TIK WARNING] Failed to sign header (key was incomplete)\n");
|
||||
memset(sig->data, 0xFF, 0x100);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return RsaSignVerify(data, len, sig->data, keys->rsa.xs.pub, keys->rsa.xs.pvt, RSA_2048_SHA256, CTR_RSA_SIGN);
|
||||
int rsa_ret = RsaSignVerify(data, len, sig->data, keys->rsa.xs.pub, keys->rsa.xs.pvt, RSA_2048_SHA256, CTR_RSA_SIGN);
|
||||
if (rsa_ret != 0)
|
||||
{
|
||||
printf("[TIK WARNING] Failed to sign header (mbedtls error = -0x%x)\n", -rsa_ret);
|
||||
memset(sig->data, 0xFF, 0x100);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CryptTitleKey(u8 *input, u8 *output, u8 *titleId, keys_struct *keys, u8 mode)
|
||||
|
||||
Reference in New Issue
Block a user