/hardware/st/secure_element/ese-spi-driver/utils-lib/ |
D | CommandApdu.cc | 34 int CommandApdu_toByteArray(CommandApdu cmdApdu, char* commandApduArray) { in CommandApdu_toByteArray() argument 35 int commandApduArraySize = CommandApdu_getSize(cmdApdu); in CommandApdu_toByteArray() 37 if (cmdApdu.lc > MAX_CMD_APDU_DATA_LENGTH) { in CommandApdu_toByteArray() 41 commandApduArray[0] = cmdApdu.cla; in CommandApdu_toByteArray() 42 commandApduArray[1] = cmdApdu.ins; in CommandApdu_toByteArray() 43 commandApduArray[2] = cmdApdu.p1; in CommandApdu_toByteArray() 44 commandApduArray[3] = cmdApdu.p2; in CommandApdu_toByteArray() 46 if (cmdApdu.lc > 0) { in CommandApdu_toByteArray() 47 commandApduArray[4] = cmdApdu.lc; in CommandApdu_toByteArray() 48 memcpy(commandApduArray + 5, cmdApdu.data, cmdApdu.lc); in CommandApdu_toByteArray() [all …]
|
D | CommandApdu.h | 43 int CommandApdu_toByteArray(CommandApdu cmdApdu, char* CommandApduArray); 50 int CommandApdu_getSize(CommandApdu cmdApdu); 65 char* cmdData, char le, CommandApdu* cmdApdu); 78 CommandApdu* cmdApdu);
|
/hardware/st/secure_element/1.0/ |
D | SecureElement.cpp | 118 StEse_data cmdApdu; in transmit() local 120 memset(&cmdApdu, 0x00, sizeof(StEse_data)); in transmit() 124 cmdApdu.len = data.size(); in transmit() 125 if (cmdApdu.len >= MIN_APDU_LENGTH) { in transmit() 126 cmdApdu.p_data = (uint8_t*)malloc(data.size() * sizeof(uint8_t)); in transmit() 127 memcpy(cmdApdu.p_data, data.data(), cmdApdu.len); in transmit() 129 if (aram_channel && (0x03 & cmdApdu.p_data[0]) == aram_channel && in transmit() 132 status = (ESESTATUS)Aram_transceive(&cmdApdu, &rspApdu); in transmit() 134 status = StEse_Transceive(&cmdApdu, &rspApdu); in transmit() 147 free(cmdApdu.p_data); in transmit() [all …]
|
/hardware/nxp/secure_element/pn8x/1.0/ |
D | SecureElement.cpp | 95 phNxpEse_data cmdApdu; in transmit() local 97 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in transmit() 100 cmdApdu.len = data.size(); in transmit() 101 if (cmdApdu.len >= MIN_APDU_LENGTH) { in transmit() 102 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(data.size() * sizeof(uint8_t)); in transmit() 103 memcpy(cmdApdu.p_data, data.data(), cmdApdu.len); in transmit() 104 status = phNxpEse_Transceive(&cmdApdu, &rspApdu); in transmit() 115 phNxpEse_free(cmdApdu.p_data); in transmit() 145 phNxpEse_data cmdApdu; in openLogicalChannel() local 148 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in openLogicalChannel() [all …]
|
/hardware/st/secure_element/1.1/ |
D | SecureElement.cpp | 124 StEse_data cmdApdu; in transmit() local 126 memset(&cmdApdu, 0x00, sizeof(StEse_data)); in transmit() 130 cmdApdu.len = data.size(); in transmit() 131 if (cmdApdu.len >= MIN_APDU_LENGTH) { in transmit() 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() 134 status = StEse_Transceive(&cmdApdu, &rspApdu); in transmit() 146 free(cmdApdu.p_data); in transmit() 181 StEse_data cmdApdu; in openLogicalChannel() local 184 memset(&cmdApdu, 0x00, sizeof(StEse_data)); in openLogicalChannel() [all …]
|
/hardware/nxp/secure_element/pn8x/1.1/ |
D | SecureElement.cpp | 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() 187 phNxpEse_data cmdApdu; in openLogicalChannel() local 190 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in openLogicalChannel() [all …]
|
/hardware/st/secure_element/1.2/ |
D | SecureElement.cpp | 133 StEse_data cmdApdu; in transmit() local 135 memset(&cmdApdu, 0x00, sizeof(StEse_data)); in transmit() 139 cmdApdu.len = data.size(); in transmit() 140 if (cmdApdu.len >= MIN_APDU_LENGTH) { in transmit() 141 cmdApdu.p_data = (uint8_t*)malloc(data.size() * sizeof(uint8_t)); in transmit() 142 memcpy(cmdApdu.p_data, data.data(), cmdApdu.len); in transmit() 143 status = StEse_Transceive(&cmdApdu, &rspApdu); in transmit() 155 free(cmdApdu.p_data); in transmit() 190 StEse_data cmdApdu; in openLogicalChannel() local 193 memset(&cmdApdu, 0x00, sizeof(StEse_data)); in openLogicalChannel() [all …]
|
/hardware/nxp/secure_element/pn8x/ls_client/src/ |
D | LsLib.cpp | 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() [all …]
|
/hardware/nxp/secure_element/snxxx/1.0/ |
D | VirtualISO.cpp | 185 phNxpEse_data cmdApdu; in openLogicalChannel() local 188 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in openLogicalChannel() 191 cmdApdu.len = manageChannelCommand.size(); in openLogicalChannel() 192 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(manageChannelCommand.size() * in openLogicalChannel() 194 memcpy(cmdApdu.p_data, manageChannelCommand.data(), cmdApdu.len); in openLogicalChannel() 202 status = phNxpEse_Transceive(&cmdApdu, &rspApdu); in openLogicalChannel() 230 phNxpEse_free(cmdApdu.p_data); in openLogicalChannel()
|
D | SecureElement.cpp | 248 phNxpEse_data cmdApdu; in openLogicalChannel() local 251 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in openLogicalChannel() 255 cmdApdu.len = manageChannelCommand.size(); in openLogicalChannel() 256 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(manageChannelCommand.size() * in openLogicalChannel() 258 memcpy(cmdApdu.p_data, manageChannelCommand.data(), cmdApdu.len); in openLogicalChannel() 264 status = phNxpEse_Transceive(&cmdApdu, &rspApdu); in openLogicalChannel() 291 phNxpEse_free(cmdApdu.p_data); in openLogicalChannel()
|
/hardware/nxp/secure_element/snxxx/aidl/ |
D | SecureElement.cpp | 377 phNxpEse_data cmdApdu; in openLogicalChannel() local 380 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in openLogicalChannel() 384 cmdApdu.len = (uint32_t)manageChannelCommand.size(); in openLogicalChannel() 385 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(manageChannelCommand.size() * in openLogicalChannel() 387 memcpy(cmdApdu.p_data, manageChannelCommand.data(), cmdApdu.len); in openLogicalChannel() 393 status = phNxpEse_Transceive(&cmdApdu, &rspApdu); in openLogicalChannel() 412 phNxpEse_free(cmdApdu.p_data); in openLogicalChannel() 901 phNxpEse_data cmdApdu; in getResponseInternal() local 909 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in getResponseInternal() 911 cmdApdu.len = (uint32_t)sizeof(getResponse); in getResponseInternal() [all …]
|
D | VirtualISO.cpp | 213 phNxpEse_data cmdApdu; in openLogicalChannel() local 216 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in openLogicalChannel() 219 cmdApdu.len = manageChannelCommand.size(); in openLogicalChannel() 220 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(manageChannelCommand.size() * in openLogicalChannel() 222 memcpy(cmdApdu.p_data, manageChannelCommand.data(), cmdApdu.len); in openLogicalChannel() 230 status = phNxpEse_Transceive(&cmdApdu, &rspApdu); in openLogicalChannel() 258 phNxpEse_free(cmdApdu.p_data); in openLogicalChannel()
|
/hardware/nxp/secure_element/snxxx/1.2/ |
D | SecureElement.cpp | 458 phNxpEse_data cmdApdu; in openLogicalChannel() local 461 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in openLogicalChannel() 465 cmdApdu.len = (uint32_t)manageChannelCommand.size(); in openLogicalChannel() 466 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(manageChannelCommand.size() * in openLogicalChannel() 468 memcpy(cmdApdu.p_data, manageChannelCommand.data(), cmdApdu.len); in openLogicalChannel() 474 status = phNxpEse_Transceive(&cmdApdu, &rspApdu); in openLogicalChannel() 493 phNxpEse_free(cmdApdu.p_data); in openLogicalChannel() 989 phNxpEse_data cmdApdu; in getResponseInternal() local 997 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in getResponseInternal() 999 cmdApdu.len = (uint32_t)sizeof(getResponse); in getResponseInternal() [all …]
|
D | VirtualISO.cpp | 274 phNxpEse_data cmdApdu; in openLogicalChannel() local 277 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in openLogicalChannel() 280 cmdApdu.len = manageChannelCommand.size(); in openLogicalChannel() 281 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(manageChannelCommand.size() * in openLogicalChannel() 283 memcpy(cmdApdu.p_data, manageChannelCommand.data(), cmdApdu.len); in openLogicalChannel() 291 status = phNxpEse_Transceive(&cmdApdu, &rspApdu); in openLogicalChannel() 319 phNxpEse_free(cmdApdu.p_data); in openLogicalChannel()
|
/hardware/nxp/secure_element/snxxx/1.1/ |
D | VirtualISO.cpp | 252 phNxpEse_data cmdApdu; in openLogicalChannel() local 255 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in openLogicalChannel() 258 cmdApdu.len = manageChannelCommand.size(); in openLogicalChannel() 259 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(manageChannelCommand.size() * in openLogicalChannel() 261 memcpy(cmdApdu.p_data, manageChannelCommand.data(), cmdApdu.len); in openLogicalChannel() 269 status = phNxpEse_Transceive(&cmdApdu, &rspApdu); in openLogicalChannel() 297 phNxpEse_free(cmdApdu.p_data); in openLogicalChannel()
|
D | SecureElement.cpp | 342 phNxpEse_data cmdApdu; in openLogicalChannel() local 345 phNxpEse_memset(&cmdApdu, 0x00, sizeof(phNxpEse_data)); in openLogicalChannel() 349 cmdApdu.len = (uint32_t)manageChannelCommand.size(); in openLogicalChannel() 350 cmdApdu.p_data = (uint8_t*)phNxpEse_memalloc(manageChannelCommand.size() * in openLogicalChannel() 352 memcpy(cmdApdu.p_data, manageChannelCommand.data(), cmdApdu.len); in openLogicalChannel() 358 status = phNxpEse_Transceive(&cmdApdu, &rspApdu); in openLogicalChannel() 377 phNxpEse_free(cmdApdu.p_data); in openLogicalChannel()
|