am 43e77bf6: Merge "Add optional additional entropy to finish" into mnc-dev
* commit '43e77bf6209bd964bd9cc568b5f37b26401956b3':
Add optional additional entropy to finish
diff --git a/core/java/android/security/IKeystoreService.aidl b/core/java/android/security/IKeystoreService.aidl
index 2097d5a..409542d 100644
--- a/core/java/android/security/IKeystoreService.aidl
+++ b/core/java/android/security/IKeystoreService.aidl
@@ -67,7 +67,8 @@
OperationResult begin(IBinder appToken, String alias, int purpose, boolean pruneable,
in KeymasterArguments params, in byte[] entropy);
OperationResult update(IBinder token, in KeymasterArguments params, in byte[] input);
- OperationResult finish(IBinder token, in KeymasterArguments params, in byte[] signature);
+ OperationResult finish(IBinder token, in KeymasterArguments params, in byte[] signature,
+ in byte[] entropy);
int abort(IBinder handle);
boolean isOperationAuthorized(IBinder token);
int addAuthToken(in byte[] authToken);
diff --git a/keystore/java/android/security/KeyStore.java b/keystore/java/android/security/KeyStore.java
index 37ed723..1a05104 100644
--- a/keystore/java/android/security/KeyStore.java
+++ b/keystore/java/android/security/KeyStore.java
@@ -514,15 +514,20 @@
}
}
- public OperationResult finish(IBinder token, KeymasterArguments arguments, byte[] signature) {
+ public OperationResult finish(IBinder token, KeymasterArguments arguments, byte[] signature,
+ byte[] entropy) {
try {
- return mBinder.finish(token, arguments, signature);
+ return mBinder.finish(token, arguments, signature, entropy);
} catch (RemoteException e) {
Log.w(TAG, "Cannot connect to keystore", e);
return null;
}
}
+ public OperationResult finish(IBinder token, KeymasterArguments arguments, byte[] signature) {
+ return finish(token, arguments, signature, null);
+ }
+
public int abort(IBinder token) {
try {
return mBinder.abort(token);