diff --git a/services/authenticators/src/account_related/auth/iso_auth_task/iso_auth_task_common.c b/services/authenticators/src/account_related/auth/iso_auth_task/iso_auth_task_common.c index fa49ad9c745287686871991b42cd4636c4f30dcb..7ad5706a952f30ecb63c847584ae9a1b2d9fe321 100755 --- a/services/authenticators/src/account_related/auth/iso_auth_task/iso_auth_task_common.c +++ b/services/authenticators/src/account_related/auth/iso_auth_task/iso_auth_task_common.c @@ -156,11 +156,11 @@ static int32_t GenerateAuthTokenForAccessory(const IsoAuthParams *params, Uint8B LOGE("Malloc for authToken failed, res: %d.", res); return res; } - Uint8Buff userIdSelfBuff = { - .val = (uint8_t *)(params->userIdSelf), - .length = HcStrlen(params->userIdSelf) + Uint8Buff userIdPeerBuff = { + .val = (uint8_t *)(params->userIdPeer), + .length = HcStrlen(params->userIdPeer) }; - res = params->isoBaseParams.loader->computeHkdf(&keyAlias, &userIdSelfBuff, ¶ms->challenge, outKey, true); + res = params->isoBaseParams.loader->computeHkdf(&keyAlias, &userIdPeerBuff, ¶ms->challenge, outKey, true); if (res != HC_SUCCESS) { LOGE("Failed to computeHkdf from authCode to authToken."); FreeAndCleanKey(outKey);