mirror of
https://github.com/DarkStore-3DS/Project_CTR.git
synced 2026-07-03 00:39:14 +00:00
makerom: fixes
Moved away from ctrtool's polarssl api completely. Brought certs.c/h inline with code style, fixed bugs relating to tmd savedata field generation and not recording savedata size from rsf (ncsd.c)
This commit is contained in:
+6
-6
@@ -53,16 +53,16 @@ int get_ExHeaderARM9AccessControlInfo(exhdr_ARM9AccessControlInfo *arm9, rsf_set
|
||||
/* ExHeader Signature Functions */
|
||||
int SignAccessDesc(access_descriptor *acexDesc, keys_struct *keys)
|
||||
{
|
||||
u8 *AccessDesc = (u8*) &acexDesc->ncchRsaPubKey;
|
||||
u8 *Signature = (u8*) &acexDesc->signature;
|
||||
return ctr_sig(AccessDesc,0x300,Signature,keys->rsa.acexPub,keys->rsa.acexPvt,RSA_2048_SHA256,CTR_RSA_SIGN);
|
||||
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);
|
||||
}
|
||||
|
||||
int CheckAccessDescSignature(access_descriptor *acexDesc, keys_struct *keys)
|
||||
{
|
||||
u8 *AccessDesc = (u8*) &acexDesc->ncchRsaPubKey;
|
||||
u8 *Signature = (u8*) &acexDesc->signature;
|
||||
return ctr_sig(AccessDesc,0x300,Signature,keys->rsa.acexPub,NULL,RSA_2048_SHA256,CTR_RSA_VERIFY);
|
||||
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);
|
||||
}
|
||||
|
||||
/* ExHeader Build Functions */
|
||||
|
||||
Reference in New Issue
Block a user