Home
last modified time | relevance | path

Searched refs:tokenInfo (Results 1 - 25 of 26) sorted by relevance

12

/test/xts/device_attest/services/core/security/
H A Dattest_security_token.c401 TokenInfo tokenInfo; in GetProductTokenInfo() local
402 (void)memset_s(&tokenInfo, sizeof(TokenInfo), 0, sizeof(TokenInfo)); in GetProductTokenInfo()
403 int32_t ret = AttestReadToken(&tokenInfo); in GetProductTokenInfo()
461 static int32_t GetDecryptedTokenValue(TokenInfo* tokenInfo, uint8_t* tokenValue, uint8_t tokenValueLen) in GetDecryptedTokenValue() argument
463 if (tokenInfo == NULL) { in GetDecryptedTokenValue()
468 int32_t ret = DecryptHks((const uint8_t*)tokenInfo->tokenValue, sizeof(tokenInfo->tokenValue), in GetDecryptedTokenValue()
476 ret = TransTokenVersion(tokenInfo->version, sizeof(tokenInfo->version)); in GetDecryptedTokenValue()
484 SecurityParam saltParam = {(uint8_t*)tokenInfo in GetDecryptedTokenValue()
500 GetTokenIdDecrypted(TokenInfo* tokenInfo, uint8_t* tokenId, uint8_t tokenIdLen) GetTokenIdDecrypted() argument
543 EncryptTokenValueToTokenInfo(const char* data, uint8_t dataLen, uint8_t* aesKey, TokenInfo* tokenInfo) EncryptTokenValueToTokenInfo() argument
581 EncryptTokenIdToTokenInfo(const char* data, uint8_t dataLen, uint8_t* aesKey, TokenInfo* tokenInfo) EncryptTokenIdToTokenInfo() argument
618 GetTokenInfo(const char* tokenValue, uint8_t tokenValueLen, const char* tokenId, uint8_t tokenIdLen, TokenInfo* tokenInfo) GetTokenInfo() argument
664 TokenInfo tokenInfo; GetTokenValueDecrypted() local
723 TokenInfo tokenInfo; GetTokenId() local
785 TokenInfo tokenInfo; WriteToken() local
[all...]
/test/xts/device_attest/services/core/dfx/
H A Dattest_dfx.c80 PrintDeviceTokenInfo(&(devicePacket->tokenInfo)); in PrintDevicePacket()
85 void PrintDeviceTokenInfo(DeviceTokenInfo* tokenInfo) in PrintDeviceTokenInfo() argument
88 if (tokenInfo == NULL) { in PrintDeviceTokenInfo()
89 ATTEST_LOG_ERROR("tokenInfo is null."); in PrintDeviceTokenInfo()
92 ATTEST_LOG_INFO("tokenInfo (addr = %p):", tokenInfo); in PrintDeviceTokenInfo()
93 if (tokenInfo->token == NULL) { in PrintDeviceTokenInfo()
96 ATTEST_LOG_INFO_ANONY("token = %s;", tokenInfo->token); in PrintDeviceTokenInfo()
99 if (tokenInfo->uuid == NULL) { in PrintDeviceTokenInfo()
102 ATTEST_LOG_INFO_ANONY("uuid = %s;", tokenInfo in PrintDeviceTokenInfo()
214 PrintTokenInfo(TokenInfo* tokenInfo) PrintTokenInfo() argument
[all...]
/test/xts/device_attest_lite/services/core/dfx/
H A Dattest_dfx.c80 PrintDeviceTokenInfo(&(devicePacket->tokenInfo)); in PrintDevicePacket()
85 void PrintDeviceTokenInfo(DeviceTokenInfo* tokenInfo) in PrintDeviceTokenInfo() argument
88 if (tokenInfo == NULL) { in PrintDeviceTokenInfo()
89 ATTEST_LOG_ERROR("tokenInfo is null."); in PrintDeviceTokenInfo()
92 ATTEST_LOG_INFO("tokenInfo (addr = %p):", tokenInfo); in PrintDeviceTokenInfo()
93 if (tokenInfo->token == NULL) { in PrintDeviceTokenInfo()
96 ATTEST_LOG_INFO_ANONY("token = %s;", tokenInfo->token); in PrintDeviceTokenInfo()
99 if (tokenInfo->uuid == NULL) { in PrintDeviceTokenInfo()
102 ATTEST_LOG_INFO_ANONY("uuid = %s;", tokenInfo in PrintDeviceTokenInfo()
214 PrintTokenInfo(TokenInfo* tokenInfo) PrintTokenInfo() argument
[all...]
/test/xts/device_attest/services/core/adapter/
H A Dattest_adapter_hal.c50 int32_t AttestWriteToken(TokenInfo* tokenInfo) in AttestWriteToken() argument
52 if (tokenInfo == NULL) { in AttestWriteToken()
59 if (memcpy_s(token, sizeof(token), tokenInfo->tokenId, sizeof(tokenInfo->tokenId)) != 0) { in AttestWriteToken()
64 if (memcpy_s(token + offset, sizeof(token), tokenInfo->tokenValue, sizeof(tokenInfo->tokenValue)) != 0) { in AttestWriteToken()
69 if (memcpy_s(token + offset, sizeof(token), tokenInfo->salt, sizeof(tokenInfo->salt)) != 0) { in AttestWriteToken()
74 if (memcpy_s(token + offset, sizeof(token), tokenInfo->version, sizeof(tokenInfo in AttestWriteToken()
92 AttestReadToken(TokenInfo* tokenInfo) AttestReadToken() argument
[all...]
H A Dattest_adapter.c30 TokenInfo tokenInfo; in AttestIsResetFlagExist() local
31 if (AttestReadToken(&tokenInfo) == TOKEN_UNPRESET) { in AttestIsResetFlagExist()
/test/xts/device_attest_lite/services/core/adapter/
H A Dattest_adapter_hal.c50 int32_t AttestWriteToken(TokenInfo* tokenInfo) in AttestWriteToken() argument
52 if (tokenInfo == NULL) { in AttestWriteToken()
59 if (memcpy_s(token, sizeof(token), tokenInfo->tokenId, sizeof(tokenInfo->tokenId)) != 0) { in AttestWriteToken()
64 if (memcpy_s(token + offset, sizeof(token), tokenInfo->tokenValue, sizeof(tokenInfo->tokenValue)) != 0) { in AttestWriteToken()
69 if (memcpy_s(token + offset, sizeof(token), tokenInfo->salt, sizeof(tokenInfo->salt)) != 0) { in AttestWriteToken()
74 if (memcpy_s(token + offset, sizeof(token), tokenInfo->version, sizeof(tokenInfo in AttestWriteToken()
98 AttestReadToken(TokenInfo* tokenInfo) AttestReadToken() argument
[all...]
H A Dattest_adapter.c29 TokenInfo tokenInfo; in AttestIsResetFlagExist() local
30 if (AttestReadToken(&tokenInfo) == TOKEN_UNPRESET) { in AttestIsResetFlagExist()
/test/xts/device_attest_lite/services/core/security/
H A Dattest_security_token.c401 TokenInfo tokenInfo; in GetProductTokenInfo() local
402 (void)memset_s(&tokenInfo, sizeof(TokenInfo), 0, sizeof(TokenInfo)); in GetProductTokenInfo()
403 int32_t ret = AttestReadToken(&tokenInfo); in GetProductTokenInfo()
461 static int32_t GetDecryptedTokenValue(TokenInfo* tokenInfo, uint8_t* tokenValue, uint8_t tokenValueLen) in GetDecryptedTokenValue() argument
463 if (tokenInfo == NULL) { in GetDecryptedTokenValue()
468 int32_t ret = TransTokenVersion(tokenInfo->version, sizeof(tokenInfo->version)); in GetDecryptedTokenValue()
476 SecurityParam saltParam = {(uint8_t*)tokenInfo->salt, sizeof(tokenInfo->salt)}; in GetDecryptedTokenValue()
483 ret = Decrypt((const uint8_t*)tokenInfo in GetDecryptedTokenValue()
492 GetTokenIdDecrypted(TokenInfo* tokenInfo, uint8_t* tokenId, uint8_t tokenIdLen) GetTokenIdDecrypted() argument
528 EncryptTokenValueToTokenInfo(const char* data, uint8_t dataLen, uint8_t* aesKey, TokenInfo* tokenInfo) EncryptTokenValueToTokenInfo() argument
561 EncryptTokenIdToTokenInfo(const char* data, uint8_t dataLen, uint8_t* aesKey, TokenInfo* tokenInfo) EncryptTokenIdToTokenInfo() argument
593 GetTokenInfo(const char* tokenValue, uint8_t tokenValueLen, const char* tokenId, uint8_t tokenIdLen, TokenInfo* tokenInfo) GetTokenInfo() argument
639 TokenInfo tokenInfo; GetTokenValueDecrypted() local
698 TokenInfo tokenInfo; GetTokenId() local
760 TokenInfo tokenInfo; WriteToken() local
[all...]
/test/xts/device_attest/services/devattest_ability/test/tdd/gtest/src/
H A Dattest_tdd_mock_hal.c46 int32_t AttestWriteToken(TokenInfo* tokenInfo) in AttestWriteToken() argument
48 (void)tokenInfo; in AttestWriteToken()
52 int32_t AttestReadToken(TokenInfo* tokenInfo) in AttestReadToken() argument
54 if (tokenInfo == NULL) { in AttestReadToken()
58 memcpy_s(tokenInfo->tokenId, TOKEN_ID_ENCRYPT_LEN, ATTEST_FIRST_TOKENID, TOKEN_ID_ENCRYPT_LEN); in AttestReadToken()
59 memcpy_s(tokenInfo->tokenValue, TOKEN_VALUE_ENCRYPT_LEN, ATTEST_FIRST_TOKEVALUE, TOKEN_VALUE_ENCRYPT_LEN); in AttestReadToken()
60 memcpy_s(tokenInfo->salt, SALT_ENCRYPT_LEN, ATTEST_FIRST_SALT, SALT_ENCRYPT_LEN); in AttestReadToken()
61 memcpy_s(tokenInfo->version, VERSION_ENCRYPT_LEN, ATTEST_FIRST_VERSION, VERSION_ENCRYPT_LEN); in AttestReadToken()
H A Dattest_tdd_test.cpp270 char *outToken = reqMsg->tokenInfo.token; in HWTEST_F()
301 char *outToken = reqMsg->tokenInfo.token; in HWTEST_F()
312 outToken = reqMsg->tokenInfo.uuid; in HWTEST_F()
361 char *outToken = reqMsg->tokenInfo.token; in HWTEST_F()
390 char *outToken = reqMsg->tokenInfo.token; in HWTEST_F()
447 char *outToken = reqMsg->tokenInfo.token; in HWTEST_F()
476 char *outToken = reqMsg->tokenInfo.token; in HWTEST_F()
/test/xts/device_attest_lite/test/tdd/gtest/src/
H A Dattest_tdd_mock_hal.c48 int32_t AttestWriteToken(TokenInfo* tokenInfo) in AttestWriteToken() argument
50 (void)tokenInfo; in AttestWriteToken()
54 int32_t AttestReadToken(TokenInfo* tokenInfo) in AttestReadToken() argument
56 if (tokenInfo == NULL) { in AttestReadToken()
60 memcpy_s(tokenInfo->tokenId, TOKEN_ID_ENCRYPT_LEN, ATTEST_FIRST_TOKENID, TOKEN_ID_ENCRYPT_LEN); in AttestReadToken()
61 memcpy_s(tokenInfo->tokenValue, TOKEN_VALUE_ENCRYPT_LEN, ATTEST_FIRST_TOKEVALUE, TOKEN_VALUE_ENCRYPT_LEN); in AttestReadToken()
62 memcpy_s(tokenInfo->salt, SALT_ENCRYPT_LEN, ATTEST_FIRST_SALT, SALT_ENCRYPT_LEN); in AttestReadToken()
63 memcpy_s(tokenInfo->version, VERSION_ENCRYPT_LEN, ATTEST_FIRST_VERSION, VERSION_ENCRYPT_LEN); in AttestReadToken()
H A Dattest_tdd_test.cpp289 char *outToken = reqMsg->tokenInfo.token; in HWTEST_F()
320 char *outToken = reqMsg->tokenInfo.token; in HWTEST_F()
330 outToken = reqMsg->tokenInfo.uuid; in HWTEST_F()
378 char *outToken = reqMsg->tokenInfo.token; in HWTEST_F()
407 char *outToken = reqMsg->tokenInfo.token; in HWTEST_F()
460 char *outToken = reqMsg->tokenInfo.token; in HWTEST_F()
489 char *outToken = reqMsg->tokenInfo.token; in HWTEST_F()
/test/xts/device_attest_lite/services/core/network/
H A Dattest_network.c89 devicePacket->tokenInfo.uuid = NULL; in CreateDevicePacket()
90 devicePacket->tokenInfo.token = NULL; in CreateDevicePacket()
116 ATTEST_MEM_FREE(devicePacket->tokenInfo.uuid); in DestroyDevicePacket()
117 ATTEST_MEM_FREE(devicePacket->tokenInfo.token); in DestroyDevicePacket()
380 if (!cJSON_AddItemToObject(postData, "tokenInfo", postObj)) { in BuildCoapResetBody()
386 if (cJSON_AddStringToObject(postObj, "uuid", postValue->tokenInfo.uuid) == NULL || in BuildCoapResetBody()
387 cJSON_AddStringToObject(postObj, "token", postValue->tokenInfo.token) == NULL) { in BuildCoapResetBody()
458 cJSON *tokenInfo = cJSON_CreateObject(); in BuildCoapAuthBody() local
459 if (tokenInfo == NULL) { in BuildCoapAuthBody()
461 ATTEST_LOG_ERROR("[BuildCoapAuthBody] tokenInfo Creat in BuildCoapAuthBody()
[all...]
/test/xts/device_attest/services/core/network/
H A Dattest_network.c86 devicePacket->tokenInfo.uuid = NULL; in CreateDevicePacket()
87 devicePacket->tokenInfo.token = NULL; in CreateDevicePacket()
113 ATTEST_MEM_FREE(devicePacket->tokenInfo.uuid); in DestroyDevicePacket()
114 ATTEST_MEM_FREE(devicePacket->tokenInfo.token); in DestroyDevicePacket()
544 cJSON *tokenInfo = cJSON_CreateObject(); in BuildTokenInfo() local
545 if (tokenInfo == NULL) { in BuildTokenInfo()
546 ATTEST_LOG_ERROR("[BuildTokenInfo] tokenInfo Create Object fail"); in BuildTokenInfo()
549 if (!cJSON_AddItemToObject(*postData, "tokenInfo", tokenInfo)) { in BuildTokenInfo()
550 ATTEST_LOG_ERROR("[BuildTokenInfo] tokenInfo Ad in BuildTokenInfo()
[all...]
/test/xts/device_attest/services/core/include/dfx/
H A Dattest_dfx.h35 void PrintDeviceTokenInfo(DeviceTokenInfo* tokenInfo);
43 void PrintTokenInfo(TokenInfo* tokenInfo);
/test/xts/device_attest_lite/services/core/include/dfx/
H A Dattest_dfx.h35 void PrintDeviceTokenInfo(DeviceTokenInfo* tokenInfo);
43 void PrintTokenInfo(TokenInfo* tokenInfo);
/test/xts/device_attest_lite/services/core/include/adapter/
H A Dattest_adapter.h64 int32_t AttestReadToken(TokenInfo* tokenInfo);
66 int32_t AttestWriteToken(TokenInfo* tokenInfo);
/test/xts/device_attest/services/core/attest/
H A Dattest_service_active.c67 devicePacket->tokenInfo.uuid = AttestStrdup((char*)tokenId); in GenActiveMsg()
68 devicePacket->tokenInfo.token = AttestStrdup((char*)tokenValueHmac); in GenActiveMsg()
H A Dattest_service_reset.c54 devicePacket->tokenInfo.uuid = AttestStrdup((char*)tokenId); in GenResetMsg()
55 devicePacket->tokenInfo.token = AttestStrdup((char*)tokenValueHmac); in GenResetMsg()
H A Dattest_service_auth.c858 devicePacket->tokenInfo.uuid = AttestStrdup((char*)tokenId); in GenAuthMsg()
859 devicePacket->tokenInfo.token = AttestStrdup((char*)tokenValueHmac); in GenAuthMsg()
/test/xts/device_attest_lite/services/core/attest/
H A Dattest_service_active.c67 devicePacket->tokenInfo.uuid = AttestStrdup((char*)tokenId); in GenActiveMsg()
68 devicePacket->tokenInfo.token = AttestStrdup((char*)tokenValueHmac); in GenActiveMsg()
H A Dattest_service_reset.c54 devicePacket->tokenInfo.uuid = AttestStrdup((char*)tokenId); in GenResetMsg()
55 devicePacket->tokenInfo.token = AttestStrdup((char*)tokenValueHmac); in GenResetMsg()
/test/xts/device_attest/services/core/include/adapter/
H A Dattest_adapter.h64 int32_t AttestReadToken(TokenInfo* tokenInfo);
66 int32_t AttestWriteToken(TokenInfo* tokenInfo);
/test/xts/device_attest/services/core/include/
H A Dattest_type.h172 DeviceTokenInfo tokenInfo; member
/test/xts/device_attest_lite/services/core/include/
H A Dattest_type.h158 DeviceTokenInfo tokenInfo; member

Completed in 13 milliseconds

12