@@ -1375,12 +1375,12 @@ static int _HandleCmacKdf(whServerContext* ctx, uint16_t magic,
13751375 uint32_t zSz = req .zSz ;
13761376 uint32_t fixedInfoSz = req .fixedInfoSz ;
13771377 uint32_t outSz = req .outSz ;
1378- whKeyId keyIdOut =
1379- WH_MAKE_KEYID ( WH_KEYTYPE_CRYPTO , ctx -> comm -> client_id , req .keyIdOut );
1380- whKeyId saltKeyId =
1381- WH_MAKE_KEYID ( WH_KEYTYPE_CRYPTO , ctx -> comm -> client_id , req .keyIdSalt );
1382- whKeyId zKeyId =
1383- WH_MAKE_KEYID ( WH_KEYTYPE_CRYPTO , ctx -> comm -> client_id , req .keyIdZ );
1378+ whKeyId keyIdOut = wh_KeyId_TranslateFromClient (
1379+ WH_KEYTYPE_CRYPTO , ctx -> comm -> client_id , req .keyIdOut );
1380+ whKeyId saltKeyId = wh_KeyId_TranslateFromClient (
1381+ WH_KEYTYPE_CRYPTO , ctx -> comm -> client_id , req .keyIdSalt );
1382+ whKeyId zKeyId = wh_KeyId_TranslateFromClient (
1383+ WH_KEYTYPE_CRYPTO , ctx -> comm -> client_id , req .keyIdZ );
13841384 whNvmFlags flags = (whNvmFlags )req .flags ;
13851385 uint8_t * label = req .label ;
13861386 uint16_t label_size = WH_NVM_LABEL_LEN ;
@@ -1454,7 +1454,7 @@ static int _HandleCmacKdf(whServerContext* ctx, uint16_t magic,
14541454 ret = wh_Server_CmacKdfKeyCacheImport (ctx , out , outSz , keyIdOut ,
14551455 flags , label_size , label );
14561456 if (ret == WH_ERROR_OK ) {
1457- res .keyIdOut = WH_KEYID_ID (keyIdOut );
1457+ res .keyIdOut = wh_KeyId_TranslateToClient (keyIdOut );
14581458 res .outSz = 0 ;
14591459 memset (out , 0 , outSz );
14601460 }
0 commit comments