HomeSort by relevance Sort by last modified time
    Searched refs:apdu (Results 1 - 19 of 19) sorted by null

  /external/libese/libapdu/tests/
apdu_test.cpp 23 #include <apdu/apdu.h>
31 const CommandApdu apdu{1, 2, 3, 4};
33 ASSERT_EQ(expected.size(), apdu.size());
34 ASSERT_TRUE(std::equal(apdu.begin(), apdu.end(), expected.begin(), expected.end()));
38 const CommandApdu apdu{4, 3, 2, 1, 0, 3};
40 ASSERT_EQ(expected.size(), apdu.size());
41 ASSERT_TRUE(std::equal(apdu.begin(), apdu.end(), expected.begin(), expected.end()))
    [all...]
  /external/libese/apps/weaver/card/src/com/android/weaver/
Weaver.java 20 import javacard.framework.APDU;
65 * Processes an incoming APDU.
67 * @param apdu the incoming APDU
71 public void process(APDU apdu) {
87 final byte buffer[] = apdu.getBuffer();
92 if (apdu.isISOInterindustryCLA()) {
105 getNumSlots(apdu);
109 write(apdu);
    [all...]
  /external/libese/apps/boot/card/src/com/android/verifiedboot/storage/
Storage.java 25 import javacard.framework.APDU;
40 import javacardx.apdu.ExtendedLength;
230 private short sendStorageState(APDU apdu) {
231 final byte buffer[] = apdu.getBuffer();
236 short expectedLength = apdu.setOutgoing();
245 apdu.setOutgoingLength((short) 4);
246 apdu.sendBytes((short) 0, (short) 4);
250 apdu.setOutgoingLength(length);
258 apdu.sendBytesLong(working, (short) 0, (short) 2)
    [all...]
  /cts/apps/CtsVerifier/src/com/android/cts/verifier/nfc/hce/
CommandApdu.java 10 public CommandApdu(String apdu, boolean reachable) {
11 mApdu = apdu;
32 String apdu = source.readString();
34 return new CommandApdu(apdu, reachable);
HceUtils.java 68 public static final CommandApdu buildCommandApdu(String apdu, boolean reachable) {
69 return new CommandApdu(apdu, reachable);
SimpleReaderActivity.java 108 for (CommandApdu apdu: mApdus) {
109 sb.append("Request APDU:\n");
110 sb.append(apdu.getApdu() + "\n\n");
112 byte[] response = isoDep.transceive(HceUtils.hexStringToBytes(apdu.getApdu()));
114 sb.append("Response APDU (in " + Long.toString(apduEndTime - apduStartTime) +
121 Log.d(TAG, HceUtils.getHexBytes("APDU response: ", response));
123 Log.d(TAG, "Unexpected APDU response: " + HceUtils.getHexBytes("", response));
130 sb.insert(0, "Total APDU exchange time: " +
140 sb.insert(0, "FAIL. Total APDU exchange time: " +
148 builder.setMessage("An unexpected response APDU was received, or no APDUs were received at all.")
    [all...]
  /external/libese/libese-hw/tests/
ese_hw_echo_tests.cpp 43 std::vector<uint8_t> apdu; local
46 apdu.resize(apdu_len, 'A');
48 EXPECT_EQ(apdu_len, ese_transceive(&ese_, apdu.data(), apdu_len, apdu_reply.data(), apdu_reply.size()));
50 EXPECT_EQ(apdu, apdu_reply);
  /external/libese/esed/
utils.h 25 #include <apdu/apdu.h>
106 // Check for ISO 7816-4 APDU response format errors
107 ResponseApdu apdu{responseBuffer};
108 if (!apdu.ok()) {
115 return handler(apdu);
122 * Checks that the amount of data in the response APDU matches the expected
126 T checkLength(const ResponseApdu& apdu, const size_t size) {
127 if (apdu.dataSize() != size) {
135 * Checks that the response APDU does no encode an error and that the amount o
    [all...]
  /cts/tests/tests/secure_element/sample_applet/src/com/android/cts/omapi/test/
CtsAndroidOmapiTestApplet.java 3 import javacard.framework.APDU;
101 public void process(APDU apdu) {
102 byte[] buf = apdu.getBuffer();
116 le = apdu.setOutgoing();
117 apdu.setOutgoingLength((short)sendLen);
119 apdu.sendBytesLong(buf, respBuffOffset, sendLen);
129 apdu.setIncomingAndReceive();
130 //case 3 APDU, return 256 bytes data
132 le = apdu.setOutgoing()
    [all...]
  /external/libese/examples/
ese_nxp_sample.c 27 /* APDU: CLA INS P1-P2 Lc Data Le */
28 struct Apdu {
37 const struct Apdu *apdus[];
42 const struct Apdu kSelectCardManager = {
49 const struct Apdu kGetCplc = {
73 const struct Apdu kSelectJcopIdentify = {
101 const struct Apdu *apdu = kSessions[s]->apdus[apdu_index]; local
102 printf("Sending APDU %u: %s\n", apdu_index, apdu->desc)
    [all...]
  /cts/tests/tests/secure_element/omapi/src/android/omapi/cts/
OmapiTest.java 74 /* OMAPI APDU Test case 1 and 3 */
84 /* OMAPI APDU Test case 2 and 4 */
95 /* Case 2 APDU command expects the P2 received in the SELECT command as 1-byte outgoing data */
100 /* OMAPI APDU Test case 1 and 3 */
105 /* OMAPI APDU Test case 2 and 4 */
434 private byte[] internalTransmitApdu(Reader reader, byte[] apdu) throws IOException {
447 transmitResponse = channel.transmit(apdu);
455 private byte[] internalTransmitApduWithoutP2(Reader reader, byte[] apdu) throws IOException {
468 transmitResponse = channel.transmit(apdu);
489 for (byte[] apdu : NO_DATA_APDU)
    [all...]
  /external/libese/libapdu/
apdu.cpp 17 #include <apdu/apdu.h>
  /external/libese/apps/weaver/card/src/com/android/weaver/core/
WeaverCore.java 20 import javacard.framework.APDU;
66 public void process(APDU apdu) {
  /cts/tests/tests/secure_element/access_control/AccessControlApp1/src/android/omapi/accesscontrol1/cts/
AccessControlTest.java 106 /* Authorized APDU for AID_40 */
109 /* Unauthorized APDU for AID_40 */
116 /* Authorized APDU for AID_41 */
122 /* Unauthorized APDU for AID_41 */
218 for (byte[] apdu : AUTHORIZED_APDU_AID_40) {
219 testTransmitAPDU(AID_40, apdu);
225 for (byte[] apdu : UNAUTHORIZED_APDU_AID_40) {
226 testUnauthorisedAPDU(AID_40, apdu);
232 for (byte[] apdu : AUTHORIZED_APDU_AID_41) {
233 testTransmitAPDU(AID_41, apdu);
    [all...]
  /cts/tests/tests/secure_element/access_control/AccessControlApp2/src/android/omapi/accesscontrol2/cts/
AccessControlTest.java 105 /* Authorized APDU for AID_40 */
108 /* Unauthorized APDU for AID_40 */
115 /* Authorized APDU for AID_41 */
121 /* Unauthorized APDU for AID_41 */
217 for (byte[] apdu : AUTHORIZED_APDU_AID_40) {
218 testTransmitAPDU(AID_40, apdu);
224 for (byte[] apdu : UNAUTHORIZED_APDU_AID_40) {
225 testUnauthorisedAPDU(AID_40, apdu);
231 for (byte[] apdu : AUTHORIZED_APDU_AID_41) {
232 testTransmitAPDU(AID_41, apdu);
    [all...]
  /cts/tests/tests/secure_element/access_control/AccessControlApp3/src/android/omapi/accesscontrol3/cts/
AccessControlTest.java 106 /* Authorized APDU for AID_40 */
124 /* Authorized APDU for AID_41 */
130 /* Unauthorized APDU for AID_41 */
227 for (byte[] apdu : AUTHORIZED_APDU_AID_40) {
228 testTransmitAPDU(AID_40, apdu);
234 for (byte[] apdu : AUTHORIZED_APDU_AID_41) {
235 testTransmitAPDU(AID_41, apdu);
241 for (byte[] apdu : UNAUTHORIZED_APDU_AID_41) {
242 testUnauthorisedAPDU(AID_41, apdu);
301 private void testTransmitAPDU(byte[] aid, byte[] apdu) {
    [all...]
  /device/google/cuttlefish_common/guest/hals/ril/
cuttlefish_ril.cpp 2194 RIL_SIM_APDU* apdu = (RIL_SIM_APDU*)data; local
    [all...]
  /device/generic/goldfish/ril/
reference-ril.c 1998 RIL_SIM_APDU *apdu = (RIL_SIM_APDU *)data; local
    [all...]
  /device/google/cuttlefish_common/guest/hals/ril/libril/
ril_service.cpp 801 RIL_SIM_APDU apdu = {}; local
803 apdu.sessionid = message.sessionId;
804 apdu.cla = message.cla;
805 apdu.instruction = message.instruction;
806 apdu.p1 = message.p1;
807 apdu.p2 = message.p2;
808 apdu.p3 = message.p3;
810 if (!copyHidlStringToRil(&apdu.data, message.data, pRI)) {
814 CALL_ONREQUEST(request, &apdu, sizeof(apdu), pRI, slotId)
    [all...]

Completed in 1117 milliseconds