Lines Matching refs:p_data

132     cmdApdu.p_data = (uint8_t*)malloc(data.size() * sizeof(uint8_t));  in transmit()
133 memcpy(cmdApdu.p_data, data.data(), cmdApdu.len); in transmit()
143 memcpy(&result[0], rspApdu.p_data, rspApdu.len); in transmit()
146 free(cmdApdu.p_data); in transmit()
147 free(rspApdu.p_data); in transmit()
181 cmdApdu.p_data = in openLogicalChannel()
183 if (cmdApdu.p_data != NULL) { in openLogicalChannel()
184 memcpy(cmdApdu.p_data, manageChannelCommand.data(), cmdApdu.len); in openLogicalChannel()
190 } else if (rspApdu.p_data[rspApdu.len - 2] == 0x90 && in openLogicalChannel()
191 rspApdu.p_data[rspApdu.len - 1] == 0x00) { in openLogicalChannel()
193 resApduBuff.channelNumber = rspApdu.p_data[0]; in openLogicalChannel()
197 } else if (rspApdu.p_data[rspApdu.len - 2] == 0x6A && in openLogicalChannel()
198 rspApdu.p_data[rspApdu.len - 1] == 0x81) { in openLogicalChannel()
200 } else if (((rspApdu.p_data[rspApdu.len - 2] == 0x6E) || in openLogicalChannel()
201 (rspApdu.p_data[rspApdu.len - 2] == 0x6D)) && in openLogicalChannel()
202 rspApdu.p_data[rspApdu.len - 1] == 0x00) { in openLogicalChannel()
206 free(cmdApdu.p_data); in openLogicalChannel()
207 cmdApdu.p_data = NULL; in openLogicalChannel()
208 free(rspApdu.p_data); in openLogicalChannel()
209 rspApdu.p_data = NULL; in openLogicalChannel()
233 cmdApdu.p_data = (uint8_t*)malloc(cmdApdu.len * sizeof(uint8_t)); in openLogicalChannel()
234 if (cmdApdu.p_data != NULL) { in openLogicalChannel()
236 cmdApdu.p_data[xx++] = resApduBuff.channelNumber; in openLogicalChannel()
237 cmdApdu.p_data[xx++] = 0xA4; // INS in openLogicalChannel()
238 cmdApdu.p_data[xx++] = 0x04; // P1 in openLogicalChannel()
239 cmdApdu.p_data[xx++] = p2; // P2 in openLogicalChannel()
240 cmdApdu.p_data[xx++] = aid.size(); // Lc in openLogicalChannel()
241 memcpy(&cmdApdu.p_data[xx], aid.data(), aid.size()); in openLogicalChannel()
242 cmdApdu.p_data[xx + aid.size()] = 0x00; // Le in openLogicalChannel()
250 uint8_t sw1 = rspApdu.p_data[rspApdu.len - 2]; in openLogicalChannel()
251 uint8_t sw2 = rspApdu.p_data[rspApdu.len - 1]; in openLogicalChannel()
257 memcpy(&resApduBuff.selectResponse[0], rspApdu.p_data, rspApdu.len); in openLogicalChannel()
286 free(cmdApdu.p_data); in openLogicalChannel()
287 free(rspApdu.p_data); in openLogicalChannel()
319 cmdApdu.p_data = (uint8_t*)malloc(cmdApdu.len * sizeof(uint8_t)); in openBasicChannel()
320 if (cmdApdu.p_data != NULL) { in openBasicChannel()
322 cmdApdu.p_data[xx++] = 0x00; // basic channel in openBasicChannel()
323 cmdApdu.p_data[xx++] = 0xA4; // INS in openBasicChannel()
324 cmdApdu.p_data[xx++] = 0x04; // P1 in openBasicChannel()
325 cmdApdu.p_data[xx++] = p2; // P2 in openBasicChannel()
326 cmdApdu.p_data[xx++] = aid.size(); // Lc in openBasicChannel()
327 memcpy(&cmdApdu.p_data[xx], aid.data(), aid.size()); in openBasicChannel()
328 cmdApdu.p_data[xx + aid.size()] = 0x00; // Le in openBasicChannel()
337 uint8_t sw1 = rspApdu.p_data[rspApdu.len - 2]; in openBasicChannel()
338 uint8_t sw2 = rspApdu.p_data[rspApdu.len - 1]; in openBasicChannel()
344 memcpy(&result[0], rspApdu.p_data, rspApdu.len); in openBasicChannel()
375 free(cmdApdu.p_data); in openBasicChannel()
376 free(rspApdu.p_data); in openBasicChannel()
400 cmdApdu.p_data = (uint8_t*)malloc(5 * sizeof(uint8_t)); in closeChannel()
401 if (cmdApdu.p_data != NULL) { in closeChannel()
404 cmdApdu.p_data[xx++] = channelNumber; in closeChannel()
405 cmdApdu.p_data[xx++] = 0x70; // INS in closeChannel()
406 cmdApdu.p_data[xx++] = 0x80; // P1 in closeChannel()
407 cmdApdu.p_data[xx++] = channelNumber; // P2 in closeChannel()
408 cmdApdu.p_data[xx++] = 0x00; // Lc in closeChannel()
415 } else if ((rspApdu.p_data[rspApdu.len - 2] == 0x90) && in closeChannel()
416 (rspApdu.p_data[rspApdu.len - 1] == 0x00)) { in closeChannel()
421 free(cmdApdu.p_data); in closeChannel()
422 free(rspApdu.p_data); in closeChannel()