summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartijn Coenen <maco@google.com>2012-10-08 23:33:17 -0700
committerMartijn Coenen <maco@google.com>2012-10-08 23:37:51 -0700
commit5eb0e4ad34d354ddc903479ba99c4272e19b1375 (patch)
tree18b345042efe6207777ea0c59ed16999854be5e1
parentb1ba0d2a520ee2c5543a2ae9e017e1ef424f9265 (diff)
downloadpackages_apps_nfc-5eb0e4ad34d354ddc903479ba99c4272e19b1375.zip
packages_apps_nfc-5eb0e4ad34d354ddc903479ba99c4272e19b1375.tar.gz
packages_apps_nfc-5eb0e4ad34d354ddc903479ba99c4272e19b1375.tar.bz2
Set EE wipe APDUs for NCI stack.
The wipe APDUs are used to lock the Secure Element state whenever an app using the SE is deinstalled, when all userdata is removed, or on first boot of the device. This sequence is identical for both the NXP and NCI implementations. Bug: 7312675 Change-Id: I746580985bc986ac159e0d294823f0dbe6d3404f
-rwxr-xr-xnci/src/com/android/nfc/dhimpl/NativeNfcManager.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/nci/src/com/android/nfc/dhimpl/NativeNfcManager.java b/nci/src/com/android/nfc/dhimpl/NativeNfcManager.java
index dde0c08..cc485a5 100755
--- a/nci/src/com/android/nfc/dhimpl/NativeNfcManager.java
+++ b/nci/src/com/android/nfc/dhimpl/NativeNfcManager.java
@@ -40,6 +40,18 @@ public class NativeNfcManager implements DeviceHost {
static final String DRIVER_NAME = "android-nci";
+ private static final byte[][] EE_WIPE_APDUS = {
+ {(byte)0x00, (byte)0xa4, (byte)0x04, (byte)0x00, (byte)0x00},
+ {(byte)0x00, (byte)0xa4, (byte)0x04, (byte)0x00, (byte)0x07, (byte)0xa0, (byte)0x00,
+ (byte)0x00, (byte)0x04, (byte)0x76, (byte)0x20, (byte)0x10, (byte)0x00},
+ {(byte)0x80, (byte)0xe2, (byte)0x01, (byte)0x03, (byte)0x00},
+ {(byte)0x00, (byte)0xa4, (byte)0x04, (byte)0x00, (byte)0x00},
+ {(byte)0x00, (byte)0xa4, (byte)0x04, (byte)0x00, (byte)0x07, (byte)0xa0, (byte)0x00,
+ (byte)0x00, (byte)0x04, (byte)0x76, (byte)0x30, (byte)0x30, (byte)0x00},
+ {(byte)0x80, (byte)0xb4, (byte)0x00, (byte)0x00, (byte)0x00},
+ {(byte)0x00, (byte)0xa4, (byte)0x04, (byte)0x00, (byte)0x00},
+ };
+
static {
System.loadLibrary("nfc_nci_jni");
}
@@ -281,7 +293,7 @@ public class NativeNfcManager implements DeviceHost {
@Override
public byte[][] getWipeApdus() {
- return null;
+ return EE_WIPE_APDUS;
}
@Override