diff --git a/trunk/Makefile b/trunk/Makefile index 083b648..00ea837 100644 --- a/trunk/Makefile +++ b/trunk/Makefile @@ -7,13 +7,15 @@ # 最終的なビルドスイッチの設定は、以下の通り。 # DEV_CYGWIN = FALSE -# DEBUG_PRINT = FALSE +# DEBUG_PRINT = FALSE +# DEBUG_OUTPUT = FALSE # ECDSA_SHA256 = TRUE # USE_HSM = TRUE # RESET_HSM = TRUE DEV_CYGWIN = FALSE -DEBUG_PRINT = FALSE +DEBUG_PRINT = FALSE +DEBUG_OUTPUT = FALSE ECDSA_SHA256 = TRUE USE_HSM = TRUE RESET_HSM = TRUE @@ -127,6 +129,10 @@ ifeq ($(DEBUG_PRINT),TRUE) CFLAGS += -DDEBUG_PRINT endif +ifeq ($(DEBUG_OUTPUT),TRUE) +CFLAGS += -DDEBUG_OUTPUT_FILE +endif + ifeq ($(ECDSA_SHA256),TRUE) CFLAGS += -DECDSA_SHA256 endif diff --git a/trunk/cr_device_cert.c b/trunk/cr_device_cert.c index 5e21657..4ed63a7 100644 --- a/trunk/cr_device_cert.c +++ b/trunk/cr_device_cert.c @@ -336,14 +336,14 @@ int GenerateCTRDeviceCert( EC_KEY *pECkey, u32 device_id, u8 bonding_option, u8 #endif // USE_HSM -#ifdef DEBUG_DEVICE_CERT_OUTPUT_FILE +#ifdef DEBUG_OUTPUT_FILE #ifdef ECDSA_SHA256 DebugFileOutput( device_id, "dgst", sha256Buf, 32 ); #else // !ECDSA_SHA256 DebugFileOutput( device_id, "dgst", sha1Buf, 20 ); #endif // ECDSA_SHA256 DebugFileOutput( device_id, "sign", deviceCert.eccSignature, 60 ); -#endif // DEBUG_DEVICE_CERT_OUTPUT_FILE +#endif // DEBUG_OUTPUT_FILE // ECDSA鄂イ蜷肴、懆ィシ { @@ -425,9 +425,9 @@ int GenerateCTRDeviceCert( EC_KEY *pECkey, u32 device_id, u8 bonding_option, u8 DEBUG_PRINT_ARRAY( "padding1:", (const char *)deviceCert.padding1, sizeof(deviceCert.padding1) ); } #endif // DEBUG_PRINT -#ifdef DEBUG_DEVICE_CERT_OUTPUT_FILE +#ifdef DEBUG_OUTPUT_FILE DebugFileOutput( device_id, "crt", (const u8 *)&deviceCert, sizeof(CR_DeviceCert) ); -#endif // DEBUG_DEVICE_CERT_OUTPUT_FILE +#endif // DEBUG_OUTPUT_FILE end: if( NCT2 ) EC_KEY_free( NCT2 ); diff --git a/trunk/cr_generate_id.c b/trunk/cr_generate_id.c index 19db009..6ecf7b1 100644 --- a/trunk/cr_generate_id.c +++ b/trunk/cr_generate_id.c @@ -348,9 +348,9 @@ int cr_generate_id( u32 device_id[CR_NUM_OF_DEVICEID], u8 id_buf[CR_ID_BUF_SIZE] // FuseID RAW繝繝シ繧ソ螳梧 //-------------------------------------------------------------- DEBUG_PRINT_ARRAY( "RAW eFuseID:", (const char *)id_buf, CR_ID_BUF_SIZE ); -#ifdef DEBUG_EFUSE_ID_OUTPUT_FILE +#ifdef DEBUG_OUTPUT_FILE DebugFileOutput( device_id[ 0 ], "raw", id_buf, CR_ID_BUF_SIZE ); -#endif // DEBUG_EFUSE_ID_OUTPUT_FILE +#endif // DEBUG_OUTPUT_FILE //-------------------------------------------------------------- // FuseID繝舌ャ繝輔ぃ蜈ィ菴薙rAES or RSA縺ァ證怜捷蛹 @@ -362,9 +362,9 @@ int cr_generate_id( u32 device_id[CR_NUM_OF_DEVICEID], u8 id_buf[CR_ID_BUF_SIZE] } DEBUG_PRINT_ARRAY( "ENC eFuseID:", (const char *)id_buf, CR_ID_BUF_SIZE ); -#ifdef DEBUG_EFUSE_ID_OUTPUT_FILE +#ifdef DEBUG_OUTPUT_FILE DebugFileOutput( device_id[ 0 ], "enc", id_buf, CR_ID_BUF_SIZE ); -#endif // DEBUG_EFUSE_ID_OUTPUT_FILE +#endif // DEBUG_OUTPUT_FILE //-------------------------------------------------------------- // 邨ゆコ蜃ヲ逅