エラーコード関連の修正

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:
kubodera_yuichi 2009-12-23 02:44:41 +00:00
parent 577d8d1951
commit d5005c0ba7
3 changed files with 6 additions and 9 deletions

View File

@ -166,9 +166,7 @@ int GenerateCTRDeviceCert( EC_KEY *pECkey, u32 deviceId, u8 bondingOption, u8 *p
if ( sizeof( CR_DeviceCert ) > 384 ) if ( sizeof( CR_DeviceCert ) > 384 )
{ {
printf( "err.\n" ); ret_code = CR_GENID_ERROR_CERT_BUF_SIZE;
//ret_code = CR_GENID_ERROR_CERT_BUF_SIZE; // ATODE
ret_code = 255;
goto end; goto end;
} }
@ -221,8 +219,7 @@ int GenerateCTRDeviceCert( EC_KEY *pECkey, u32 deviceId, u8 bondingOption, u8 *p
// ECCは、秘密鍵のみで公開鍵成分もセットされるようなので、公開鍵は読み込まない。 // ECCは、秘密鍵のみで公開鍵成分もセットされるようなので、公開鍵は読み込まない。
NintendoCTR2 = d2i_ECPrivateKey( NULL, &der_priv, priv_len ); NintendoCTR2 = d2i_ECPrivateKey( NULL, &der_priv, priv_len );
if( NintendoCTR2 == NULL ) { if( NintendoCTR2 == NULL ) {
// ret_code = CR_GENID_ERROR_ECC_READ_PRIVATE_KEY; // TODO: ret_code = CR_GENID_ERROR_ECC_READ_PRIVATE_KEY;
ret_code = 255;
goto end; goto end;
} }
#if 0 #if 0

View File

@ -160,8 +160,7 @@ int cr_generate_id_initialize( void )
ret_code = hsm_initialize(); ret_code = hsm_initialize();
if ( ret_code != CR_GENID_SUCCESS ) if ( ret_code != CR_GENID_SUCCESS )
{ {
printf( "error(%d) : NFastApp_InitEx\n", ret_code ); return 0;
return ret_code;
} }
#endif #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 */ cr_id_buf->serial[i] = serial[i]; /* serial[0] => ec priv key */
} }
//#ifdef DEBUG_PRINT #ifdef DEBUG_PRINT
#if 1
if( cr_print_flag ) { if( cr_print_flag ) {
printf("serialNo:\n"); printf("serialNo:\n");
printf(" 0x%08x\n", (unsigned int)serial[0] ); printf(" 0x%08x\n", (unsigned int)serial[0] );

View File

@ -143,6 +143,8 @@
#define CR_GENID_ERROR_AES_ENC (-22) #define CR_GENID_ERROR_AES_ENC (-22)
#define CR_GENID_ERROR_AES_DEC (-23) #define CR_GENID_ERROR_AES_DEC (-23)
#define CR_GENID_ERROR_AES_VERIFY (-24) #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の処理結果によるエラーコード // HSMの処理結果によるエラーコード