Lines Matching refs:context_

135     : context_(context), operation_table_(new (std::nothrow) OperationTable(operation_table_size)),  in AndroidKeymaster()
141 : context_(move(other.context_)), operation_table_(move(other.operation_table_)) {} in AndroidKeymaster()
170 rsp.km_version = context_->GetKmVersion(); in GetVersion2()
190 const keymaster_algorithm_t* algorithms = context_->GetSupportedAlgorithms(&algorithm_count); in SupportedAlgorithms()
217 GetSupported(*context_, request.algorithm, request.purpose, in SupportedBlockModes()
223 GetSupported(*context_, request.algorithm, request.purpose, in SupportedPaddingModes()
229 GetSupported(*context_, request.algorithm, request.purpose, &OperationFactory::SupportedDigests, in SupportedDigests()
235 if (response == nullptr || !check_supported(*context_, request.algorithm, response)) return; in SupportedImportFormats()
239 context_->GetKeyFactory(request.algorithm)->SupportedImportFormats(&count); in SupportedImportFormats()
245 if (response == nullptr || !check_supported(*context_, request.algorithm, response)) return; in SupportedExportFormats()
249 context_->GetKeyFactory(request.algorithm)->SupportedExportFormats(&count); in SupportedExportFormats()
255 KeymasterEnforcement* policy = context_->enforcement_policy(); in GetHmacSharingParameters()
268 KeymasterEnforcement* policy = context_->enforcement_policy(); in ComputeSharedHmac()
280 KeymasterEnforcement* policy = context_->enforcement_policy(); in VerifyAuthorization()
292 KeymasterEnforcement* policy = context_->enforcement_policy(); in GenerateTimestampToken()
303 response->error = context_->AddRngEntropy(request.random_data.peek_read(), in AddRngEntropy()
324 get_key_factory(request.key_description, *context_, &response->error); in GenerateKey()
349 auto rem_prov_ctx = context_->GetRemoteProvisioningContext(); in GenerateRkpKey()
410 auto rem_prov_ctx = context_->GetRemoteProvisioningContext(); in GenerateCsr()
527 context_->ParseKeyBlob(KeymasterKeyBlob(request.key_blob), request.additional_params, &key); in GetKeyCharacteristics()
534 response->error = CheckVersionInfo(response->enforced, response->unenforced, *context_); in GetKeyCharacteristics()
564 if (context_->enforcement_policy()) { in BeginOperation()
567 if (!context_->enforcement_policy()->CreateKeyId(request.key_blob, &key_id)) return; in BeginOperation()
569 response->error = context_->enforcement_policy()->AuthorizeOperation( in BeginOperation()
608 if (context_->enforcement_policy()) { in UpdateOperation()
609 response->error = context_->enforcement_policy()->AuthorizeOperation( in UpdateOperation()
652 if (context_->enforcement_policy()) { in FinishOperation()
653 response->error = context_->enforcement_policy()->AuthorizeOperation( in FinishOperation()
671 context_->secure_key_storage() != nullptr) { in FinishOperation()
672 response->error = context_->secure_key_storage()->DeleteKey(operation->key_id()); in FinishOperation()
690 keymaster_error_t verification_result = context_->CheckConfirmationToken( in FinishOperation()
723 context_->ParseKeyBlob(KeymasterKeyBlob(request.key_blob), request.additional_params, &key); in ExportKey()
748 context_->GenerateAttestation(*key, request.attest_params, {} /* attestation_signing_key */, in AttestKey()
756 response->error = context_->UpgradeKeyBlob(KeymasterKeyBlob(request.key_blob), in UpgradeKey()
766 get_key_factory(request.key_description, *context_, &response->error); in ImportKey()
769 if (context_->enforcement_policy() && in ImportKey()
771 !context_->enforcement_policy()->in_early_boot()) { in ImportKey()
797 response->error = context_->DeleteKey(KeymasterKeyBlob(request.key_blob)); in DeleteKey()
802 response->error = context_->DeleteAllKeys(); in DeleteAllKeys()
807 response->error = context_->SetSystemVersion(request.os_version, request.os_patchlevel); in Configure()
813 rsp.error = context_->SetVendorPatchlevel(request.vendor_patchlevel); in ConfigureVendorPatchlevel()
820 rsp.error = context_->SetBootPatchlevel(request.boot_patchlevel); in ConfigureBootPatchlevel()
835 *error = context_->ParseKeyBlob(KeymasterKeyBlob(key_blob), additional_params, &key); in LoadKey()
838 *error = CheckVersionInfo(key->hw_enforced(), key->sw_enforced(), *context_); in LoadKey()
853 context_->UnwrapKey(request.wrapped_key, request.wrapping_key, request.additional_params, in ImportWrappedKey()
874 if (context_->GetKmVersion() >= KmVersion::KEYMINT_1) { in ImportWrappedKey()
880 const KeyFactory* factory = get_key_factory(key_description, *context_, &response->error); in ImportWrappedKey()
895 if (context_->enforcement_policy()) { in EarlyBootEnded()
896 context_->enforcement_policy()->early_boot_ended(); in EarlyBootEnded()
902 if (context_->enforcement_policy()) { in DeviceLocked()
903 context_->enforcement_policy()->device_locked(request.passwordOnly); in DeviceLocked()