Home
last modified time | relevance | path

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

/base/security/device_auth/services/legacy/group_auth/src/group_auth_manager/account_unrelated_group_auth/
H A Daccount_unrelated_group_auth.c111 const char *peerAuthId = GetStringFromJson(authParam, FIELD_PEER_AUTH_ID); in AddPeerAuthIdToSelfData() local
112 if (peerAuthId == NULL) { in AddPeerAuthIdToSelfData()
113 LOGD("No peerAuthId in auth session cached params!"); in AddPeerAuthIdToSelfData()
117 if (AddStringToJson(returnToSelf, FIELD_PEER_AUTH_ID, peerAuthId) != HC_SUCCESS) { in AddPeerAuthIdToSelfData()
118 LOGE("Failed to add peerAuthId!"); in AddPeerAuthIdToSelfData()
320 const char *peerAuthId = GetStringFromJson(paramsData, FIELD_PEER_ID_FROM_REQUEST); in AddNonAccountAuthInfo() local
321 if (peerAuthId == NULL) { in AddNonAccountAuthInfo()
322 peerAuthId = StringGet(&peerAuthInfo->authId); in AddNonAccountAuthInfo()
324 if (AddStringToJson(paramsData, FIELD_PEER_AUTH_ID, peerAuthId) != HC_SUCCESS) { in AddNonAccountAuthInfo()
346 const char *peerAuthId in FillNonAccountAuthInfo() local
400 const char *peerAuthId = GetStringFromJson(confirmationJson, FIELD_PEER_AUTH_ID); CombineDasServerConfirmParams() local
[all...]
/base/security/device_auth/services/legacy/group_manager/src/group_operation/peer_to_peer_group/
H A Dpeer_to_peer_group.c186 static int32_t GetPeerDevUserTypeFromDb(int32_t osAccountId, const char *groupId, const char *peerAuthId) in GetPeerDevUserTypeFromDb() argument
194 if (GetTrustedDevInfoById(osAccountId, peerAuthId, false, groupId, devAuthParams) != HC_SUCCESS) { in GetPeerDevUserTypeFromDb()
204 static int32_t DelPeerDevAndKeyInfo(int32_t osAccountId, const char *groupId, const char *peerAuthId) in DelPeerDevAndKeyInfo() argument
206 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()
331 LOGE("Failed to get peerAuthId fro in HandleLocalUnbind()
365 const char *peerAuthId = GetStringFromJson(jsonParams, FIELD_DELETE_ID); CheckPeerDeviceStatus() local
[all...]
/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/common/
H A Ddas_task_common.c245 static 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) != EOK) { in CombineKeyAliasForPseudonymPsk()
268 LOGE("Copy peerAuthId failed."); 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 in CheckGeneratePskParams()
419 GeneratePseudonymPskAlias(const Uint8Buff *serviceType, const Uint8Buff *peerAuthId, Uint8Buff *outKeyAlias) GeneratePseudonymPskAlias() argument
[all...]
/base/security/device_auth/services/session_manager/src/session/v1/compatible_bind_sub_session/
H A Dcompatible_bind_sub_session.c277 static int32_t InformSelfBindSuccess(const char *peerAuthId, const char *peerUdid, const char *groupId, in InformSelfBindSuccess() argument
289 int32_t result = GenerateBindSuccessData(peerAuthId, peerUdid, groupId, &jsonDataStr); in InformSelfBindSuccess()
456 static int32_t AddPeerDevToGroup(const char *peerAuthId, const char *peerUdid, in AddPeerDevToGroup() argument
461 int32_t result = AddTrustDevToDatabase(session->osAccountId, peerAuthId, peerUdid, groupId, peerUserType); in AddPeerDevToGroup()
470 static int32_t AddGroupAndDev(const char *peerAuthId, const char *peerUdid, const char *groupId, in AddGroupAndDev() argument
477 result = AddPeerDevToGroup(peerAuthId, peerUdid, groupId, session); in AddGroupAndDev()
484 static int32_t HandleBindSuccess(const char *peerAuthId, const char *peerUdid, const char *groupId, in HandleBindSuccess() argument
488 int32_t result = AddGroupAndDev(peerAuthId, peerUdid, groupId, session); in HandleBindSuccess()
493 return InformSelfBindSuccess(peerAuthId, peerUdid, groupId, session, out); in HandleBindSuccess()
498 const char *peerAuthId in OnBindFinish() local
[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_SUCCESS) { in AddPeerAuthIdAndUdidIfExist()
400 LOGE("Failed to add peerAuthId to params!"); in AddPeerAuthIdAndUdidIfExist()
/base/security/device_auth/services/identity_manager/src/
H A Didentity_p2p.c192 * @param peerAuthId peer device udid
196 static int32_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 in GeneratePskAliasAndCheckExist() local
[all...]
H A Dcredential_operator.c506 static int32_t ComputeAndSavePsk(int32_t osAccountId, const char *peerServiceType, const char *peerAuthId, int keyType) in ComputeAndSavePsk() argument
528 res = GenerateKeyAliasInner(DEFAULT_PACKAGE_NAME, peerServiceType, peerAuthId, keyType, &peerKeyAlias); in ComputeAndSavePsk()
548 res = GenerateKeyAliasInner(DEFAULT_PACKAGE_NAME, peerServiceType, peerAuthId, KEY_ALIAS_PSK, &sharedKeyAlias); in ComputeAndSavePsk()
/base/security/device_auth/services/legacy/group_auth/inc/
H A Dgroup_auth_data_operation.h28 bool GaIsDeviceInGroup(int32_t groupType, int32_t osAccountId, const char *peerUdid, const char *peerAuthId,
/base/security/device_auth/services/session_manager/src/session/v1/compatible_auth_sub_session/
H A Dcompatible_auth_sub_session_common.c177 const char *peerAuthId, const char *groupId) in AddUpgradeFlagToParams()
187 } else if (peerAuthId != NULL) { in AddUpgradeFlagToParams()
188 res = GaGetTrustedDeviceEntryById(osAccountId, peerAuthId, false, groupId, peerDeviceEntry); in AddUpgradeFlagToParams()
232 const char *peerAuthId = GetStringFromJson(param, FIELD_PEER_ID_FROM_REQUEST); in FillAuthParams() local
233 if (peerAuthId == NULL) { in FillAuthParams()
234 peerAuthId = GetStringFromJson(param, FIELD_PEER_AUTH_ID); in FillAuthParams()
247 if (!GaIsDeviceInGroup(groupInfo->type, osAccountId, peerUdid, peerAuthId, groupId)) { in FillAuthParams()
256 AddUpgradeFlagToParams(paramsData, osAccountId, peerUdid, peerAuthId, groupId) != HC_SUCCESS) { in FillAuthParams()
176 AddUpgradeFlagToParams(CJson *paramsData, int32_t osAccountId, const char *peerUdid, const char *peerAuthId, const char *groupId) AddUpgradeFlagToParams() argument
/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, Uint8Buff *outKeyAlias);
/base/security/device_auth/services/legacy/group_auth/src/group_auth_manager/group_auth_common/
H A Dgroup_auth_data_operation.c182 bool GaIsDeviceInGroup(int32_t groupType, int32_t osAccountId, const char *peerUdid, const char *peerAuthId, in GaIsDeviceInGroup() argument
198 } else if (peerAuthId != NULL) { in GaIsDeviceInGroup()
199 res = GaGetTrustedDeviceEntryById(osAccountId, peerAuthId, false, groupId, deviceEntry); in GaIsDeviceInGroup()
/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()
/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);
/base/security/device_auth/services/legacy/group_manager/src/group_operation/group_operation_common/
H A Dgroup_operation_common.c928 int32_t GenerateBindSuccessData(const char *peerAuthId, const char *peerUdid, in GenerateBindSuccessData() argument
931 if ((peerAuthId == NULL) || (peerUdid == NULL) || (groupId == NULL) || (returnDataStr == NULL)) { in GenerateBindSuccessData()
936 PRINT_SENSITIVE_DATA("PeerAuthId", peerAuthId); in GenerateBindSuccessData()
948 if (AddStringToJson(jsonData, FIELD_ADD_ID, peerAuthId) != HC_SUCCESS) { in GenerateBindSuccessData()
963 int32_t GenerateUnbindSuccessData(const char *peerAuthId, const char *groupId, char **returnDataStr) in GenerateUnbindSuccessData() argument
965 if ((peerAuthId == NULL) || (groupId == NULL) || (returnDataStr == NULL)) { in GenerateUnbindSuccessData()
970 PRINT_SENSITIVE_DATA("PeerAuthId", peerAuthId); in GenerateUnbindSuccessData()
981 if (AddStringToJson(jsonData, FIELD_DELETE_ID, peerAuthId) != HC_SUCCESS) { in GenerateUnbindSuccessData()
/base/security/device_auth/services/legacy/group_auth/src/group_auth_manager/account_related_group_auth/
H A Daccount_related_group_auth.c732 const char *peerAuthId = GetStringFromJson(sendToSelf, FIELD_DEV_ID); in PrepareTrustedDeviceInfo() local
733 if (peerAuthId == NULL) { in PrepareTrustedDeviceInfo()
744 !StringSetPointer(&(devEntry->authId), peerAuthId) || in PrepareTrustedDeviceInfo()

Completed in 15 milliseconds