Lines Matching refs:op

340     auto op = operationMap_.removeOperation(token, false /* wasOpSuccessful */);  in abort()  local
341 if (op) { in abort()
342 keyStore_->getAuthTokenTable().MarkCompleted(op->handle); in abort()
343 return KS_HANDLE_HIDL_ERROR(keymasterDevice_, keymasterDevice_->abort(op->handle)); in abort()
552 KeymasterWorker::getOperationAuthTokenIfNeeded(std::shared_ptr<Operation> op) { in getOperationAuthTokenIfNeeded() argument
553 if (!op) return ErrorCode::INVALID_OPERATION_HANDLE; in getOperationAuthTokenIfNeeded()
555 if (op->authTokenFuture.valid()) { in getOperationAuthTokenIfNeeded()
557 op->authTokenFuture.wait(); in getOperationAuthTokenIfNeeded()
558 auto rc = op->authTokenFuture.get(); in getOperationAuthTokenIfNeeded()
562 op->authTokenFuture = {}; in getOperationAuthTokenIfNeeded()
563 } else if (!op->hasAuthToken()) { in getOperationAuthTokenIfNeeded()
566 std::tie(rc, found) = getAuthToken(op->characteristics, op->handle, op->purpose); in getOperationAuthTokenIfNeeded()
568 op->authToken = std::move(found); in getOperationAuthTokenIfNeeded()
595 auto op = operationMap_.getOperation(token); in update() local
596 if (!op) { in update()
602 keyStore_->getAuthTokenTable().MarkCompleted(op->handle); in update()
603 KS_HANDLE_HIDL_ERROR(keymasterDevice_, keymasterDevice_->abort(op->handle)); in update()
606 rc = getOperationAuthTokenIfNeeded(op); in update()
610 AuthorizationSet key_auths(op->characteristics.hardwareEnforced); in update()
611 key_auths.append(op->characteristics.softwareEnforced.begin(), in update()
612 op->characteristics.softwareEnforced.end()); in update()
614 rc = keyStore_->getEnforcementPolicy().AuthorizeOperation(op->purpose, op->keyid, key_auths, in update()
615 params, op->authToken, op->handle, in update()
623 op->device->logIfKeymasterVendorError(ret); in update()
632 rc = KS_HANDLE_HIDL_ERROR(op->device, in update()
633 op->device->update(op->handle, params.hidl_data(), data, in update()
634 op->authToken, op->verificationToken, hidlCb)); in update()
673 auto op = operationMap_.getOperation(token); in finish() local
674 if (!op) { in finish()
681 keyStore_->getAuthTokenTable().MarkCompleted(op->handle); in finish()
683 KS_HANDLE_HIDL_ERROR(keymasterDevice_, keymasterDevice_->abort(op->handle)); in finish()
690 rc = getOperationAuthTokenIfNeeded(op); in finish()
694 AuthorizationSet key_auths(op->characteristics.hardwareEnforced); in finish()
695 key_auths.append(op->characteristics.softwareEnforced.begin(), in finish()
696 op->characteristics.softwareEnforced.end()); in finish()
708 rc = keyStore_->getEnforcementPolicy().AuthorizeOperation(op->purpose, op->keyid, key_auths, in finish()
709 params, op->authToken, op->handle, in finish()
714 rc = KS_HANDLE_HIDL_ERROR(op->device, op->device->addRngEntropy(entropy)); in finish()
723 op->device->logIfKeymasterVendorError(ret); in finish()
731 rc = KS_HANDLE_HIDL_ERROR(op->device, op->device->finish(op->handle, params.hidl_data(), in finish()
732 input, signature, op->authToken, in finish()
733 op->verificationToken, hidlCb)); in finish()