• Home
  • Raw
  • Download

Lines Matching full:context

66 use anyhow::{anyhow, Context, Result};
97 .context(ks_err!("KeystoreSecurityLevel::new_native_binder."))?; in new_native_binder()
170 let creation_date = DateTime::now().context(ks_err!("Trying to make creation time."))?; in store_new_key()
194 .context(ks_err!("Failed to handle super encryption."))?; in store_new_key()
210 .context(ks_err!())?; in store_new_key()
217 .context(ks_err!())?, in store_new_key()
244 .context(ks_err!("checking use permission for Domain::BLOB."))?; in create_operation()
247 .context(ks_err!("checking forced permission for Domain::BLOB."))?; in create_operation()
253 return Err(Error::sys()).context(ks_err!( in create_operation()
287 .context(ks_err!("Failed to load key blob."))?; in create_operation()
290 key_entry.take_key_blob_info().ok_or_else(Error::sys).context(ks_err!( in create_operation()
307 .context(ks_err!("No operation purpose specified.")), in create_operation()
311 .context(ks_err!("Malformed KeyParameter.")), in create_operation()
328 .context(ks_err!())?; in create_operation()
334 .context(ks_err!("Failed to handle super encryption."))?; in create_operation()
374 .context(ks_err!("Failed to begin operation."))?; in create_operation()
389 return Err(Error::sys()).context(ks_err!( in create_operation()
400 .context(ks_err!("Failed to create IKeystoreOperation."))?; in create_operation()
426 return Err(Error::Rc(ResponseCode::INVALID_ARGUMENT)).context(ks_err!( in add_required_parameters()
443 .context(ks_err!( in add_required_parameters()
449 .context(ks_err!( in add_required_parameters()
470 .context(ks_err!("Attestation ID retrieval failed.")); in add_required_parameters()
473 return Err(anyhow!(e)).context(ks_err!("Attestation ID retrieval error.")) in add_required_parameters()
482 return Err(Error::perm()).context(ks_err!( in add_required_parameters()
489 .context(ks_err!("Call to had_factory_reset_since_id_rotation failed."))? in add_required_parameters()
501 check_device_attestation_permissions().context(ks_err!( in add_required_parameters()
539 .context(ks_err!("Alias must be specified")); in generate_key()
555 check_key_permission(KeyPerm::Rebind, &key, &None).context(ks_err!())?; in generate_key()
570 .context(ks_err!("Trying to get an attestation key"))?, in generate_key()
574 .context(ks_err!("Trying to get aaid."))?; in generate_key()
606 .context(ks_err!( in generate_key()
630 .context(ks_err!( in generate_key()
674 .context(ks_err!( in generate_key()
680 .context(ks_err!())?; in generate_key()
683 self.store_new_key(key, creation_result, user_id, Some(flags)).context(ks_err!()) in generate_key()
696 .context(ks_err!("Alias must be specified")); in import_key()
711 check_key_permission(KeyPerm::Rebind, &key, &None).context(ks_err!("In import_key."))?; in import_key()
715 .context(ks_err!("Trying to get aaid."))?; in import_key()
721 .context(ks_err!("No KeyParameter 'Algorithm'.")) in import_key()
729 .context(ks_err!("Unknown Algorithm {:?}.", v)), in import_key()
731 .context(ks_err!())?; in import_key()
739 .context(ks_err!("Trying to call importKey"))?; in import_key()
742 self.store_new_key(key, creation_result, user_id, Some(flags)).context(ks_err!()) in import_key()
759 return Err(error::Error::Km(ErrorCode::INVALID_ARGUMENT)).context(ks_err!( in import_wrapped_key()
768 .context(ks_err!("Import wrapped key not supported for self managed blobs.")); in import_wrapped_key()
791 check_key_permission(KeyPerm::Rebind, &key, &None).context(ks_err!())?; in import_wrapped_key()
807 .context(ks_err!("Failed to load wrapping key."))?; in import_wrapped_key()
810 wrapping_key_entry.take_key_blob_info().ok_or_else(error::Error::sys).context( in import_wrapped_key()
818 .context(ks_err!("Failed to handle super encryption for wrapping key."))?; in import_wrapped_key()
863 .context(ks_err!())?; in import_wrapped_key()
866 .context(ks_err!("Trying to store the new key.")) in import_wrapped_key()
877 .context(ks_err!("Failed to handle super encryption."))?; in store_upgraded_keyblob()
893 .context(ks_err!("Failed to insert upgraded blob into the database.")) in store_upgraded_keyblob()
918 .context(ks_err!("store_upgraded_keyblob failed")) in upgrade_keyblob_if_required_with()
924 .context(ks_err!("upgrade_keyblob_if_required_with(key_id={:?})", key_id_guard))?; in upgrade_keyblob_if_required_with()
932 .context(ks_err!("store_upgraded_keyblob failed in forced reencrypt"))?; in upgrade_keyblob_if_required_with()
948 .context(ks_err!("Trying to get IRPC name."))?; in upgrade_rkpd_keyblob_if_required_with()
958 Err(wrapped_rkpd_error_to_ks_error(&e)).context(format!("{e:?}")) in upgrade_rkpd_keyblob_if_required_with()
964 .context(ks_err!( in upgrade_rkpd_keyblob_if_required_with()
976 .context(ks_err!("Key must be of Domain::BLOB")); in convert_storage_key_to_ephemeral()
982 .context(ks_err!("No key blob specified"))?; in convert_storage_key_to_ephemeral()
986 .context(ks_err!("Check permission"))?; in convert_storage_key_to_ephemeral()
1005 .context(ks_err!("Failed to upgrade key blob."))?; in convert_storage_key_to_ephemeral()
1013 .context(ks_err!("Failed to retrieve ephemeral key (after upgrade)."))?; in convert_storage_key_to_ephemeral()
1019 Err(e) => Err(e).context(ks_err!("Failed to retrieve ephemeral key.")), in convert_storage_key_to_ephemeral()
1026 .context(ks_err!("delete_key: Key must be of Domain::BLOB")); in delete_key()
1033 .context(ks_err!("delete_key: No key blob specified"))?; in delete_key()
1036 .context(ks_err!("delete_key: Checking delete permissions"))?; in delete_key()
1042 map_km_error(km_dev.deleteKey(key_blob)).context(ks_err!("keymint device deleteKey")) in delete_key()