Lines Matching refs:cmdApdu
137 phNxpEse_data cmdApdu; in transmit() local
139 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in transmit()
142 cmdApdu.len = data.size(); in transmit()
143 if (cmdApdu.len >= MIN_APDU_LENGTH) { in transmit()
144 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(data.size() * sizeof(uint8_t)); in transmit()
145 memcpy(cmdApdu.p_data, data.data(), cmdApdu.len); in transmit()
146 status = phNxpEse_Transceive(&cmdApdu, &rspApdu); in transmit()
157 phNxpEse_free(cmdApdu.p_data); in transmit()
182 phNxpEse_data cmdApdu; in openLogicalChannel() local
185 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in openLogicalChannel()
188 cmdApdu.len = manageChannelCommand.size(); in openLogicalChannel()
189 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(manageChannelCommand.size() * in openLogicalChannel()
191 if (cmdApdu.p_data != NULL) { in openLogicalChannel()
192 memcpy(cmdApdu.p_data, manageChannelCommand.data(), cmdApdu.len); in openLogicalChannel()
193 status = phNxpEse_Transceive(&cmdApdu, &rspApdu); in openLogicalChannel()
215 phNxpEse_free(cmdApdu.p_data); in openLogicalChannel()
237 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in openLogicalChannel()
240 cmdApdu.len = (int32_t)(5 + aid.size()); in openLogicalChannel()
241 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(cmdApdu.len * sizeof(uint8_t)); in openLogicalChannel()
242 if (cmdApdu.p_data != NULL) { in openLogicalChannel()
244 cmdApdu.p_data[xx++] = resApduBuff.channelNumber; in openLogicalChannel()
245 cmdApdu.p_data[xx++] = 0xA4; // INS in openLogicalChannel()
246 cmdApdu.p_data[xx++] = 0x04; // P1 in openLogicalChannel()
247 cmdApdu.p_data[xx++] = p2; // P2 in openLogicalChannel()
248 cmdApdu.p_data[xx++] = aid.size(); // Lc in openLogicalChannel()
249 memcpy(&cmdApdu.p_data[xx], aid.data(), aid.size()); in openLogicalChannel()
251 status = phNxpEse_Transceive(&cmdApdu, &rspApdu); in openLogicalChannel()
289 phNxpEse_free(cmdApdu.p_data); in openLogicalChannel()
311 phNxpEse_data cmdApdu; in openBasicChannel() local
314 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in openBasicChannel()
317 cmdApdu.len = (int32_t)(5 + aid.size()); in openBasicChannel()
318 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(cmdApdu.len * sizeof(uint8_t)); in openBasicChannel()
319 if (cmdApdu.p_data != NULL) { in openBasicChannel()
321 cmdApdu.p_data[xx++] = 0x00; // basic channel in openBasicChannel()
322 cmdApdu.p_data[xx++] = 0xA4; // INS in openBasicChannel()
323 cmdApdu.p_data[xx++] = 0x04; // P1 in openBasicChannel()
324 cmdApdu.p_data[xx++] = p2; // P2 in openBasicChannel()
325 cmdApdu.p_data[xx++] = aid.size(); // Lc in openBasicChannel()
326 memcpy(&cmdApdu.p_data[xx], aid.data(), aid.size()); in openBasicChannel()
328 status = phNxpEse_Transceive(&cmdApdu, &rspApdu); in openBasicChannel()
375 phNxpEse_free(cmdApdu.p_data); in openBasicChannel()
384 phNxpEse_data cmdApdu; in closeChannel() local
393 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in closeChannel()
395 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(5 * sizeof(uint8_t)); in closeChannel()
396 if (cmdApdu.p_data != NULL) { in closeChannel()
399 cmdApdu.p_data[xx++] = channelNumber; in closeChannel()
400 cmdApdu.p_data[xx++] = 0x70; // INS in closeChannel()
401 cmdApdu.p_data[xx++] = 0x80; // P1 in closeChannel()
402 cmdApdu.p_data[xx++] = channelNumber; // P2 in closeChannel()
403 cmdApdu.p_data[xx++] = 0x00; // Lc in closeChannel()
404 cmdApdu.len = xx; in closeChannel()
406 status = phNxpEse_Transceive(&cmdApdu, &rspApdu); in closeChannel()
416 phNxpEse_free(cmdApdu.p_data); in closeChannel()