mirror of
https://github.com/rvtr/ctr_eFuse.git
synced 2025-11-02 00:11:04 -04:00
エラーコード関連の修正
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-09-30%20-%20paladin.7z/paladin/ctr_eFuse@44 ff987cc8-cf2f-4642-8568-d52cce064691
This commit is contained in:
parent
577d8d1951
commit
d5005c0ba7
@ -166,9 +166,7 @@ int GenerateCTRDeviceCert( EC_KEY *pECkey, u32 deviceId, u8 bondingOption, u8 *p
|
||||
|
||||
if ( sizeof( CR_DeviceCert ) > 384 )
|
||||
{
|
||||
printf( "err.\n" );
|
||||
//ret_code = CR_GENID_ERROR_CERT_BUF_SIZE; // ATODE
|
||||
ret_code = 255;
|
||||
ret_code = CR_GENID_ERROR_CERT_BUF_SIZE;
|
||||
goto end;
|
||||
}
|
||||
|
||||
@ -221,8 +219,7 @@ int GenerateCTRDeviceCert( EC_KEY *pECkey, u32 deviceId, u8 bondingOption, u8 *p
|
||||
// ECCは、秘密鍵のみで公開鍵成分もセットされるようなので、公開鍵は読み込まない。
|
||||
NintendoCTR2 = d2i_ECPrivateKey( NULL, &der_priv, priv_len );
|
||||
if( NintendoCTR2 == NULL ) {
|
||||
// ret_code = CR_GENID_ERROR_ECC_READ_PRIVATE_KEY; // TODO:
|
||||
ret_code = 255;
|
||||
ret_code = CR_GENID_ERROR_ECC_READ_PRIVATE_KEY;
|
||||
goto end;
|
||||
}
|
||||
#if 0
|
||||
|
||||
@ -160,8 +160,7 @@ int cr_generate_id_initialize( void )
|
||||
ret_code = hsm_initialize();
|
||||
if ( ret_code != CR_GENID_SUCCESS )
|
||||
{
|
||||
printf( "error(%d) : NFastApp_InitEx\n", ret_code );
|
||||
return ret_code;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -264,8 +263,7 @@ int cr_generate_id( u32 serial[CR_NUM_OF_SERIAL], u8 id_buf[CR_ID_BUF_SIZE], u8
|
||||
cr_id_buf->serial[i] = serial[i]; /* serial[0] => ec priv key */
|
||||
}
|
||||
|
||||
//#ifdef DEBUG_PRINT
|
||||
#if 1
|
||||
#ifdef DEBUG_PRINT
|
||||
if( cr_print_flag ) {
|
||||
printf("serialNo:\n");
|
||||
printf(" 0x%08x\n", (unsigned int)serial[0] );
|
||||
|
||||
@ -143,6 +143,8 @@
|
||||
#define CR_GENID_ERROR_AES_ENC (-22)
|
||||
#define CR_GENID_ERROR_AES_DEC (-23)
|
||||
#define CR_GENID_ERROR_AES_VERIFY (-24)
|
||||
#define CR_GENID_ERROR_CERT_BUF_SIZE (-25)
|
||||
#define CR_GENID_ERROR_ECC_READ_PRIVATE_KEY (-26)
|
||||
|
||||
//---------------------------------------------------
|
||||
// HSMの処理結果によるエラーコード
|
||||
|
||||
Loading…
Reference in New Issue
Block a user