Lines Matching refs:cmdApdu
96 phNxpEse_data cmdApdu; in transmit() local
98 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in transmit()
101 cmdApdu.len = data.size(); in transmit()
102 if (cmdApdu.len >= MIN_APDU_LENGTH) { in transmit()
103 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(data.size() * sizeof(uint8_t)); in transmit()
104 memcpy(cmdApdu.p_data, data.data(), cmdApdu.len); in transmit()
105 status = phNxpEse_Transceive(&cmdApdu, &rspApdu); in transmit()
116 phNxpEse_free(cmdApdu.p_data); in transmit()
141 phNxpEse_data cmdApdu; in openLogicalChannel() local
144 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in openLogicalChannel()
147 cmdApdu.len = manageChannelCommand.size(); in openLogicalChannel()
148 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(manageChannelCommand.size() * in openLogicalChannel()
150 if (cmdApdu.p_data != NULL) { in openLogicalChannel()
151 memcpy(cmdApdu.p_data, manageChannelCommand.data(), cmdApdu.len); in openLogicalChannel()
152 status = phNxpEse_Transceive(&cmdApdu, &rspApdu); in openLogicalChannel()
174 phNxpEse_free(cmdApdu.p_data); in openLogicalChannel()
196 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in openLogicalChannel()
199 cmdApdu.len = (int32_t)(5 + aid.size()); in openLogicalChannel()
200 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(cmdApdu.len * sizeof(uint8_t)); in openLogicalChannel()
201 if (cmdApdu.p_data != NULL) { in openLogicalChannel()
203 cmdApdu.p_data[xx++] = resApduBuff.channelNumber; in openLogicalChannel()
204 cmdApdu.p_data[xx++] = 0xA4; // INS in openLogicalChannel()
205 cmdApdu.p_data[xx++] = 0x04; // P1 in openLogicalChannel()
206 cmdApdu.p_data[xx++] = p2; // P2 in openLogicalChannel()
207 cmdApdu.p_data[xx++] = aid.size(); // Lc in openLogicalChannel()
208 memcpy(&cmdApdu.p_data[xx], aid.data(), aid.size()); in openLogicalChannel()
210 status = phNxpEse_Transceive(&cmdApdu, &rspApdu); in openLogicalChannel()
248 phNxpEse_free(cmdApdu.p_data); in openLogicalChannel()
270 phNxpEse_data cmdApdu; in openBasicChannel() local
273 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in openBasicChannel()
276 cmdApdu.len = (int32_t)(5 + aid.size()); in openBasicChannel()
277 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(cmdApdu.len * sizeof(uint8_t)); in openBasicChannel()
278 if (cmdApdu.p_data != NULL) { in openBasicChannel()
280 cmdApdu.p_data[xx++] = 0x00; // basic channel in openBasicChannel()
281 cmdApdu.p_data[xx++] = 0xA4; // INS in openBasicChannel()
282 cmdApdu.p_data[xx++] = 0x04; // P1 in openBasicChannel()
283 cmdApdu.p_data[xx++] = p2; // P2 in openBasicChannel()
284 cmdApdu.p_data[xx++] = aid.size(); // Lc in openBasicChannel()
285 memcpy(&cmdApdu.p_data[xx], aid.data(), aid.size()); in openBasicChannel()
287 status = phNxpEse_Transceive(&cmdApdu, &rspApdu); in openBasicChannel()
334 phNxpEse_free(cmdApdu.p_data); in openBasicChannel()
344 phNxpEse_data cmdApdu; in closeChannel() local
353 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in closeChannel()
355 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(5 * sizeof(uint8_t)); in closeChannel()
356 if (cmdApdu.p_data != NULL) { in closeChannel()
359 cmdApdu.p_data[xx++] = channelNumber; in closeChannel()
360 cmdApdu.p_data[xx++] = 0x70; // INS in closeChannel()
361 cmdApdu.p_data[xx++] = 0x80; // P1 in closeChannel()
362 cmdApdu.p_data[xx++] = channelNumber; // P2 in closeChannel()
363 cmdApdu.p_data[xx++] = 0x00; // Lc in closeChannel()
364 cmdApdu.len = xx; in closeChannel()
366 status = phNxpEse_Transceive(&cmdApdu, &rspApdu); in closeChannel()
376 phNxpEse_free(cmdApdu.p_data); in closeChannel()