diff --git a/cr_deviceCert.c b/cr_deviceCert.c index 9fb4d35..8ec063b 100644 --- a/cr_deviceCert.c +++ b/cr_deviceCert.c @@ -259,8 +259,7 @@ int GenerateCTRDeviceCert( EC_KEY *pECkey, u32 deviceId, u8 bondingOption, u8 *p // DERデコードして、r と s を eccSignature にセット sig = d2i_ECDSA_SIG( NULL, &pECDSAsig, signLen ); if( sig == NULL ) { - // TODO: エラーコードを決める - ret_code = 255; + ret_code = CR_GENID_ERROR_ECDSA_DECODE; goto end; } #if 0 diff --git a/cr_generate_id.h b/cr_generate_id.h index d53a93f..387224d 100644 --- a/cr_generate_id.h +++ b/cr_generate_id.h @@ -118,6 +118,7 @@ //--------------------------------------------------- // OpenSSL̏ʂɂG[R[h //--------------------------------------------------- +// TODO : ޖɃ\[gKv #define CR_GENID_ERROR_RSA_ENC ( -1) #define CR_GENID_ERROR_RSA_DEC ( -2) #define CR_GENID_ERROR_RSA_VERIFY ( -3) @@ -144,6 +145,7 @@ #define CR_GENID_ERROR_AES_VERIFY (-24) #define CR_GENID_ERROR_CERT_BUF_SIZE (-25) #define CR_GENID_ERROR_ECC_READ_PRIVATE_KEY (-26) +#define CR_GENID_ERROR_ECDSA_DECODE (-27) //--------------------------------------------------- // HSM̏ʂɂG[R[h