KeyMint HAL: pass auth token on updateAad

Bug: 230716629
Test: CtsVerifier with aosp/2077898 included
Change-Id: I2ba275718ef7ce6cc701ac2eb4a122639d7a4351
This commit is contained in:
David Drysdale 2022-05-18 11:12:01 +01:00
parent 0ddcf6d2f1
commit 37a8ac1d45

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);