Fix passing wrong set of parameters in keystore

In keystore update, the wrong set of parameters was passed
to keymaster, thus ommiting the auth token. This broke
authenticated key operations.

Test: FingerprintDialog.apk
Bug: 34692128
Change-Id: I1db8df962ccc5c3df948a9ac3e3b8ada1f48e84e
This commit is contained in:
Janis Danisevskis 2017-01-25 15:43:01 +00:00
parent a9452d92ca
commit b0245eef46

View file

@ -1095,7 +1095,8 @@ void KeyStoreService::update(const sp<IBinder>& token, const hidl_vec<KeyParamet
result->data = output;
};
KeyStoreServiceReturnCode rc = KS_HANDLE_HIDL_ERROR(dev->update(handle, params, data, hidlCb));
KeyStoreServiceReturnCode rc = KS_HANDLE_HIDL_ERROR(dev->update(handle, opParams.hidl_data(),
data, hidlCb));
// just a reminder: on success result->resultCode was set in the callback. So we only overwrite
// it if there was a communication error indicated by the ErrorCode.
if (!rc.isOk()) {