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()
803 phNxpEse_data cmdApdu; in LSC_SendtoEse() local
805 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in LSC_SendtoEse()
808 cmdApdu.len = (int32_t)(pTranscv_Info->sSendlength); in LSC_SendtoEse()
809 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(cmdApdu.len * sizeof(uint8_t)); in LSC_SendtoEse()
810 memcpy(cmdApdu.p_data, pTranscv_Info->sSendData, cmdApdu.len); in LSC_SendtoEse()
812 ESESTATUS eseStat = phNxpEse_Transceive(&cmdApdu, &rspApdu); in LSC_SendtoEse()
829 phNxpEse_free(cmdApdu.p_data); in LSC_SendtoEse()
872 phNxpEse_data cmdApdu; in LSC_SendtoLsc() local
874 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in LSC_SendtoLsc()
876 cmdApdu.len = pTranscv_Info->sSendlength; in LSC_SendtoLsc()
877 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(cmdApdu.len * sizeof(uint8_t)); in LSC_SendtoLsc()
878 memcpy(cmdApdu.p_data, pTranscv_Info->sSendData, cmdApdu.len); in LSC_SendtoLsc()
880 ESESTATUS eseStat = phNxpEse_Transceive(&cmdApdu, &rspApdu); in LSC_SendtoLsc()
889 phNxpEse_free(cmdApdu.p_data); in LSC_SendtoLsc()
916 phNxpEse_data cmdApdu; in LSC_CloseChannel() local
919 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in LSC_CloseChannel()
922 cmdApdu.len = 5; in LSC_CloseChannel()
923 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(cmdApdu.len * sizeof(uint8_t)); in LSC_CloseChannel()
926 cmdApdu.p_data[xx++] = Os_info->Channel_Info[cnt].channel_id; in LSC_CloseChannel()
927 cmdApdu.p_data[xx++] = 0x70; in LSC_CloseChannel()
928 cmdApdu.p_data[xx++] = 0x80; in LSC_CloseChannel()
929 cmdApdu.p_data[xx++] = Os_info->Channel_Info[cnt].channel_id; in LSC_CloseChannel()
930 cmdApdu.p_data[xx++] = 0x00; in LSC_CloseChannel()
932 ESESTATUS eseStat = phNxpEse_Transceive(&cmdApdu, &rspApdu); in LSC_CloseChannel()
949 phNxpEse_free(cmdApdu.p_data); in LSC_CloseChannel()
1226 phNxpEse_data cmdApdu; in Send_Backall_Loadcmds() local
1228 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in Send_Backall_Loadcmds()
1231 cmdApdu.len = (int32_t)(gspBuffer[0]); in Send_Backall_Loadcmds()
1232 cmdApdu.p_data = in Send_Backall_Loadcmds()
1233 (uint8_t*)phNxpEse_memalloc(cmdApdu.len * sizeof(uint8_t)); in Send_Backall_Loadcmds()
1234 gspBuffer = gspBuffer + 1 + cmdApdu.len; in Send_Backall_Loadcmds()
1236 memcpy(cmdApdu.p_data, &gspBuffer[1], cmdApdu.len); in Send_Backall_Loadcmds()
1238 ESESTATUS eseStat = phNxpEse_Transceive(&cmdApdu, &rspApdu); in Send_Backall_Loadcmds()
1241 phNxpEse_free(cmdApdu.p_data); in Send_Backall_Loadcmds()
1938 phNxpEse_data cmdApdu; in LSC_CloseAllLogicalChannels() local
1944 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in LSC_CloseAllLogicalChannels()
1946 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(5 * sizeof(uint8_t)); in LSC_CloseAllLogicalChannels()
1947 if (cmdApdu.p_data != NULL) { in LSC_CloseAllLogicalChannels()
1950 cmdApdu.p_data[xx++] = channelNumber; in LSC_CloseAllLogicalChannels()
1951 cmdApdu.p_data[xx++] = 0x70; // INS in LSC_CloseAllLogicalChannels()
1952 cmdApdu.p_data[xx++] = 0x80; // P1 in LSC_CloseAllLogicalChannels()
1953 cmdApdu.p_data[xx++] = channelNumber; // P2 in LSC_CloseAllLogicalChannels()
1954 cmdApdu.p_data[xx++] = 0x00; // Lc in LSC_CloseAllLogicalChannels()
1955 cmdApdu.len = xx; in LSC_CloseAllLogicalChannels()
1957 status = phNxpEse_Transceive(&cmdApdu, &rspApdu); in LSC_CloseAllLogicalChannels()
1968 phNxpEse_free(cmdApdu.p_data); in LSC_CloseAllLogicalChannels()
1984 phNxpEse_data cmdApdu; in LSC_SelectLsHash() local
1988 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in LSC_SelectLsHash()
1991 cmdApdu.len = (int32_t)(sizeof(SelectLscSlotHash)); in LSC_SelectLsHash()
1992 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(cmdApdu.len * sizeof(uint8_t)); in LSC_SelectLsHash()
1993 memcpy(cmdApdu.p_data, SelectLscSlotHash, sizeof(SelectLscSlotHash)); in LSC_SelectLsHash()
1995 ESESTATUS eseStat = phNxpEse_Transceive(&cmdApdu, &rspApdu); in LSC_SelectLsHash()
2005 phNxpEse_free(cmdApdu.p_data); in LSC_SelectLsHash()
2019 phNxpEse_data cmdApdu; in LSC_ReadLsHash() local
2028 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in LSC_ReadLsHash()
2030 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(5 * sizeof(uint8_t)); in LSC_ReadLsHash()
2032 if (cmdApdu.p_data != NULL) { in LSC_ReadLsHash()
2034 cmdApdu.p_data[xx++] = 0x80; // CLA in LSC_ReadLsHash()
2035 cmdApdu.p_data[xx++] = 0x02; // INS in LSC_ReadLsHash()
2036 cmdApdu.p_data[xx++] = slotId; // P1 in LSC_ReadLsHash()
2037 cmdApdu.p_data[xx++] = 0x00; // P2 in LSC_ReadLsHash()
2038 cmdApdu.len = xx; in LSC_ReadLsHash()
2040 ESESTATUS eseStat = phNxpEse_Transceive(&cmdApdu, &rspApdu); in LSC_ReadLsHash()
2068 phNxpEse_free(cmdApdu.p_data); in LSC_ReadLsHash()
2084 phNxpEse_data cmdApdu; in LSC_UpdateLsHash() local
2094 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in LSC_UpdateLsHash()
2097 cmdApdu.len = (int32_t)(5 + hashLen); in LSC_UpdateLsHash()
2098 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(cmdApdu.len * sizeof(uint8_t)); in LSC_UpdateLsHash()
2100 if (cmdApdu.p_data != NULL) { in LSC_UpdateLsHash()
2102 cmdApdu.p_data[xx++] = 0x80; in LSC_UpdateLsHash()
2103 cmdApdu.p_data[xx++] = 0x01; // INS in LSC_UpdateLsHash()
2104 cmdApdu.p_data[xx++] = slotId; // P1 in LSC_UpdateLsHash()
2105 cmdApdu.p_data[xx++] = 0x00; // P2 in LSC_UpdateLsHash()
2106 cmdApdu.p_data[xx++] = hashLen; // Lc in LSC_UpdateLsHash()
2107 memcpy(&cmdApdu.p_data[xx], hash, hashLen); in LSC_UpdateLsHash()
2109 ESESTATUS eseStat = phNxpEse_Transceive(&cmdApdu, &rspApdu); in LSC_UpdateLsHash()
2125 phNxpEse_free(cmdApdu.p_data); in LSC_UpdateLsHash()
2141 phNxpEse_data cmdApdu; in LSC_ReadLscInfo() local
2146 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in LSC_ReadLscInfo()
2150 cmdApdu.len = (int32_t)(sizeof(SelectLsc) + 1); in LSC_ReadLscInfo()
2151 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(cmdApdu.len * sizeof(uint8_t)); in LSC_ReadLscInfo()
2152 cmdApdu.p_data[0] = 0x00; // fchannel 0 in LSC_ReadLscInfo()
2154 memcpy(&(cmdApdu.p_data[1]), SelectLsc, sizeof(SelectLsc)); in LSC_ReadLscInfo()
2158 ESESTATUS eseStat = phNxpEse_Transceive(&cmdApdu, &rspApdu); in LSC_ReadLscInfo()
2179 phNxpEse_free(cmdApdu.p_data); in LSC_ReadLscInfo()