diff options
author | Shawn Willden <swillden@google.com> | 2017-09-07 23:59:08 -0600 |
---|---|---|
committer | Shawn Willden <swillden@google.com> | 2017-09-08 14:56:07 +0000 |
commit | 2f96c79a9c07b58bcfce0411e57894de55a52b6e (patch) | |
tree | 81a005c71fce4bb47a4c6b14b7b8d899d1f5b842 | |
parent | c5e8f36d92b74db04106eb368dd113493f739149 (diff) | |
download | security-2f96c79a9c07b58bcfce0411e57894de55a52b6e.tar.gz |
Fix keystore return code
Previous bug fix introduced this bug, which hides the begin return code
in some cases.
Bug: 65370298
Test: runtest --path cts/tests/tests/keystore/src/android/keystore/cts
Change-Id: I3f22688eec2a327f7f033d620e342953e7ab3879
(cherry picked from commit 855e348d71518a11bffa42e1a56d39aea1135ad9)
-rw-r--r-- | keystore/key_store_service.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/keystore/key_store_service.cpp b/keystore/key_store_service.cpp index 8a952572..c33a1d06 100644 --- a/keystore/key_store_service.cpp +++ b/keystore/key_store_service.cpp @@ -1163,7 +1163,9 @@ void KeyStoreService::begin(const sp<IBinder>& appToken, const String16& name, K // application should get an auth token using the handle before the // first call to update, which will fail if keystore hasn't received the // auth token. - result->resultCode = authResult; + if (result->resultCode == ErrorCode::OK) { + result->resultCode = authResult; + } // Other result fields were set in the begin operation's callback. } |