Lines Matching refs:cmdApdu
155 phNxpEse_data cmdApdu; in LSC_OpenChannel() local
157 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in LSC_OpenChannel()
159 cmdApdu.len = (int32_t)sizeof(OpenChannel); in LSC_OpenChannel()
160 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(cmdApdu.len * sizeof(uint8_t)); in LSC_OpenChannel()
161 memcpy(cmdApdu.p_data, OpenChannel, cmdApdu.len); in LSC_OpenChannel()
164 ESESTATUS eseStat = phNxpEse_Transceive(&cmdApdu, &rspApdu); in LSC_OpenChannel()
184 phNxpEse_free(cmdApdu.p_data); in LSC_OpenChannel()
210 phNxpEse_data cmdApdu; in LSC_ResetChannel() local
212 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in LSC_ResetChannel()
214 cmdApdu.len = (int32_t)sizeof(OpenChannel); in LSC_ResetChannel()
215 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(cmdApdu.len * sizeof(uint8_t)); in LSC_ResetChannel()
216 memcpy(cmdApdu.p_data, OpenChannel, cmdApdu.len); in LSC_ResetChannel()
220 eseStat = phNxpEse_Transceive(&cmdApdu, &rspApdu); in LSC_ResetChannel()
231 cmdApdu.p_data[xx++] = rspApdu.p_data[rspApdu.len - 3]; /*channel id*/ in LSC_ResetChannel()
232 cmdApdu.p_data[xx++] = 0x70; in LSC_ResetChannel()
233 cmdApdu.p_data[xx++] = 0x80; in LSC_ResetChannel()
234 cmdApdu.p_data[xx++] = rspApdu.p_data[rspApdu.len - 3]; in LSC_ResetChannel()
235 cmdApdu.p_data[xx++] = 0x00; in LSC_ResetChannel()
236 cmdApdu.len = 5; in LSC_ResetChannel()
247 phNxpEse_free(cmdApdu.p_data); in LSC_ResetChannel()
274 phNxpEse_data cmdApdu; in LSC_SelectLsc() local
277 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in LSC_SelectLsc()
281 cmdApdu.len = (int32_t)(sizeof(SelectLsc) + 1); in LSC_SelectLsc()
282 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(cmdApdu.len * sizeof(uint8_t)); in LSC_SelectLsc()
283 cmdApdu.p_data[0] = Os_info->Channel_Info[0].channel_id; in LSC_SelectLsc()
285 memcpy(&(cmdApdu.p_data[1]), SelectLsc, sizeof(SelectLsc)); in LSC_SelectLsc()
290 ESESTATUS eseStat = phNxpEse_Transceive(&cmdApdu, &rspApdu); in LSC_SelectLsc()
308 phNxpEse_free(cmdApdu.p_data); in LSC_SelectLsc()
334 phNxpEse_data cmdApdu; in LSC_StoreData() local
336 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in LSC_StoreData()
338 cmdApdu.len = (int32_t)(5 + sizeof(gsStoreData)); in LSC_StoreData()
339 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(cmdApdu.len * sizeof(uint8_t)); in LSC_StoreData()
344 cmdApdu.p_data[xx++] = STORE_DATA_CLA | (Os_info->Channel_Info[0].channel_id); in LSC_StoreData()
345 cmdApdu.p_data[xx++] = STORE_DATA_INS; in LSC_StoreData()
346 cmdApdu.p_data[xx++] = 0x00; // P1 in LSC_StoreData()
347 cmdApdu.p_data[xx++] = 0x00; // P2 in LSC_StoreData()
348 cmdApdu.p_data[xx++] = len; in LSC_StoreData()
349 memcpy(&(cmdApdu.p_data[xx]), gsStoreData, len); in LSC_StoreData()
352 ESESTATUS eseStat = phNxpEse_Transceive(&cmdApdu, &rspApdu); in LSC_StoreData()
366 phNxpEse_free(cmdApdu.p_data); in LSC_StoreData()
807 phNxpEse_data cmdApdu; in LSC_SendtoEse() local
809 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in LSC_SendtoEse()
812 cmdApdu.len = (int32_t)(pTranscv_Info->sSendlength); in LSC_SendtoEse()
813 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(cmdApdu.len * sizeof(uint8_t)); in LSC_SendtoEse()
814 memcpy(cmdApdu.p_data, pTranscv_Info->sSendData, cmdApdu.len); in LSC_SendtoEse()
816 ESESTATUS eseStat = phNxpEse_Transceive(&cmdApdu, &rspApdu); in LSC_SendtoEse()
833 phNxpEse_free(cmdApdu.p_data); in LSC_SendtoEse()
876 phNxpEse_data cmdApdu; in LSC_SendtoLsc() local
878 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in LSC_SendtoLsc()
880 cmdApdu.len = pTranscv_Info->sSendlength; in LSC_SendtoLsc()
881 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(cmdApdu.len * sizeof(uint8_t)); in LSC_SendtoLsc()
882 memcpy(cmdApdu.p_data, pTranscv_Info->sSendData, cmdApdu.len); in LSC_SendtoLsc()
884 ESESTATUS eseStat = phNxpEse_Transceive(&cmdApdu, &rspApdu); in LSC_SendtoLsc()
893 phNxpEse_free(cmdApdu.p_data); in LSC_SendtoLsc()
920 phNxpEse_data cmdApdu; in LSC_CloseChannel() local
923 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in LSC_CloseChannel()
926 cmdApdu.len = 5; in LSC_CloseChannel()
927 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(cmdApdu.len * sizeof(uint8_t)); in LSC_CloseChannel()
930 cmdApdu.p_data[xx++] = Os_info->Channel_Info[cnt].channel_id; in LSC_CloseChannel()
931 cmdApdu.p_data[xx++] = 0x70; in LSC_CloseChannel()
932 cmdApdu.p_data[xx++] = 0x80; in LSC_CloseChannel()
933 cmdApdu.p_data[xx++] = Os_info->Channel_Info[cnt].channel_id; in LSC_CloseChannel()
934 cmdApdu.p_data[xx++] = 0x00; in LSC_CloseChannel()
936 ESESTATUS eseStat = phNxpEse_Transceive(&cmdApdu, &rspApdu); in LSC_CloseChannel()
953 phNxpEse_free(cmdApdu.p_data); in LSC_CloseChannel()
1230 phNxpEse_data cmdApdu; in Send_Backall_Loadcmds() local
1232 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in Send_Backall_Loadcmds()
1235 cmdApdu.len = (int32_t)(gspBuffer[0]); in Send_Backall_Loadcmds()
1236 cmdApdu.p_data = in Send_Backall_Loadcmds()
1237 (uint8_t*)phNxpEse_memalloc(cmdApdu.len * sizeof(uint8_t)); in Send_Backall_Loadcmds()
1238 gspBuffer = gspBuffer + 1 + cmdApdu.len; in Send_Backall_Loadcmds()
1240 memcpy(cmdApdu.p_data, &gspBuffer[1], cmdApdu.len); in Send_Backall_Loadcmds()
1242 ESESTATUS eseStat = phNxpEse_Transceive(&cmdApdu, &rspApdu); in Send_Backall_Loadcmds()
1245 phNxpEse_free(cmdApdu.p_data); in Send_Backall_Loadcmds()
1942 phNxpEse_data cmdApdu; in LSC_CloseAllLogicalChannels() local
1948 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in LSC_CloseAllLogicalChannels()
1950 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(5 * sizeof(uint8_t)); in LSC_CloseAllLogicalChannels()
1951 if (cmdApdu.p_data != NULL) { in LSC_CloseAllLogicalChannels()
1954 cmdApdu.p_data[xx++] = channelNumber; in LSC_CloseAllLogicalChannels()
1955 cmdApdu.p_data[xx++] = 0x70; // INS in LSC_CloseAllLogicalChannels()
1956 cmdApdu.p_data[xx++] = 0x80; // P1 in LSC_CloseAllLogicalChannels()
1957 cmdApdu.p_data[xx++] = channelNumber; // P2 in LSC_CloseAllLogicalChannels()
1958 cmdApdu.p_data[xx++] = 0x00; // Lc in LSC_CloseAllLogicalChannels()
1959 cmdApdu.len = xx; in LSC_CloseAllLogicalChannels()
1961 status = phNxpEse_Transceive(&cmdApdu, &rspApdu); in LSC_CloseAllLogicalChannels()
1972 phNxpEse_free(cmdApdu.p_data); in LSC_CloseAllLogicalChannels()
1988 phNxpEse_data cmdApdu; in LSC_SelectLsHash() local
1992 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in LSC_SelectLsHash()
1995 cmdApdu.len = (int32_t)(sizeof(SelectLscSlotHash)); in LSC_SelectLsHash()
1996 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(cmdApdu.len * sizeof(uint8_t)); in LSC_SelectLsHash()
1997 memcpy(cmdApdu.p_data, SelectLscSlotHash, sizeof(SelectLscSlotHash)); in LSC_SelectLsHash()
1999 ESESTATUS eseStat = phNxpEse_Transceive(&cmdApdu, &rspApdu); in LSC_SelectLsHash()
2009 phNxpEse_free(cmdApdu.p_data); in LSC_SelectLsHash()
2023 phNxpEse_data cmdApdu; in LSC_ReadLsHash() local
2032 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in LSC_ReadLsHash()
2034 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(5 * sizeof(uint8_t)); in LSC_ReadLsHash()
2036 if (cmdApdu.p_data != NULL) { in LSC_ReadLsHash()
2038 cmdApdu.p_data[xx++] = 0x80; // CLA in LSC_ReadLsHash()
2039 cmdApdu.p_data[xx++] = 0x02; // INS in LSC_ReadLsHash()
2040 cmdApdu.p_data[xx++] = slotId; // P1 in LSC_ReadLsHash()
2041 cmdApdu.p_data[xx++] = 0x00; // P2 in LSC_ReadLsHash()
2042 cmdApdu.len = xx; in LSC_ReadLsHash()
2044 ESESTATUS eseStat = phNxpEse_Transceive(&cmdApdu, &rspApdu); in LSC_ReadLsHash()
2072 phNxpEse_free(cmdApdu.p_data); in LSC_ReadLsHash()
2088 phNxpEse_data cmdApdu; in LSC_UpdateLsHash() local
2098 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in LSC_UpdateLsHash()
2101 cmdApdu.len = (int32_t)(5 + hashLen); in LSC_UpdateLsHash()
2102 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(cmdApdu.len * sizeof(uint8_t)); in LSC_UpdateLsHash()
2104 if (cmdApdu.p_data != NULL) { in LSC_UpdateLsHash()
2106 cmdApdu.p_data[xx++] = 0x80; in LSC_UpdateLsHash()
2107 cmdApdu.p_data[xx++] = 0x01; // INS in LSC_UpdateLsHash()
2108 cmdApdu.p_data[xx++] = slotId; // P1 in LSC_UpdateLsHash()
2109 cmdApdu.p_data[xx++] = 0x00; // P2 in LSC_UpdateLsHash()
2110 cmdApdu.p_data[xx++] = hashLen; // Lc in LSC_UpdateLsHash()
2111 memcpy(&cmdApdu.p_data[xx], hash, hashLen); in LSC_UpdateLsHash()
2113 ESESTATUS eseStat = phNxpEse_Transceive(&cmdApdu, &rspApdu); in LSC_UpdateLsHash()
2129 phNxpEse_free(cmdApdu.p_data); in LSC_UpdateLsHash()
2145 phNxpEse_data cmdApdu; in LSC_ReadLscInfo() local
2150 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in LSC_ReadLscInfo()
2154 cmdApdu.len = (int32_t)(sizeof(SelectLsc) + 1); in LSC_ReadLscInfo()
2155 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(cmdApdu.len * sizeof(uint8_t)); in LSC_ReadLscInfo()
2156 cmdApdu.p_data[0] = 0x00; // fchannel 0 in LSC_ReadLscInfo()
2158 memcpy(&(cmdApdu.p_data[1]), SelectLsc, sizeof(SelectLsc)); in LSC_ReadLscInfo()
2162 ESESTATUS eseStat = phNxpEse_Transceive(&cmdApdu, &rspApdu); in LSC_ReadLscInfo()
2183 phNxpEse_free(cmdApdu.p_data); in LSC_ReadLscInfo()