mirror of
https://github.com/rvtr/ctr_eFuse.git
synced 2025-11-02 00:11:04 -04:00
HSM使用時にバッファに署名が含まれない問題を修正。
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-09-30%20-%20paladin.7z/paladin/ctr_eFuse@182 ff987cc8-cf2f-4642-8568-d52cce064691
This commit is contained in:
parent
6d74f78f38
commit
5dd58dde3a
@ -249,6 +249,7 @@ int GenerateCTRDeviceCert( EC_KEY *pECkey, u32 device_id, u8 bonding_option, u8
|
|||||||
SetErrorInfo( __FUNCTION__, __LINE__ );
|
SetErrorInfo( __FUNCTION__, __LINE__ );
|
||||||
return ret_code;
|
return ret_code;
|
||||||
}
|
}
|
||||||
|
memcpy( pDevCertSign, &deviceCert.eccSignature, 60 );
|
||||||
#else // !USE_HSM
|
#else // !USE_HSM
|
||||||
// DERフォーマットのECC鍵を読み込み
|
// DERフォーマットのECC鍵を読み込み
|
||||||
{
|
{
|
||||||
@ -412,7 +413,7 @@ int GenerateCTRDeviceCert( EC_KEY *pECkey, u32 device_id, u8 bonding_option, u8
|
|||||||
|
|
||||||
ret_code = CR_GENID_SUCCESS;
|
ret_code = CR_GENID_SUCCESS;
|
||||||
|
|
||||||
#if 0
|
#ifdef DEBUG_PRINT
|
||||||
if ( cr_print_flag )
|
if ( cr_print_flag )
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@ -436,12 +437,11 @@ int GenerateCTRDeviceCert( EC_KEY *pECkey, u32 device_id, u8 bonding_option, u8
|
|||||||
}
|
}
|
||||||
DEBUG_PRINT_ARRAY( "eccPubKey :", (const char *)deviceCert.eccPubKey, sizeof(deviceCert.eccPubKey) );
|
DEBUG_PRINT_ARRAY( "eccPubKey :", (const char *)deviceCert.eccPubKey, sizeof(deviceCert.eccPubKey) );
|
||||||
DEBUG_PRINT_ARRAY( "padding1:", (const char *)deviceCert.padding1, sizeof(deviceCert.padding1) );
|
DEBUG_PRINT_ARRAY( "padding1:", (const char *)deviceCert.padding1, sizeof(deviceCert.padding1) );
|
||||||
|
}
|
||||||
|
#endif // DEBUG_PRINT
|
||||||
#ifdef DEBUG_DEVICE_CERT_OUTPUT_FILE
|
#ifdef DEBUG_DEVICE_CERT_OUTPUT_FILE
|
||||||
DebugFileOutput( device_id, "crt", (const u8 *)&deviceCert, sizeof(CR_DeviceCert) );
|
DebugFileOutput( device_id, "crt", (const u8 *)&deviceCert, sizeof(CR_DeviceCert) );
|
||||||
#endif // DEBUG_DEVICE_CERT_OUTPUT_FILE
|
#endif // DEBUG_DEVICE_CERT_OUTPUT_FILE
|
||||||
}
|
|
||||||
#endif // dump deviceCert
|
|
||||||
|
|
||||||
end:
|
end:
|
||||||
if( NCT2 ) EC_KEY_free( NCT2 );
|
if( NCT2 ) EC_KEY_free( NCT2 );
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user