Home
last modified time | relevance | path

Searched refs:peerAuthId (Results 1 – 16 of 16) sorted by relevance

/ohos5.0/base/security/device_auth/services/legacy/group_auth/src/group_auth_manager/account_unrelated_group_auth/
H A Daccount_unrelated_group_auth.c112 const char *peerAuthId = GetStringFromJson(authParam, FIELD_PEER_AUTH_ID); in AddPeerAuthIdToSelfData() local
113 if (peerAuthId == NULL) { in AddPeerAuthIdToSelfData()
118 if (AddStringToJson(returnToSelf, FIELD_PEER_AUTH_ID, peerAuthId) != HC_SUCCESS) { in AddPeerAuthIdToSelfData()
345 if (peerAuthId == NULL) { in AddNonAccountAuthInfo()
346 peerAuthId = StringGet(&peerAuthInfo->authId); in AddNonAccountAuthInfo()
348 if (AddStringToJson(paramsData, FIELD_PEER_AUTH_ID, peerAuthId) != HC_SUCCESS) { in AddNonAccountAuthInfo()
371 if (peerAuthId == NULL) { in FillNonAccountAuthInfo()
372 peerAuthId = GetStringFromJson(paramsData, FIELD_PEER_AUTH_ID); in FillNonAccountAuthInfo()
376 } else if (peerAuthId != NULL) { in FillNonAccountAuthInfo()
424 const char *peerAuthId = GetStringFromJson(confirmationJson, FIELD_PEER_AUTH_ID); in CombineDasServerConfirmParams() local
[all …]
/ohos5.0/base/security/device_auth/services/legacy/group_manager/src/group_operation/peer_to_peer_group/
H A Dpeer_to_peer_group.c206 int32_t peerUserType = GetPeerDevUserTypeFromDb(osAccountId, groupId, peerAuthId); in DelPeerDevAndKeyInfo()
209 queryDeviceParams.authId = peerAuthId; in DelPeerDevAndKeyInfo()
218 .val = (uint8_t *)peerAuthId, in DelPeerDevAndKeyInfo()
219 .length = HcStrlen(peerAuthId) in DelPeerDevAndKeyInfo()
329 const char *peerAuthId = GetStringFromJson(jsonParams, FIELD_DELETE_ID); in HandleLocalUnbind() local
330 if (peerAuthId == NULL) { in HandleLocalUnbind()
344 int result = DelPeerDevAndKeyInfo(osAccountId, groupId, peerAuthId); in HandleLocalUnbind()
354 result = GenerateUnbindSuccessData(peerAuthId, groupId, &returnDataStr); in HandleLocalUnbind()
365 const char *peerAuthId = GetStringFromJson(jsonParams, FIELD_DELETE_ID); in CheckPeerDeviceStatus() local
366 if (peerAuthId == NULL) { in CheckPeerDeviceStatus()
[all …]
/ohos5.0/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/common/
H A Ddas_task_common.c245 …c int32_t CombineKeyAliasForPseudonymPsk(const Uint8Buff *serviceType, const Uint8Buff *peerAuthId, in CombineKeyAliasForPseudonymPsk() argument
249 keyAliasBuff.length = serviceType->length + peerAuthId->length + keyType->length; in CombineKeyAliasForPseudonymPsk()
267 …if (memcpy_s(keyAliasBuff.val + usedLen, totalLen - usedLen, peerAuthId->val, peerAuthId->length) … in CombineKeyAliasForPseudonymPsk()
272 usedLen = usedLen + peerAuthId->length; in CombineKeyAliasForPseudonymPsk()
395 static int32_t CheckGeneratePskParams(const Uint8Buff *serviceType, const Uint8Buff *peerAuthId, in CheckGeneratePskParams() argument
400 CHECK_PTR_RETURN_ERROR_CODE(peerAuthId, "peerAuthId"); in CheckGeneratePskParams()
401 CHECK_PTR_RETURN_ERROR_CODE(peerAuthId->val, "peerAuthId->val"); in CheckGeneratePskParams()
404 if (serviceType->length == 0 || peerAuthId->length == 0 || outKeyAlias->length == 0) { in CheckGeneratePskParams()
408 if (serviceType->length > SERVICE_TYPE_MAX_LEN || peerAuthId->length > AUTH_ID_MAX_LEN) { in CheckGeneratePskParams()
421 int32_t res = CheckGeneratePskParams(serviceType, peerAuthId, outKeyAlias); in GeneratePseudonymPskAlias()
[all …]
/ohos5.0/base/security/device_auth/services/identity_manager/src/
H A Didentity_p2p.c196 …_t ComputeAndSaveDirectAuthPsk(int32_t osAccountId, const char *selfAuthId, const char *peerAuthId, in ComputeAndSaveDirectAuthPsk() argument
215 Uint8Buff peerAuthIdBuff = { (uint8_t *)peerAuthId, HcStrlen(peerAuthId) }; in ComputeAndSaveDirectAuthPsk()
255 const char *peerAuthId = GetStringFromJson(in, FIELD_PEER_CONN_DEVICE_ID); in GetDirectAuthPskAliasCreateIfNeeded() local
256 if (peerAuthId == NULL) { in GetDirectAuthPskAliasCreateIfNeeded()
267 Uint8Buff peerAuthIdBuff = { (uint8_t *)peerAuthId, HcStrlen(peerAuthId) }; in GetDirectAuthPskAliasCreateIfNeeded()
277 …ret = ComputeAndSaveDirectAuthPsk(osAccountId, selfAuthId, peerAuthId, peerServieType, pskKeyAlias… in GetDirectAuthPskAliasCreateIfNeeded()
H A Didentity_group.c143 const char *peerAuthId = StringGet(&deviceEntry->authId); in IsP2pAuthTokenExist() local
144 Uint8Buff peerAuthIdBuff = { (uint8_t *)peerAuthId, HcStrlen(peerAuthId) }; in IsP2pAuthTokenExist()
458 const char *peerAuthId = StringGet(&deviceEntry->authId); in GenerateKeyAliasForIso() local
459 Uint8Buff peerAuthIdBuff = { (uint8_t *)peerAuthId, (uint32_t)HcStrlen(peerAuthId) }; in GenerateKeyAliasForIso()
622 const char *peerAuthId = StringGet(&peerDeviceEntry->authId); in GeneratePeerKeyAlias() local
623 Uint8Buff peerAuthIdBuff = { (uint8_t *)peerAuthId, HcStrlen(peerAuthId) }; in GeneratePeerKeyAlias()
743 const char *peerAuthId = StringGet(&deviceEntry->authId); in GeneratePskAliasAndCheckExist() local
744 Uint8Buff peerAuthIdBuff = { (uint8_t *)peerAuthId, HcStrlen(peerAuthId) }; in GeneratePskAliasAndCheckExist()
H A Dcredential_operator.c506 …teAndSavePsk(int32_t osAccountId, const char *peerServiceType, const char *peerAuthId, int keyType) in ComputeAndSavePsk() argument
528 …res = GenerateKeyAliasInner(DEFAULT_PACKAGE_NAME, peerServiceType, peerAuthId, keyType, &peerKeyAl… in ComputeAndSavePsk()
548 …res = GenerateKeyAliasInner(DEFAULT_PACKAGE_NAME, peerServiceType, peerAuthId, KEY_ALIAS_PSK, &sha… in ComputeAndSavePsk()
/ohos5.0/base/security/device_auth/services/session_manager/src/session/v1/compatible_bind_sub_session/
H A Dcompatible_bind_sub_session.c310 int32_t result = GenerateBindSuccessData(peerAuthId, peerUdid, groupId, &jsonDataStr); in InformSelfBindSuccess()
478 static int32_t AddPeerDevToGroup(const char *peerAuthId, const char *peerUdid, in AddPeerDevToGroup() argument
492 static int32_t AddGroupAndDev(const char *peerAuthId, const char *peerUdid, const char *groupId, in AddGroupAndDev() argument
499 result = AddPeerDevToGroup(peerAuthId, peerUdid, groupId, session); in AddGroupAndDev()
510 int32_t result = AddGroupAndDev(peerAuthId, peerUdid, groupId, session); in HandleBindSuccess()
515 return InformSelfBindSuccess(peerAuthId, peerUdid, groupId, session, out); in HandleBindSuccess()
520 const char *peerAuthId = GetStringFromJson(jsonParams, FIELD_PEER_DEVICE_ID); in OnBindFinish() local
521 if (peerAuthId == NULL) { in OnBindFinish()
522 peerAuthId = GetStringFromJson(session->params, FIELD_PEER_AUTH_ID); in OnBindFinish()
523 if (peerAuthId == NULL) { in OnBindFinish()
[all …]
H A Dcompatible_bind_sub_session_common.c398 const char *peerAuthId = GetStringFromJson(jsonParams, FIELD_PEER_DEVICE_ID); in AddPeerAuthIdAndUdidIfExist() local
399 …if (peerAuthId != NULL && AddStringToJson(session->params, FIELD_PEER_AUTH_ID, peerAuthId) != HC_S… in AddPeerAuthIdAndUdidIfExist()
/ohos5.0/base/security/device_auth/services/session_manager/src/session/v2/
H A Ddev_session_util.c235 const char *peerAuthId = StringGet(&entry->authId); in SetPeerAuthIdByDb() local
236 if (AddStringToJson(context, FIELD_PEER_AUTH_ID, peerAuthId) != HC_SUCCESS) { in SetPeerAuthIdByDb()
247 const char *peerAuthId = GetStringFromJson(context, FIELD_PEER_AUTH_ID); in FillPeerAuthIdIfNeeded() local
248 if (peerAuthId == NULL) { in FillPeerAuthIdIfNeeded()
257 Uint8Buff authIdBuff = { (uint8_t *)peerAuthId, HcStrlen(peerAuthId) + 1 }; in FillPeerAuthIdIfNeeded()
/ohos5.0/base/security/device_auth/services/session_manager/src/session/v1/compatible_auth_sub_session/
H A Dcompatible_auth_sub_session_common.c176 const char *peerAuthId, const char *groupId) in AddUpgradeFlagToParams() argument
186 } else if (peerAuthId != NULL) { in AddUpgradeFlagToParams()
187 res = GaGetTrustedDeviceEntryById(osAccountId, peerAuthId, false, groupId, peerDeviceEntry); in AddUpgradeFlagToParams()
231 const char *peerAuthId = GetStringFromJson(param, FIELD_PEER_ID_FROM_REQUEST); in FillAuthParams() local
232 if (peerAuthId == NULL) { in FillAuthParams()
233 peerAuthId = GetStringFromJson(param, FIELD_PEER_AUTH_ID); in FillAuthParams()
246 if (!GaIsDeviceInGroup(groupInfo->type, osAccountId, peerUdid, peerAuthId, groupId)) { in FillAuthParams()
255 … AddUpgradeFlagToParams(paramsData, osAccountId, peerUdid, peerAuthId, groupId) != HC_SUCCESS) { in FillAuthParams()
/ohos5.0/base/security/device_auth/services/legacy/group_auth/src/group_auth_manager/group_auth_common/
H A Dgroup_auth_data_operation.c172 …DeviceInGroup(int32_t groupType, int32_t osAccountId, const char *peerUdid, const char *peerAuthId, in GaIsDeviceInGroup() argument
188 } else if (peerAuthId != NULL) { in GaIsDeviceInGroup()
189 res = GaGetTrustedDeviceEntryById(osAccountId, peerAuthId, false, groupId, deviceEntry); in GaIsDeviceInGroup()
/ohos5.0/base/security/device_auth/services/legacy/group_manager/src/group_operation/group_operation_common/
H A Dgroup_operation_common.c881 int32_t GenerateBindSuccessData(const char *peerAuthId, const char *peerUdid, in GenerateBindSuccessData() argument
884 … if ((peerAuthId == NULL) || (peerUdid == NULL) || (groupId == NULL) || (returnDataStr == NULL)) { in GenerateBindSuccessData()
889 PRINT_SENSITIVE_DATA("PeerAuthId", peerAuthId); in GenerateBindSuccessData()
901 if (AddStringToJson(jsonData, FIELD_ADD_ID, peerAuthId) != HC_SUCCESS) { in GenerateBindSuccessData()
916 int32_t GenerateUnbindSuccessData(const char *peerAuthId, const char *groupId, char **returnDataStr) in GenerateUnbindSuccessData() argument
918 if ((peerAuthId == NULL) || (groupId == NULL) || (returnDataStr == NULL)) { in GenerateUnbindSuccessData()
923 PRINT_SENSITIVE_DATA("PeerAuthId", peerAuthId); in GenerateUnbindSuccessData()
934 if (AddStringToJson(jsonData, FIELD_DELETE_ID, peerAuthId) != HC_SUCCESS) { in GenerateUnbindSuccessData()
/ohos5.0/base/security/device_auth/services/legacy/group_auth/inc/
H A Dgroup_auth_data_operation.h28 …DeviceInGroup(int32_t groupType, int32_t osAccountId, const char *peerUdid, const char *peerAuthId,
/ohos5.0/base/security/device_auth/services/legacy/group_manager/inc/
H A Dgroup_operation_common.h77 int32_t GenerateBindSuccessData(const char *peerAuthId, const char *peerUdid, const char *groupId,
79 int32_t GenerateUnbindSuccessData(const char *peerAuthId, const char *groupId, char **returnDataStr…
/ohos5.0/base/security/device_auth/services/legacy/authenticators/inc/account_unrelated/
H A Ddas_task_common.h30 int32_t GeneratePseudonymPskAlias(const Uint8Buff *serviceType, const Uint8Buff *peerAuthId, Uint8B…
/ohos5.0/base/security/device_auth/services/legacy/group_auth/src/group_auth_manager/account_related_group_auth/
H A Daccount_related_group_auth.c735 const char *peerAuthId = GetStringFromJson(sendToSelf, FIELD_DEV_ID); in PrepareTrustedDeviceInfo() local
736 if (peerAuthId == NULL) { in PrepareTrustedDeviceInfo()
747 !StringSetPointer(&(devEntry->authId), peerAuthId) || in PrepareTrustedDeviceInfo()