mirror of
https://github.com/rvtr/TwlIPL.git
synced 2025-10-31 06:01:12 -04:00
証明書の完全非対応化
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@727 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
parent
b6801335fb
commit
9be668cd6d
@ -92,7 +92,7 @@ static inline BOOL CheckDigest( u8* a, u8* b, BOOL aClr, BOOL bClr )
|
|||||||
if ( bClr ) MI_CpuClear8(b, SVC_SHA1_DIGEST_SIZE);
|
if ( bClr ) MI_CpuClear8(b, SVC_SHA1_DIGEST_SIZE);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
#ifdef SUPPORT_CERTIFICATION
|
||||||
/*---------------------------------------------------------------------------*
|
/*---------------------------------------------------------------------------*
|
||||||
Name: CheckRomCertificate
|
Name: CheckRomCertificate
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ static BOOL CheckRomCertificate( SVCSignHeapContext* pool, const RomCertificate
|
|||||||
// 比較
|
// 比較
|
||||||
return CheckDigest(md, digest, TRUE, TRUE);
|
return CheckDigest(md, digest, TRUE, TRUE);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
/*---------------------------------------------------------------------------*
|
/*---------------------------------------------------------------------------*
|
||||||
Name: FS_LoadBuffer
|
Name: FS_LoadBuffer
|
||||||
|
|
||||||
@ -314,7 +314,7 @@ BOOL FS_LoadHeader( SVCSignHeapContext* pool, const void* rsa_key1, const void*
|
|||||||
|
|
||||||
// 鍵の確定
|
// 鍵の確定
|
||||||
rsa_key = (rh->s.titleID_Hi & 0x1) ? rsa_key2 : rsa_key1;
|
rsa_key = (rh->s.titleID_Hi & 0x1) ? rsa_key2 : rsa_key1;
|
||||||
|
#ifdef SUPPORT_CERTIFICATION
|
||||||
// コンテンツ証明書
|
// コンテンツ証明書
|
||||||
if ( CheckRomCertificate( pool, &rh->certificate, rsa_key, *(u32*)rh->s.game_code ) )
|
if ( CheckRomCertificate( pool, &rh->certificate, rsa_key, *(u32*)rh->s.game_code ) )
|
||||||
{
|
{
|
||||||
@ -324,7 +324,7 @@ BOOL FS_LoadHeader( SVCSignHeapContext* pool, const void* rsa_key1, const void*
|
|||||||
{
|
{
|
||||||
// とりあえずコンテンツ証明書用の鍵がそのまま使えると仮定
|
// とりあえずコンテンツ証明書用の鍵がそのまま使えると仮定
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
// ヘッダ署名チェック
|
// ヘッダ署名チェック
|
||||||
SVC_DecryptSign( pool, &sd, rh->signature, rsa_key );
|
SVC_DecryptSign( pool, &sd, rh->signature, rsa_key );
|
||||||
|
|
||||||
|
|||||||
@ -98,7 +98,7 @@ static inline BOOL CheckDigest( u8* a, u8* b, BOOL aClr, BOOL bClr )
|
|||||||
if ( bClr ) MI_CpuClear8(b, SVC_SHA1_DIGEST_SIZE);
|
if ( bClr ) MI_CpuClear8(b, SVC_SHA1_DIGEST_SIZE);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
#ifdef SUPPORT_CERTIFICATION
|
||||||
/*---------------------------------------------------------------------------*
|
/*---------------------------------------------------------------------------*
|
||||||
Name: CheckRomCertificate
|
Name: CheckRomCertificate
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ static BOOL CheckRomCertificate( SVCSignHeapContext* pool, const RomCertificate
|
|||||||
// 比較
|
// 比較
|
||||||
return CheckDigest(md, digest, TRUE, TRUE);
|
return CheckDigest(md, digest, TRUE, TRUE);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
static void AesCallback(AESResult result, void* arg)
|
static void AesCallback(AESResult result, void* arg)
|
||||||
{
|
{
|
||||||
volatile BOOL *pBusy = (BOOL*)arg;
|
volatile BOOL *pBusy = (BOOL*)arg;
|
||||||
@ -336,7 +336,7 @@ BOOL FS2_LoadHeader( FSFile *pFile, SVCSignHeapContext* pool, const void* rsa_ke
|
|||||||
|
|
||||||
// 鍵の確定
|
// 鍵の確定
|
||||||
rsa_key = (rh->s.titleID_Hi & 0x1) ? rsa_key2 : rsa_key1;
|
rsa_key = (rh->s.titleID_Hi & 0x1) ? rsa_key2 : rsa_key1;
|
||||||
|
#ifdef SUPPORT_CERTIFICATION
|
||||||
// コンテンツ証明書
|
// コンテンツ証明書
|
||||||
if ( CheckRomCertificate( pool, &rh->certificate, rsa_key, *(u32*)rh->s.game_code ) )
|
if ( CheckRomCertificate( pool, &rh->certificate, rsa_key, *(u32*)rh->s.game_code ) )
|
||||||
{
|
{
|
||||||
@ -346,7 +346,7 @@ BOOL FS2_LoadHeader( FSFile *pFile, SVCSignHeapContext* pool, const void* rsa_ke
|
|||||||
{
|
{
|
||||||
// とりあえずコンテンツ証明書用の鍵がそのまま使えると仮定
|
// とりあえずコンテンツ証明書用の鍵がそのまま使えると仮定
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
// ヘッダ署名チェック
|
// ヘッダ署名チェック
|
||||||
SVC_DecryptSign( pool, &sd, rh->signature, rsa_key );
|
SVC_DecryptSign( pool, &sd, rh->signature, rsa_key );
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user