summaryrefslogtreecommitdiff
path: root/keystore/java/android/security/KeyStore.java
diff options
context:
space:
mode:
authorRob Barnes <robbarnes@google.com>2019-11-19 15:50:20 -0800
committerandroid-build-merger <android-build-merger@google.com>2019-11-19 15:50:20 -0800
commit51e842e43c526bfed2baff6be4c17a49201235a2 (patch)
tree9f07877d85876c49c72e4e6084b5ea08cb5ba3b3 /keystore/java/android/security/KeyStore.java
parent07c1280421dc715b4f20cf76328c7735d7872986 (diff)
parent02c287a6286dc707c264368b8f10cedc116e12a6 (diff)
Merge "Allow for input_data on finish." am: 4a83b14ada
am: 02c287a628 Change-Id: Ibaf29ef631ff55e699c03c685d2298ade8c84afb
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 646aa13664c4..b6f525042713 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