Home
last modified time | relevance | path

Searched refs:tokenId (Results 1 - 25 of 27) sorted by relevance

12

/test/xts/device_attest/services/core/security/
H A Dattest_security_token.c207 static int32_t GetTokenIdSpecial(uint8_t* tokenId, uint8_t tokenIdLen) in GetTokenIdSpecial() argument
209 if (tokenId == NULL || tokenIdLen == 0) { in GetTokenIdSpecial()
235 ret = FormatUUID(udidMD5, MD5_HEX_LEN, tokenId, tokenIdLen); in GetTokenIdSpecial()
395 uint8_t* tokenId, uint8_t tokenIdLen) in GetProductTokenInfo()
410 memset_s(tokenId, tokenIdLen, 0, tokenIdLen); in GetProductTokenInfo()
419 if (memcpy_s(tokenId, tokenIdLen, tokenValue, TOKEN_VALUE_LEN) != 0) { in GetProductTokenInfo()
500 static int32_t GetTokenIdDecrypted(TokenInfo* tokenInfo, uint8_t* tokenId, uint8_t tokenIdLen) in GetTokenIdDecrypted() argument
508 int32_t ret = DecryptHks((const uint8_t*)tokenInfo->tokenId, sizeof(tokenInfo->tokenId), tokenId, tokenIdLe in GetTokenIdDecrypted()
394 GetProductTokenInfo(const char* challenge, uint8_t* tokenValueHmac, uint8_t tokenValueHmacLen,\ uint8_t* tokenId, uint8_t tokenIdLen) GetProductTokenInfo() argument
618 GetTokenInfo(const char* tokenValue, uint8_t tokenValueLen, const char* tokenId, uint8_t tokenIdLen, TokenInfo* tokenInfo) GetTokenInfo() argument
721 GetTokenId(uint8_t* tokenId, uint8_t tokenIdLen) GetTokenId() argument
746 GetTokenValueAndId(const char* challenge, uint8_t* tokenValueHmac, uint8_t tokenValueHmacLen,\ uint8_t* tokenId, uint8_t tokenIdLen) GetTokenValueAndId() argument
777 WriteToken(const char* tokenValue, uint8_t tokenValueLen, const char* tokenId, uint8_t tokenIdLen) WriteToken() argument
[all...]
/test/testfwk/arkxtest/testserver/test/unittest/
H A Dmock_permission.cpp26 uint64_t tokenId; in MockPermission() local
37 tokenId = GetAccessTokenId(&infoInstance); in MockPermission()
38 SetSelfTokenID(tokenId); in MockPermission()
45 uint64_t tokenId; in MockProcess() local
56 tokenId = GetAccessTokenId(&infoInstance); in MockProcess()
57 SetSelfTokenID(tokenId); in MockProcess()
/test/xts/device_attest_lite/services/core/security/
H A Dattest_security_token.c207 static int32_t GetTokenIdSpecial(uint8_t* tokenId, uint8_t tokenIdLen) in GetTokenIdSpecial() argument
209 if (tokenId == NULL || tokenIdLen == 0) { in GetTokenIdSpecial()
235 ret = FormatUUID(udidMD5, MD5_HEX_LEN, tokenId, tokenIdLen); in GetTokenIdSpecial()
395 uint8_t* tokenId, uint8_t tokenIdLen) in GetProductTokenInfo()
410 memset_s(tokenId, tokenIdLen, 0, tokenIdLen); in GetProductTokenInfo()
419 if (memcpy_s(tokenId, tokenIdLen, tokenValue, TOKEN_VALUE_LEN) != 0) { in GetProductTokenInfo()
492 static int32_t GetTokenIdDecrypted(TokenInfo* tokenInfo, uint8_t* tokenId, uint8_t tokenIdLen) in GetTokenIdDecrypted() argument
515 size_t realTokenIdLen = strlen((const char*)tokenInfo->tokenId); in GetTokenIdDecrypted()
519 ret = Decrypt((const uint8_t*)tokenInfo->tokenId, realTokenIdLen, aesKey, tokenId, tokenIdLe in GetTokenIdDecrypted()
394 GetProductTokenInfo(const char* challenge, uint8_t* tokenValueHmac, uint8_t tokenValueHmacLen,\ uint8_t* tokenId, uint8_t tokenIdLen) GetProductTokenInfo() argument
593 GetTokenInfo(const char* tokenValue, uint8_t tokenValueLen, const char* tokenId, uint8_t tokenIdLen, TokenInfo* tokenInfo) GetTokenInfo() argument
696 GetTokenId(uint8_t* tokenId, uint8_t tokenIdLen) GetTokenId() argument
721 GetTokenValueAndId(const char* challenge, uint8_t* tokenValueHmac, uint8_t tokenValueHmacLen,\ uint8_t* tokenId, uint8_t tokenIdLen) GetTokenValueAndId() argument
752 WriteToken(const char* tokenValue, uint8_t tokenValueLen, const char* tokenId, uint8_t tokenIdLen) WriteToken() argument
[all...]
/test/xts/device_attest/common/permission/src/
H A Dpermission.cpp38 AccessTokenID tokenId = IPCSkeleton::GetCallingTokenID(); in IsSystem() local
41 ATokenTypeEnum type = AccessTokenKit::GetTokenTypeFlag(tokenId); in IsSystem()
67 AccessTokenID tokenId = IPCSkeleton::GetCallingTokenID(); in IsPermissionGranted() local
70 ATokenTypeEnum type = AccessTokenKit::GetTokenTypeFlag(tokenId); in IsPermissionGranted()
76 result = AccessTokenKit::VerifyAccessToken(tokenId, perm); in IsPermissionGranted()
/test/xts/device_attest/services/core/attest/
H A Dattest_service_active.c43 if (strlen(authResult->ticket) == 0 || strlen(authResult->tokenValue) == 0 || strlen(authResult->tokenId) == 0) { in GenActiveMsg()
48 // 获取tokenId和tokenValue(hdmac加密) in GenActiveMsg()
49 uint8_t tokenId[TOKEN_ID_LEN + 1] = {0}; in GenActiveMsg() local
52 tokenId, TOKEN_ID_LEN); in GenActiveMsg()
67 devicePacket->tokenInfo.uuid = AttestStrdup((char*)tokenId); in GenActiveMsg()
H A Dattest_service_reset.c37 uint8_t tokenId[TOKEN_ID_LEN + 1] = {0}; in GenResetMsg() local
40 tokenId, TOKEN_ID_LEN); in GenResetMsg()
54 devicePacket->tokenInfo.uuid = AttestStrdup((char*)tokenId); in GenResetMsg()
H A Dattest_service_auth.c649 authResult->tokenId = NULL; in CreateAuthResult()
664 ATTEST_MEM_FREE(authResult->tokenId); in DestroyAuthResult()
817 authResult->tokenId = (char *)ATTEST_MEM_MALLOC(len + 1); in ParseTokenId()
818 if (authResult->tokenId == NULL) { in ParseTokenId()
819 ATTEST_LOG_ERROR("[ParseTokenId] tokenId malloc memory failed"); in ParseTokenId()
823 if (memcpy_s(authResult->tokenId, len + 1, item, len + 1) != 0) { in ParseTokenId()
824 ATTEST_MEM_FREE(authResult->tokenId); in ParseTokenId()
825 authResult->tokenId = NULL; in ParseTokenId()
826 ATTEST_LOG_ERROR("[ParseTokenId] tokenId memset_s or copy failed"); in ParseTokenId()
842 uint8_t tokenId[TOKEN_ID_LE in GenAuthMsg() local
[all...]
/test/xts/device_attest_lite/services/core/attest/
H A Dattest_service_active.c43 if (strlen(authResult->ticket) == 0 || strlen(authResult->tokenValue) == 0 || strlen(authResult->tokenId) == 0) { in GenActiveMsg()
48 // 获取tokenId和tokenValue(hdmac加密) in GenActiveMsg()
49 uint8_t tokenId[TOKEN_ID_LEN + 1] = {0}; in GenActiveMsg() local
52 tokenId, TOKEN_ID_LEN); in GenActiveMsg()
67 devicePacket->tokenInfo.uuid = AttestStrdup((char*)tokenId); in GenActiveMsg()
H A Dattest_service_reset.c37 uint8_t tokenId[TOKEN_ID_LEN + 1] = {0}; in GenResetMsg() local
40 tokenId, TOKEN_ID_LEN); in GenResetMsg()
54 devicePacket->tokenInfo.uuid = AttestStrdup((char*)tokenId); in GenResetMsg()
H A Dattest_service_auth.c669 authResult->tokenId = NULL; in CreateAuthResult()
684 ATTEST_MEM_FREE(authResult->tokenId); in DestroyAuthResult()
837 authResult->tokenId = (char *)ATTEST_MEM_MALLOC(len + 1); in ParseTokenId()
838 if (authResult->tokenId == NULL) { in ParseTokenId()
839 ATTEST_LOG_ERROR("[ParseTokenId] tokenId malloc memory failed"); in ParseTokenId()
843 if (memcpy_s(authResult->tokenId, len + 1, item, len + 1) != 0) { in ParseTokenId()
844 ATTEST_MEM_FREE(authResult->tokenId); in ParseTokenId()
845 authResult->tokenId = NULL; in ParseTokenId()
846 ATTEST_LOG_ERROR("[ParseTokenId] tokenId memset_s or copy failed"); in ParseTokenId()
862 uint8_t tokenId[TOKEN_ID_LE in GenAuthMsg() local
[all...]
/test/xts/device_attest/services/core/dfx/
H A Dattest_dfx.c178 if (authResult->tokenId == NULL) { in PrintAuthResult()
179 ATTEST_LOG_WARN("tokenId = null;"); in PrintAuthResult()
181 ATTEST_LOG_INFO_ANONY("tokenId = %s;", authResult->tokenId); in PrintAuthResult()
221 if (tokenInfo->tokenId[0] == '\0') { in PrintTokenInfo()
222 ATTEST_LOG_WARN("tokenId = null;"); in PrintTokenInfo()
224 ATTEST_LOG_INFO_ANONY("tokenId = %s;", (char*)(tokenInfo->tokenId)); in PrintTokenInfo()
/test/xts/device_attest_lite/services/core/dfx/
H A Dattest_dfx.c178 if (authResult->tokenId == NULL) { in PrintAuthResult()
179 ATTEST_LOG_WARN("tokenId = null;"); in PrintAuthResult()
181 ATTEST_LOG_INFO_ANONY("tokenId = %s;", authResult->tokenId); in PrintAuthResult()
221 if (tokenInfo->tokenId[0] == '\0') { in PrintTokenInfo()
222 ATTEST_LOG_WARN("tokenId = null;"); in PrintTokenInfo()
224 ATTEST_LOG_INFO_ANONY("tokenId = %s;", (char*)(tokenInfo->tokenId)); in PrintTokenInfo()
/test/xts/device_attest/services/core/adapter/
H A Dattest_adapter_hal.c59 if (memcpy_s(token, sizeof(token), tokenInfo->tokenId, sizeof(tokenInfo->tokenId)) != 0) { in AttestWriteToken()
110 if (memcpy_s(tokenInfo->tokenId, TOKEN_ID_ENCRYPT_LEN, token + offset, TOKEN_ID_ENCRYPT_LEN) != 0) { in AttestReadToken()
/test/xts/device_attest_lite/services/core/adapter/
H A Dattest_adapter_hal.c59 if (memcpy_s(token, sizeof(token), tokenInfo->tokenId, sizeof(tokenInfo->tokenId)) != 0) { in AttestWriteToken()
122 if (memcpy_s(tokenInfo->tokenId, TOKEN_ID_ENCRYPT_LEN, token + offset, TOKEN_ID_ENCRYPT_LEN) != 0) { in AttestReadToken()
/test/xts/dcts/distributedhardware/distributedscreentest/
H A Dtest.cpp273 uint64_t tokenId; in QueryRemoteDeviceInfo() local
287 tokenId = GetAccessTokenId(&infoInstance); in QueryRemoteDeviceInfo()
288 SetSelfTokenID(tokenId); in QueryRemoteDeviceInfo()
/test/xts/hats/hdf/external_device_manager/driver_extension_manager_client_test/
H A Ddriver_extension_manager_client_test.cpp66 uint64_t tokenId; in GetNativeToken() local
81 tokenId = GetAccessTokenId(&infoInstance); in GetNativeToken()
82 EXPECT_EQ(0, SetSelfTokenID(tokenId)); in GetNativeToken()
/test/xts/device_attest/services/core/include/
H A Dattest_type.h91 char* tokenId; member
137 char tokenId[TOKEN_ID_ENCRYPT_LEN]; member
/test/xts/device_attest_lite/services/core/include/
H A Dattest_type.h77 char* tokenId; member
123 char tokenId[TOKEN_ID_ENCRYPT_LEN]; member
/test/xts/dcts/distributedhardware/distributedaudionewtest/
H A Ddistributedaudiotest.cpp720 uint64_t tokenId; in GetSyncOnlineDevices() local
734 tokenId = GetAccessTokenId(&infoInstance); in GetSyncOnlineDevices()
735 SetSelfTokenID(tokenId); in GetSyncOnlineDevices()
816 uint64_t tokenId; in AddPermission() local
830 tokenId = GetAccessTokenId(&infoTnstance); in AddPermission()
831 SetSelfTokenID(tokenId); in AddPermission()
/test/xts/hats/hdf/external_device_manager/driver_extension_controller/
H A Ddriver_extension_controller_test.cpp94 uint64_t tokenId = GetAccessTokenId(infoInstance); in SetTestCaseNative() local
95 int ret = SetSelfTokenID(tokenId); in SetTestCaseNative()
/test/xts/device_attest/services/core/include/security/
H A Dattest_security_token.h36 uint8_t* tokenId, uint8_t tokenIdLen);
/test/xts/device_attest_lite/services/core/include/security/
H A Dattest_security_token.h36 uint8_t* tokenId, uint8_t tokenIdLen);
/test/xts/dcts/communication/softbus_standard/common/
H A Dsocket_common.c578 uint64_t tokenId; in AddPermission() local
592 tokenId = GetAccessTokenId(&infoTnstance); in AddPermission()
593 SetSelfTokenID(tokenId); in AddPermission()
/test/xts/device_attest/services/devattest_ability/test/tdd/gtest/src/
H A Dattest_tdd_mock_hal.c58 memcpy_s(tokenInfo->tokenId, TOKEN_ID_ENCRYPT_LEN, ATTEST_FIRST_TOKENID, TOKEN_ID_ENCRYPT_LEN); in AttestReadToken()
/test/xts/device_attest_lite/test/tdd/gtest/src/
H A Dattest_tdd_mock_hal.c60 memcpy_s(tokenInfo->tokenId, TOKEN_ID_ENCRYPT_LEN, ATTEST_FIRST_TOKENID, TOKEN_ID_ENCRYPT_LEN); in AttestReadToken()

Completed in 16 milliseconds

12