summaryrefslogtreecommitdiff
path: root/keystore/java/android/security/KeyStore.java
diff options
context:
space:
mode:
authorRob Barnes <robbarnes@google.com>2019-11-19 19:50:18 -0800
committerandroid-build-merger <android-build-merger@google.com>2019-11-19 19:50:18 -0800
commitc00713055b4dab9d999d4b768165f25d1403d8e3 (patch)
tree8eb24fd77602051fd0f43552de305022635b8c98 /keystore/java/android/security/KeyStore.java
parent9e9412faf0190ddcebb887f7e5192b0499caf489 (diff)
parent51e842e43c526bfed2baff6be4c17a49201235a2 (diff)
Merge "Allow for input_data on finish." am: 4a83b14ada am: 02c287a628
am: 51e842e43c Change-Id: I3ed4477e925a203ae8a7b1dde9744ade4a32e93c
Diffstat (limited to 'keystore/java/android/security/KeyStore.java')
-rw-r--r--keystore/java/android/security/KeyStore.java19
1 files changed, 15 insertions, 4 deletions
diff --git a/keystore/java/android/security/KeyStore.java b/keystore/java/android/security/KeyStore.java
index 3c4783590c16..9991f6d2d43f 100644
--- a/keystore/java/android/security/KeyStore.java
+++ b/keystore/java/android/security/KeyStore.java
@@ -922,15 +922,26 @@ public class KeyStore {
}
}
- public OperationResult finish(IBinder token, KeymasterArguments arguments, byte[] signature,
- byte[] entropy) {
+ /**
+ * Android KeyStore finish operation.
+ *
+ * @param token Authentication token.
+ * @param arguments Keymaster arguments
+ * @param input Optional additional input data.
+ * @param signature Optional signature to be verified.
+ * @param entropy Optional additional entropy
+ * @return OperationResult that will indicate success or error of the operation.
+ */
+ public OperationResult finish(IBinder token, KeymasterArguments arguments, byte[] input,
+ byte[] signature, byte[] entropy) {
OperationPromise promise = new OperationPromise();
try {
mBinder.asBinder().linkToDeath(promise, 0);
arguments = arguments != null ? arguments : new KeymasterArguments();
entropy = entropy != null ? entropy : new byte[0];
+ input = input != null ? input : new byte[0];
signature = signature != null ? signature : new byte[0];
- int errorCode = mBinder.finish(promise, token, arguments, signature, entropy);
+ int errorCode = mBinder.finish(promise, token, arguments, input, signature, entropy);
if (errorCode == NO_ERROR) {
return promise.getFuture().get();
} else {
@@ -948,7 +959,7 @@ public class KeyStore {
}
public OperationResult finish(IBinder token, KeymasterArguments arguments, byte[] signature) {
- return finish(token, arguments, signature, null);
+ return finish(token, arguments, null, signature, null);
}
private class KeystoreResultPromise