• Home
  • Raw
  • Download

Lines Matching refs:Ok

148             Ok(())  in load_from_db()
152 Ok(Self { data: metadata }) in load_from_db()
169 Ok(()) in store_in_db()
223 Ok(()) in load_from_db()
227 Ok(Self { data: metadata }) in load_from_db()
244 Ok(()) in store_in_db()
263 Ok(ToSqlOutput::Owned(Value::Integer(match self { in to_sql()
274 0 => Ok(KeyType::Client), in column_result()
275 1 => Ok(KeyType::Super), in column_result()
276 2 => Ok(KeyType::Attestation), in column_result()
316 Ok(Self(arr)) in column_result()
341 Self::Password => Ok(ToSqlOutput::Owned(Value::Null)), in to_sql()
350 ValueRef::Null => Ok(Self::Password), in column_result()
351 _ => Ok(Self::KeyId(i64::column_result(value)?)), in column_result()
382 Ok(Self(SystemTime::now().duration_since(SystemTime::UNIX_EPOCH)?.as_millis().try_into()?)) in now()
403 Ok(ToSqlOutput::Owned(Value::Integer(self.0))) in to_sql()
409 Ok(Self(i64::column_result(value)?)) in column_result()
427 Ok(if now_epoch > then_epoch { in try_into()
447 Ok(Self(t.duration_since(SystemTime::UNIX_EPOCH)?.as_millis().try_into()?)) in try_from()
466 Self::Existing => Ok(ToSqlOutput::Owned(Value::Integer(0))), in to_sql()
467 Self::Live => Ok(ToSqlOutput::Owned(Value::Integer(1))), in to_sql()
468 Self::Unreferenced => Ok(ToSqlOutput::Owned(Value::Integer(2))), in to_sql()
476 0 => Ok(KeyLifeCycle::Existing), in column_result()
477 1 => Ok(KeyLifeCycle::Live), in column_result()
478 2 => Ok(KeyLifeCycle::Unreferenced), in column_result()
702 Ok(Self(u32::column_result(value)?)) in column_result()
771 Ok(ToSqlOutput::Owned(Value::Integer(self.0))) in to_sql()
777 Ok(Self(i64::column_result(value)?)) in column_result()
854 Ok(db) in new()
874 Ok(1) in from_0_to_1()
984 Ok(()) in init_tables()
996 Ok(persistent_path_str) in make_persistent_path()
1022 Ok(conn) in make_connection()
1032 tx.query_row(query, params, |row| Ok((row.get(0)?, row.get(1)?))) in do_table_size_query()
1038 Ok(StorageStats { storage_type, size: total, unused_size: unused }) in do_table_size_query()
1106 Ok(StorageStats { in get_storage_stat()
1172 |row| Ok((row.get(0)?, row.get(1)?)), in handle_next_superseded_blobs()
1183 Ok((blob_id, blob, BlobMetaData::load_from_db(blob_id, tx)?)) in handle_next_superseded_blobs()
1188 return Ok(result).no_gc(); in handle_next_superseded_blobs()
1207 Ok(vec![]).no_gc() in handle_next_superseded_blobs()
1249 Ok(_) => Ok(true), in key_exists()
1251 Some(KsError::Rc(ResponseCode::KEY_NOT_FOUND)) => Ok(false), in key_exists()
1325 Ok(id) => { in load_super_key()
1328 Ok(Some((KEY_ID_LOCK.get(id), key_entry))) in load_super_key()
1331 Some(KsError::Rc(ResponseCode::KEY_NOT_FOUND)) => Ok(None), in load_super_key()
1375 Ok(match row { in get_or_create_key_with()
1430 Ok((KEY_ID_LOCK.get(id), entry)).no_gc() in get_or_create_key_with()
1450 Ok(result) in with_transaction()
1452 Ok(result) => break Ok(result), in with_transaction()
1516 Ok(KEY_ID_LOCK.get( in create_key_entry_internal()
1573 Ok(()).no_gc() in create_attestation_key_entry()
1659 Ok(()) in set_blob_internal()
1695 Ok(()) in insert_keyparameter_internal()
1744 row.map_or_else(|| Err(KsError::Rc(ResponseCode::KEY_NOT_FOUND)), Ok)? in store_signed_attestation_certificate_chain()
1775 Ok(()).no_gc() in store_signed_attestation_certificate_chain()
1840 Ok(()).no_gc() in assign_attestation_key()
1884 Ok(rows).no_gc() in fetch_unsigned_attestation_keys()
1908 |row| Ok((row.get(0)?, row.get(1)?)), in delete_expired_attestation_keys()
1921 Ok(num_deleted).do_gc(num_deleted != 0) in delete_expired_attestation_keys()
1950 Ok(num_deleted).do_gc(num_deleted != 0) in delete_all_attestation_keys()
1998 Ok((row.get(0)?, row.get(1)?)) in get_attestation_pool_status()
2017 Ok(AttestationPoolStatus { expiring, unassigned, attested, total }).no_gc() in get_attestation_pool_status()
2062 |row| Ok((row.get(0)?, row.get(1)?)), in retrieve_attestation_key_and_cert_chain()
2067 return Ok(None).no_gc(); in retrieve_attestation_key_and_cert_chain()
2095 Ok(Some(CertificateChain { in retrieve_attestation_key_and_cert_chain()
2157 Ok(updated != 0) in rebind_alias()
2197 |_| Ok(()), in migrate_key_namespace()
2220 Ok(()).no_gc() in migrate_key_namespace()
2284 Ok(key_id).do_gc(need_gc) in store_new_key()
2334 Ok(key_id).do_gc(need_gc) in store_new_certificate()
2346 .map_or_else(|| Err(KsError::sys()), Ok) in load_key_entry_id()
2363 row.map_or_else(|| Err(KsError::Rc(ResponseCode::KEY_NOT_FOUND)), Ok)? in load_key_entry_id()
2404 Ok((key_id, access_key, None)) in load_access_tuple()
2423 row.map_or_else(|| Err(KsError::Rc(ResponseCode::KEY_NOT_FOUND)), Ok)?; in load_access_tuple()
2424 Ok(( in load_access_tuple()
2430 Ok((key_id, key.clone(), Some(access_vector.into()))) in load_access_tuple()
2450 row.map_or_else(|| Err(KsError::Rc(ResponseCode::KEY_NOT_FOUND)), Ok)?; in load_access_tuple()
2451 Ok(( in load_access_tuple()
2486 Ok((key_id, access_key, access_vector)) in load_access_tuple()
2535 Ok(()) in load_blob_components()
2539 let blob_info = key_blob.map_or::<Result<_>, _>(Ok(None), |(blob_id, blob)| { in load_blob_components()
2540 Ok(Some(( in load_blob_components()
2547 Ok((has_km_blob, blob_info, cert_blob, cert_chain_blob)) in load_blob_components()
2569 Ok(()) in load_key_parameters()
2573 Ok(parameters) in load_key_parameters()
2610 _ => Ok(()).no_gc(), in check_and_update_key_usage_count()
2639 Ok(result) => break Ok(result), in load_key_entry()
2733 Ok((key_id_guard, key_entry)) in load_key_entry_internal()
2746 Ok(updated != 0) in mark_unreferenced()
2829 Ok(()).need_gc() in unbind_keys_for_namespace()
2870 Result::<()>::Ok(()) in cleanup_unreferenced()
2927 Ok(()) in unbind_keys_for_user()
2948 Ok(()).do_gc(notify_gc) in unbind_keys_for_user()
2970 Ok(KeyEntry { in load_key_components()
3017 Ok(()) in list()
3020 Ok(descriptors).no_gc() in list()
3091 Ok(KeyDescriptor { domain: Domain::GRANT, nspace: grant_id, alias: None, blob: None }) in grant()
3126 Ok(()).no_gc() in ungrant()
3151 _ => return Ok(newid), in insert_with_retry()
3196 Ok(KeyDescriptor { in load_key_descriptor()
3250 Ok(db) in new_test_db()
3299 Ok(()) in datetime()
3332 Ok(()) in test_tables()
3384 Ok(()) in test_auth_token_table_invariant()
3405 Ok(()) in test_persistence_for_files()
3438 Ok(()) in test_create_key_entry()
3456 Ok(()) in test_add_unsigned_key()
3474 Ok(()) in test_store_signed_attestation_certificate_chain()
3530 Ok(()) in test_get_attestation_pool_status()
3537 let mut db = new_test_db_with_gc(temp_dir.path(), |_, _| Ok(()))?; in test_remove_expired_certs()
3594 Ok(()) in test_remove_expired_certs()
3611 Ok(()) in test_delete_all_attestation_keys()
3687 Ok(()) in test_rebind_alias()
3729 Ok(()) in test_grant_ungrant()
3765 Ok(()) in test_grant_ungrant()
3795 Ok(()) in test_grant_ungrant()
3817 Ok(( in test_grant_ungrant()
3836 db.ungrant(&app_key, CALLER_UID, GRANTEE_UID, |_| Ok(()))?; in test_grant_ungrant()
3837 db.ungrant(&selinux_key, CALLER_UID, GRANTEE_UID, |_| Ok(()))?; in test_grant_ungrant()
3839 Ok(()) in test_grant_ungrant()
3868 Ok(((row.get(0)?, row.get(1)?, row.get(2)?), row.get(3)?)) in test_set_blob()
3887 Ok(()) in test_set_blob()
3909 |_k, _av| Ok(()), in test_insert_and_load_full_keyentry_domain_app()
3923 |_, _| Ok(()), in test_insert_and_load_full_keyentry_domain_app()
3939 |_k, _av| Ok(()), in test_insert_and_load_full_keyentry_domain_app()
3946 Ok(()) in test_insert_and_load_full_keyentry_domain_app()
3977 |_k, _av| Ok(()), in test_insert_and_load_certificate_entry_domain_app()
3994 |_, _| Ok(()), in test_insert_and_load_certificate_entry_domain_app()
4010 |_k, _av| Ok(()), in test_insert_and_load_certificate_entry_domain_app()
4017 Ok(()) in test_insert_and_load_certificate_entry_domain_app()
4037 |_k, _av| Ok(()), in test_insert_and_load_full_keyentry_domain_selinux()
4051 |_, _| Ok(()), in test_insert_and_load_full_keyentry_domain_selinux()
4067 |_k, _av| Ok(()), in test_insert_and_load_full_keyentry_domain_selinux()
4074 Ok(()) in test_insert_and_load_full_keyentry_domain_selinux()
4089 |_k, _av| Ok(()), in test_insert_and_load_full_keyentry_domain_key_id()
4099 |_, _| Ok(()), in test_insert_and_load_full_keyentry_domain_key_id()
4110 |_k, _av| Ok(()), in test_insert_and_load_full_keyentry_domain_key_id()
4117 Ok(()) in test_insert_and_load_full_keyentry_domain_key_id()
4134 |_k, _av| Ok(()), in test_check_and_update_key_usage_count_with_limited_use_key()
4140 Ok(()) in test_check_and_update_key_usage_count_with_limited_use_key()
4165 Ok(()) in test_check_and_update_key_usage_count_with_exhausted_limited_use_key()
4186 |_k, _av| Ok(()), in test_insert_and_load_full_keyentry_from_grant()
4196 Ok(()) in test_insert_and_load_full_keyentry_from_grant()
4202 db.unbind_key(&granted_key, KeyType::Client, 2, |_, _| Ok(())).unwrap(); in test_insert_and_load_full_keyentry_from_grant()
4211 |_k, _av| Ok(()), in test_insert_and_load_full_keyentry_from_grant()
4218 Ok(()) in test_insert_and_load_full_keyentry_from_grant()
4243 |_k, _av| Ok(()), in test_insert_and_load_full_keyentry_from_grant_by_key_id()
4262 Ok(()) in test_insert_and_load_full_keyentry_from_grant_by_key_id()
4279 Ok(()) in test_insert_and_load_full_keyentry_from_grant_by_key_id()
4286 db.unbind_key(&id_descriptor, KeyType::Client, OWNER_UID, |_, _| Ok(())).unwrap(); in test_insert_and_load_full_keyentry_from_grant_by_key_id()
4295 |_k, _av| Ok(()), in test_insert_and_load_full_keyentry_from_grant_by_key_id()
4302 Ok(()) in test_insert_and_load_full_keyentry_from_grant_by_key_id()
4335 Ok(()) in test_migrate_key_app_to_app()
4349 Ok(()) in test_migrate_key_app_to_app()
4363 |_k, _av| Ok(()), in test_migrate_key_app_to_app()
4370 Ok(()) in test_migrate_key_app_to_app()
4404 Ok(()) in test_migrate_key_app_to_selinux()
4418 Ok(()) in test_migrate_key_app_to_selinux()
4432 |_k, _av| Ok(()), in test_migrate_key_app_to_selinux()
4439 Ok(()) in test_migrate_key_app_to_selinux()
4470 |_k| Ok(()) in test_migrate_key_destination_occupied()
4477 Ok(()) in test_migrate_key_destination_occupied()
4510 Ok(()) in test_upgrade_0_to_1()
4530 Ok(()) in test_upgrade_0_to_1()
4550 Ok(()) in test_upgrade_0_to_1()
4576 Ok(()) in test_upgrade_0_to_1()
4596 Ok(()) in test_upgrade_0_to_1()
4617 Ok(()) in test_upgrade_0_to_1()
4648 |_k, _av| Ok(()), in test_insert_and_load_full_keyentry_domain_app_concurrently()
4676 |_k, _av| Ok(()), in test_insert_and_load_full_keyentry_domain_app_concurrently()
4687 assert_eq!(Ok(1), state.compare_exchange(1, 2, Ordering::Relaxed, Ordering::Relaxed)); in test_insert_and_load_full_keyentry_domain_app_concurrently()
4699 Ok(()) in test_insert_and_load_full_keyentry_domain_app_concurrently()
4746 new_test_db_with_gc(temp_dir.path(), |_, _| Ok(())).expect("Failed to open database."); in test_large_number_of_concurrent_db_manipulations()
4764 let mut db = new_test_db_with_gc(temp_dir1.path(), |_, _| Ok(())) in test_large_number_of_concurrent_db_manipulations()
4787 db.unbind_key(&key, KeyType::Client, 2, |_, _| Ok(())).expect("Unbind Failed."); in test_large_number_of_concurrent_db_manipulations()
4794 let mut db = new_test_db_with_gc(temp_dir2.path(), |_, _| Ok(())) in test_large_number_of_concurrent_db_manipulations()
4807 db.unbind_key(&key, KeyType::Client, 1, |_, _| Ok(())).expect("Unbind Failed."); in test_large_number_of_concurrent_db_manipulations()
4822 let mut db = new_test_db_with_gc(temp_dir4.path(), |_, _| Ok(())) in test_large_number_of_concurrent_db_manipulations()
4834 db.unbind_key(&key, KeyType::Client, 3, |_, _| Ok(())).expect("Unbind Failed."); in test_large_number_of_concurrent_db_manipulations()
4842 Ok(()) in test_large_number_of_concurrent_db_manipulations()
4913 |_, _| Ok(()), in list()
4932 Ok(()) in list()
4966 Ok(KeyEntryRow { in get_keyentry()
5009 Ok(RemoteProvValues { cert_chain, priv_key, batch_cert }) in load_attestation_key_pool()
5272 Ok(key_id) in make_test_key_entry()
5332 Ok(key_id) in make_bootlevel_key_entry()
5367 Ok(( in debug_dump_keyentry_table()
5387 Ok(()) in debug_dump_keyentry_table()
5395 Ok((row.get(0)?, row.get(1)?, row.get(2)?, row.get(3)?)) in debug_dump_grant_table()
5403 Ok(()) in debug_dump_grant_table()
5441 Ok(()) in test_last_off_body()
5459 Ok(()) in test_unbind_keys_for_user()
5495 Ok(()) in test_store_super_key()
5535 Ok(()) in test_query_all_valid_table_sizes()
5647 Ok(()) in test_verify_key_table_size_reporting()
5663 Ok(()) in test_verify_auth_table_size_reporting()
5683 |_, _| Ok(()), in test_verify_grant_table_size_reporting()
5688 Ok(()) in test_verify_grant_table_size_reporting()
5724 Ok(()) in find_auth_token_entry_returns_latest()
5740 Ok(()) in test_load_key_descriptor()