diff --git a/hsm_utils/import_ecdsa_keypair.c b/hsm_utils/import_ecdsa_keypair.c index cdde51b..993bb96 100644 --- a/hsm_utils/import_ecdsa_keypair.c +++ b/hsm_utils/import_ecdsa_keypair.c @@ -24,8 +24,8 @@ #include "my_hsm_bignum.h" #include "my_hsm_alloc.h" -#define PRIV_KEY_FILE "/opt/nfast/work/hoge/ctr_eFuse/dummyKey/dev/NintendoCTR2_priv_dummy.der" -#define PUB_KEY_FILE "/opt/nfast/work/hoge/ctr_eFuse/dummyKey/dev/NintendoCTR2_pub_dummy.der" +#define PRIV_KEY_FILE "/opt/nfast/work/ctr_eFuse/hsm_utils/real_key/hoge/NintendoCTR2_privkey_prod.der" +#define PUB_KEY_FILE "/opt/nfast/work/ctr_eFuse/hsm_utils/real_key/hoge/NintendoCTR2_pubkey_prod.der" #define MODULE_ID 1 #define DATA_LEN 256 // bytes @@ -61,8 +61,8 @@ RQCard_FIPS fips; M_KeyID ltid = 0; // the cardset loaded into the module NFKM_CardSet *cardset = NULL; NFKM_ModuleInfo *moduleinfo = NULL; -const NFKM_KeyIdent priv_keyident = { (char*)"simple", (char*)"nintendo-ctr2-priv-dummy-dev" }; -const NFKM_KeyIdent pub_keyident = { (char*)"simple", (char*)"nintendo-ctr2-pub-dummy-dev" }; +const NFKM_KeyIdent priv_keyident = { (char*)"simple", (char*)"nct2-priv-hoge" }; +const NFKM_KeyIdent pub_keyident = { (char*)"simple", (char*)"nct2-pub-hoge" }; unsigned char save_enc[DATA_LEN]; @@ -100,6 +100,7 @@ int importECDSAPrivate( NFKM_KeyIdent keyident ) memset( &privBn, 0, sizeof( privBn ) ); // key data open + printf( "priv key file : %s\n", PRIV_KEY_FILE ); fp = fopen( PRIV_KEY_FILE, "rb" ); if ( !fp ) { @@ -229,6 +230,9 @@ int importECDSAPrivate( NFKM_KeyIdent keyident ) return 1; } + printf( "priv key record success : appname=%s, ident=%s\n", + priv_keyident.appname, priv_keyident.ident ); + return result; } // importECDSAPrivate @@ -258,6 +262,7 @@ int importECDSAPublic( NFKM_KeyIdent keyident ) memset( &pubBn, 0, sizeof( pubBn ) ); // key data open + printf( "pub key file : %s\n", PUB_KEY_FILE ); fp = fopen( PUB_KEY_FILE, "rb" ); if ( !fp ) { @@ -400,6 +405,9 @@ int importECDSAPublic( NFKM_KeyIdent keyident ) return 1; } + printf( "pub key record success : appname=%s, ident=%s\n", + pub_keyident.appname, pub_keyident.ident ); + return result; } // importECDSAPublic