[makerom] Relaxed support for bad signatures (-ignoresign). Warns user when something cannot be signed, instead of treating it like a fatal error.

This commit is contained in:
jakcron
2017-05-28 10:27:55 +08:00
parent 4f875b0d0b
commit 6e858be07b
9 changed files with 212 additions and 184 deletions
+2 -2
View File
@@ -58,14 +58,14 @@ int SignAccessDesc(access_descriptor *acexDesc, keys_struct *keys)
{
u8 *data = (u8*) &acexDesc->ncchRsaPubKey;
u8 *sign = (u8*) &acexDesc->signature;
return RsaSignVerify(data,0x300,sign,keys->rsa.acexPub,keys->rsa.acexPvt,RSA_2048_SHA256,CTR_RSA_SIGN);
return RsaSignVerify(data, 0x300, sign, keys->rsa.acex.pub, keys->rsa.acex.pvt, RSA_2048_SHA256, CTR_RSA_SIGN);
}
int CheckAccessDescSignature(access_descriptor *acexDesc, keys_struct *keys)
{
u8 *data = (u8*) &acexDesc->ncchRsaPubKey;
u8 *sign = (u8*) &acexDesc->signature;
return RsaSignVerify(data,0x300,sign,keys->rsa.acexPub,NULL,RSA_2048_SHA256,CTR_RSA_VERIFY);
return RsaSignVerify(data,0x300,sign,keys->rsa.acex.pub,NULL,RSA_2048_SHA256,CTR_RSA_VERIFY);
}
/* ExHeader Build Functions */