Merge "KeyMint HAL: pass auth token on updateAad"

This commit is contained in:
David Drysdale 2022-05-19 05:50:51 +00:00 committed by Gerrit Code Review
commit 5b8dfacf5b

View file

@ -52,11 +52,15 @@ TrustyKeyMintOperation::~TrustyKeyMintOperation() {
}
ScopedAStatus TrustyKeyMintOperation::updateAad(
const vector<uint8_t>& input, const optional<HardwareAuthToken>& /* authToken */,
const vector<uint8_t>& input, const optional<HardwareAuthToken>& authToken,
const optional<TimeStampToken>& /* timestampToken */) {
UpdateOperationRequest request(impl_->message_version());
request.op_handle = opHandle_;
request.additional_params.push_back(TAG_ASSOCIATED_DATA, input.data(), input.size());
if (authToken) {
auto tokenAsVec(authToken2AidlVec(*authToken));
request.additional_params.push_back(TAG_AUTH_TOKEN, tokenAsVec.data(), tokenAsVec.size());
}
UpdateOperationResponse response(impl_->message_version());
impl_->UpdateOperation(request, &response);