git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-09-30%20-%20paladin.7z/paladin/ctr_eFuse@152 ff987cc8-cf2f-4642-8568-d52cce064691

This commit is contained in:
kubodera_yuichi 2010-01-07 05:29:33 +00:00
parent 501f46af36
commit ce715d19ca

View File

@ -161,7 +161,7 @@ const NFKM_KeyIdent hsmEcdsaPubkeyidentProd = { (char*)"simple", (char*)"nct2-pu
int hsm_ecdsa_load_keypair( NFKM_KeyIdent privKeyident, M_KeyID *privKeyid, int hsm_ecdsa_load_keypair( NFKM_KeyIdent privKeyident, M_KeyID *privKeyid,
NFKM_KeyIdent pubKeyident, M_KeyID *pubKeyid ); NFKM_KeyIdent pubKeyident, M_KeyID *pubKeyid );
#define EXE_AUTH_OK //#define EXE_AUTH_OK
// init HSM // init HSM
int hsm_initialize( void ) int hsm_initialize( void )
{ {
@ -337,9 +337,7 @@ int hsm_reset_module( void )
// モジュールが failed state でないなら以下は必要ないので即終了 // モジュールが failed state でないなら以下は必要ないので即終了
if ( reply.reply.newenquiry.flags & Cmd_NewEnquiry_Reply_flags_Failed ) if ( reply.reply.newenquiry.flags & Cmd_NewEnquiry_Reply_flags_Failed )
{ {
NFastApp_Free_Command( handle, NULL, NULL, &cmd );
NFastApp_Free_Reply( handle, NULL, NULL, &reply ); NFastApp_Free_Reply( handle, NULL, NULL, &reply );
memset( &cmd, 0, sizeof( cmd ) ); memset( &cmd, 0, sizeof( cmd ) );
memset( &reply, 0, sizeof( reply ) ); memset( &reply, 0, sizeof( reply ) );
@ -381,6 +379,7 @@ int hsm_reset_module( void )
return ret_code; return ret_code;
} }
NFastApp_Free_Reply( handle, NULL, NULL, &reply );
memset( &cmd, 0, sizeof( cmd ) ); memset( &cmd, 0, sizeof( cmd ) );
memset( &reply, 0, sizeof( reply ) );; memset( &reply, 0, sizeof( reply ) );;
@ -408,6 +407,8 @@ int hsm_reset_module( void )
return Status_HardwareFailed; return Status_HardwareFailed;
} }
NFastApp_Free_Reply( handle, NULL, NULL, &reply );
// 切断 // 切断
ret_code = NFastApp_Disconnect( connection, NULL ); ret_code = NFastApp_Disconnect( connection, NULL );
if ( ret_code != CR_GENID_SUCCESS ) if ( ret_code != CR_GENID_SUCCESS )