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()
247 phNxpEse_free(cmdApdu.p_data); in openLogicalChannel()
269 phNxpEse_data cmdApdu; in openBasicChannel() local
272 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in openBasicChannel()
275 cmdApdu.len = (int32_t)(5 + aid.size()); in openBasicChannel()
276 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(cmdApdu.len * sizeof(uint8_t)); in openBasicChannel()
277 if (cmdApdu.p_data != NULL) { in openBasicChannel()
279 cmdApdu.p_data[xx++] = 0x00; // basic channel in openBasicChannel()
280 cmdApdu.p_data[xx++] = 0xA4; // INS in openBasicChannel()
281 cmdApdu.p_data[xx++] = 0x04; // P1 in openBasicChannel()
282 cmdApdu.p_data[xx++] = p2; // P2 in openBasicChannel()
283 cmdApdu.p_data[xx++] = aid.size(); // Lc in openBasicChannel()
284 memcpy(&cmdApdu.p_data[xx], aid.data(), aid.size()); in openBasicChannel()
286 status = phNxpEse_Transceive(&cmdApdu, &rspApdu); in openBasicChannel()
332 phNxpEse_free(cmdApdu.p_data); in openBasicChannel()
342 phNxpEse_data cmdApdu; in closeChannel() local
351 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in closeChannel()
353 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(5 * sizeof(uint8_t)); in closeChannel()
354 if (cmdApdu.p_data != NULL) { in closeChannel()
357 cmdApdu.p_data[xx++] = channelNumber; in closeChannel()
358 cmdApdu.p_data[xx++] = 0x70; // INS in closeChannel()
359 cmdApdu.p_data[xx++] = 0x80; // P1 in closeChannel()
360 cmdApdu.p_data[xx++] = channelNumber; // P2 in closeChannel()
361 cmdApdu.p_data[xx++] = 0x00; // Lc in closeChannel()
362 cmdApdu.len = xx; in closeChannel()
364 status = phNxpEse_Transceive(&cmdApdu, &rspApdu); in closeChannel()
374 phNxpEse_free(cmdApdu.p_data); in closeChannel()