summaryrefslogtreecommitdiffstats
path: root/keystore/java
diff options
context:
space:
mode:
authorChad Brubaker <cbrubaker@google.com>2015-03-21 22:46:43 -0700
committerChad Brubaker <cbrubaker@google.com>2015-03-21 23:15:20 -0700
commit5e73c0eec2bc77222a5a87fb2a135d8303836411 (patch)
tree7985bec0fca7c1b717aad7c0d5e46d6d39f1ba2e /keystore/java
parent38fcaf4037a50225b931551a48c898c7b0bb4db2 (diff)
downloadframeworks_base-5e73c0eec2bc77222a5a87fb2a135d8303836411.zip
frameworks_base-5e73c0eec2bc77222a5a87fb2a135d8303836411.tar.gz
frameworks_base-5e73c0eec2bc77222a5a87fb2a135d8303836411.tar.bz2
Make application/client id an object
Having it as a raw byte[] caused issues in keystore because keymaster handles a null blob differently than a blob with null contents. Make this explicit in the API. Change-Id: Ifcf550f438608b8f09fc589d00d06fffa6ee463b
Diffstat (limited to 'keystore/java')
-rw-r--r--keystore/java/android/security/KeyStore.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/keystore/java/android/security/KeyStore.java b/keystore/java/android/security/KeyStore.java
index bfbf028..957e3c1 100644
--- a/keystore/java/android/security/KeyStore.java
+++ b/keystore/java/android/security/KeyStore.java
@@ -25,6 +25,7 @@ import android.os.ServiceManager;
import android.security.keymaster.ExportResult;
import android.security.keymaster.KeyCharacteristics;
import android.security.keymaster.KeymasterArguments;
+import android.security.keymaster.KeymasterBlob;
import android.security.keymaster.OperationResult;
import android.util.Log;
@@ -403,7 +404,7 @@ public class KeyStore {
return generateKey(alias, args, UID_SELF, flags, outCharacteristics);
}
- public int getKeyCharacteristics(String alias, byte[] clientId, byte[] appId,
+ public int getKeyCharacteristics(String alias, KeymasterBlob clientId, KeymasterBlob appId,
KeyCharacteristics outCharacteristics) {
try {
return mBinder.getKeyCharacteristics(alias, clientId, appId, outCharacteristics);
@@ -429,7 +430,8 @@ public class KeyStore {
return importKey(alias, args, format, keyData, UID_SELF, flags, outCharacteristics);
}
- public ExportResult exportKey(String alias, int format, byte[] clientId, byte[] appId) {
+ public ExportResult exportKey(String alias, int format, KeymasterBlob clientId,
+ KeymasterBlob appId) {
try {
return mBinder.exportKey(alias, format, clientId, appId);
} catch (RemoteException e) {