diff --git a/Makefile b/Makefile index 8413b01..7859ef5 100644 --- a/Makefile +++ b/Makefile @@ -8,10 +8,11 @@ # 最終的なビルドスイッチの設定は、以下の通り。 # DEV_CYGWIN = FALSE # USE_HSM = TRUE +# RESET_HSM = TRUE DEV_CYGWIN = FALSE USE_HSM = TRUE - +RESET_HSM = TRUE ifeq ($(USE_HSM),TRUE) @@ -125,6 +126,10 @@ LDLIBS += $(NFAST_LDLIBS) MERGE_PROG = merge_lib_objs_hsm.plx endif +ifeq ($(RESET_HSM),TRUE) +CFLAGS += -DRESET_HSM +endif + .SUFFIXES: all: package_build $(KEYS_C) $(TARGET_LIB) $(TARGET) diff --git a/cr_hsm_code.c b/cr_hsm_code.c index 867edb3..69ffd25 100644 --- a/cr_hsm_code.c +++ b/cr_hsm_code.c @@ -161,21 +161,20 @@ const NFKM_KeyIdent hsmEcdsaPubkeyidentProd = { (char*)"simple", (char*)"nct2-pu int hsm_ecdsa_load_keypair( NFKM_KeyIdent privKeyident, M_KeyID *privKeyid, NFKM_KeyIdent pubKeyident, M_KeyID *pubKeyid ); -#define EXE_AUTH_OK // init HSM int hsm_initialize( void ) { int ret_code = CR_GENID_SUCCESS; +#ifdef RESET_HSM // HSM のリセット処理 -#ifdef EXE_AUTH_OK ret_code = hsm_reset_module(); if ( ret_code != CR_GENID_SUCCESS ) { SetErrorInfo( __FUNCTION__, __LINE__ ); return ret_code; } -#endif +#endif // RESET_HSM // init HSM ret_code = NFastApp_Init( &hsmHandle, my_hsm_malloc, my_hsm_realloc, my_hsm_free, NULL );