am 0189c6ef: am dd783301: Merge "Add optional additional entropy to finish"

* commit '0189c6efed4f36db0661d827d998a49bc34ece12':
  Add optional additional entropy to finish
This commit is contained in:
Chad Brubaker
2015-05-29 21:44:34 +00:00
committed by Android Git Automerger
2 changed files with 9 additions and 3 deletions

View File

@@ -67,7 +67,8 @@ interface IKeystoreService {
OperationResult begin(IBinder appToken, String alias, int purpose, boolean pruneable,
in KeymasterArguments params, in byte[] entropy, out KeymasterArguments operationParams);
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);

View File

@@ -514,15 +514,20 @@ public class KeyStore {
}
}
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);