Lines Matching refs:Domain
68 Domain::Domain, KeyDescriptor::KeyDescriptor,
1237 domain: Domain, in key_exists() argument
1280 Domain::APP.0, in store_super_key()
1318 domain: Domain::APP, in load_super_key()
1346 domain: Domain, in get_or_create_key_with() argument
1489 domain: &Domain, in create_key_entry() argument
1504 domain: &Domain, in create_key_entry_internal() argument
1510 Domain::APP | Domain::SELINUX => {} in create_key_entry_internal()
1784 domain: Domain, in assign_attestation_key() argument
1791 Domain::APP | Domain::SELINUX => {} in assign_attestation_key()
2027 domain: Domain, in retrieve_attestation_key_and_cert_chain() argument
2034 Domain::APP | Domain::SELINUX => {} in retrieve_attestation_key_and_cert_chain()
2114 domain: &Domain, in rebind_alias() argument
2119 Domain::APP | Domain::SELINUX => {} in rebind_alias()
2172 Domain::APP => KeyDescriptor { nspace: caller_uid as i64, ..(*destination).clone() }, in migrate_key_namespace()
2173 Domain::SELINUX => (*destination).clone(), in migrate_key_namespace()
2244 KeyDescriptor { alias: Some(alias), domain: Domain::APP, nspace, blob: None } in store_new_key()
2245 | KeyDescriptor { alias: Some(alias), domain: Domain::SELINUX, nspace, blob: None } => { in store_new_key()
2302 KeyDescriptor { alias: Some(alias), domain: Domain::APP, nspace, blob: None } in store_new_certificate()
2303 | KeyDescriptor { alias: Some(alias), domain: Domain::SELINUX, nspace, blob: None } => { in store_new_certificate()
2396 Domain::APP | Domain::SELINUX => { in load_access_tuple()
2398 if access_key.domain == Domain::APP { in load_access_tuple()
2409 Domain::GRANT => { in load_access_tuple()
2435 Domain::KEY_ID => { in load_access_tuple()
2436 let (domain, namespace): (Domain, i64) = { in load_access_tuple()
2452 Domain(r.get(0).context("Failed to unpack domain.")?), in load_access_tuple()
2466 if domain != Domain::APP || namespace != caller_uid as i64 { in load_access_tuple()
2664 Domain::KEY_ID => Some(KEY_ID_LOCK.get(key.nspace)), in load_key_entry_internal()
2713 domain: Domain::KEY_ID, in load_key_entry_internal()
2788 pub fn unbind_keys_for_namespace(&mut self, domain: Domain, namespace: i64) -> Result<()> { in unbind_keys_for_namespace() argument
2791 if !(domain == Domain::APP || domain == Domain::SELINUX) { in unbind_keys_for_namespace()
2912 Domain::APP.0 as u32, in unbind_keys_for_user()
2987 domain: Domain, in list() argument
3091 Ok(KeyDescriptor { domain: Domain::GRANT, nspace: grant_id, alias: None, blob: None }) in grant()
3197 domain: Domain(row.get(0)?), in load_key_descriptor()
3269 domain: Domain, in rebind_alias() argument
3397 db.create_key_entry(&Domain::APP, &100, KeyType::Client, &KEYSTORE_UUID)?; in test_persistence_for_files()
3410 fn extractor(ke: &KeyEntryRow) -> (Domain, i64, Option<&str>, Uuid) { in test_create_key_entry() argument
3416 db.create_key_entry(&Domain::APP, &100, KeyType::Client, &KEYSTORE_UUID)?; in test_create_key_entry()
3417 db.create_key_entry(&Domain::SELINUX, &101, KeyType::Client, &KEYSTORE_UUID)?; in test_create_key_entry()
3421 assert_eq!(extractor(&entries[0]), (Domain::APP, 100, None, KEYSTORE_UUID)); in test_create_key_entry()
3422 assert_eq!(extractor(&entries[1]), (Domain::SELINUX, 101, None, KEYSTORE_UUID)); in test_create_key_entry()
3426 db.create_key_entry(&Domain::GRANT, &102, KeyType::Client, &KEYSTORE_UUID), in test_create_key_entry()
3430 db.create_key_entry(&Domain::BLOB, &103, KeyType::Client, &KEYSTORE_UUID), in test_create_key_entry()
3434 db.create_key_entry(&Domain::KEY_ID, &104, KeyType::Client, &KEYSTORE_UUID), in test_create_key_entry()
3468 db.retrieve_attestation_key_and_cert_chain(Domain::APP, namespace, &KEYSTORE_UUID)?; in test_store_signed_attestation_certificate_chain()
3563 db.retrieve_attestation_key_and_cert_chain(Domain::APP, namespace, &KEYSTORE_UUID)?; in test_remove_expired_certs()
3571 Domain::APP, in test_remove_expired_certs()
3577 Domain::APP, in test_remove_expired_certs()
3602 db.create_key_entry(&Domain::APP, &42, KeyType::Client, &KEYSTORE_UUID)?; in test_delete_all_attestation_keys()
3618 ) -> (Option<Domain>, Option<i64>, Option<&str>, Option<Uuid>) { in test_rebind_alias() argument
3623 db.create_key_entry(&Domain::APP, &42, KeyType::Client, &KEYSTORE_UUID)?; in test_rebind_alias()
3624 db.create_key_entry(&Domain::APP, &42, KeyType::Client, &KEYSTORE_UUID)?; in test_rebind_alias()
3629 (Some(Domain::APP), Some(42), None, Some(KEYSTORE_UUID)) in test_rebind_alias()
3633 (Some(Domain::APP), Some(42), None, Some(KEYSTORE_UUID)) in test_rebind_alias()
3637 rebind_alias(&mut db, &KEY_ID_LOCK.get(entries[0].id), "foo", Domain::APP, 42)?; in test_rebind_alias()
3642 (Some(Domain::APP), Some(42), Some("foo"), Some(KEYSTORE_UUID)) in test_rebind_alias()
3646 (Some(Domain::APP), Some(42), None, Some(KEYSTORE_UUID)) in test_rebind_alias()
3650 rebind_alias(&mut db, &KEY_ID_LOCK.get(entries[1].id), "foo", Domain::APP, 42)?; in test_rebind_alias()
3656 (Some(Domain::APP), Some(42), Some("foo"), Some(KEYSTORE_UUID)) in test_rebind_alias()
3661 rebind_alias(&mut db, &KEY_ID_LOCK.get(0), "foo", Domain::GRANT, 42), in test_rebind_alias()
3665 rebind_alias(&mut db, &KEY_ID_LOCK.get(0), "foo", Domain::BLOB, 42), in test_rebind_alias()
3669 rebind_alias(&mut db, &KEY_ID_LOCK.get(0), "foo", Domain::KEY_ID, 42), in test_rebind_alias()
3675 rebind_alias(&mut db, &KEY_ID_LOCK.get(0), "foo", Domain::SELINUX, 42), in test_rebind_alias()
3684 (Some(Domain::APP), Some(42), Some("foo"), Some(KEYSTORE_UUID)) in test_rebind_alias()
3703 domain: super::Domain::APP, in test_grant_ungrant()
3722 domain: super::Domain::APP, in test_grant_ungrant()
3736 domain: super::Domain::GRANT, in test_grant_ungrant()
3745 domain: super::Domain::SELINUX, in test_grant_ungrant()
3757 domain: super::Domain::SELINUX, in test_grant_ungrant()
3772 domain: super::Domain::GRANT, in test_grant_ungrant()
3787 domain: super::Domain::SELINUX, in test_grant_ungrant()
3802 domain: super::Domain::GRANT, in test_grant_ungrant()
3895 let key_id = make_test_key_entry(&mut db, Domain::APP, 1, TEST_ALIAS, None) in test_insert_and_load_full_keyentry_domain_app()
3901 domain: Domain::APP, in test_insert_and_load_full_keyentry_domain_app()
3916 domain: Domain::APP, in test_insert_and_load_full_keyentry_domain_app()
3931 domain: Domain::APP, in test_insert_and_load_full_keyentry_domain_app()
3955 domain: Domain::APP, in test_insert_and_load_certificate_entry_domain_app()
3969 domain: Domain::APP, in test_insert_and_load_certificate_entry_domain_app()
3987 domain: Domain::APP, in test_insert_and_load_certificate_entry_domain_app()
4002 domain: Domain::APP, in test_insert_and_load_certificate_entry_domain_app()
4023 let key_id = make_test_key_entry(&mut db, Domain::SELINUX, 1, TEST_ALIAS, None) in test_insert_and_load_full_keyentry_domain_selinux()
4029 domain: Domain::SELINUX, in test_insert_and_load_full_keyentry_domain_selinux()
4044 domain: Domain::SELINUX, in test_insert_and_load_full_keyentry_domain_selinux()
4059 domain: Domain::SELINUX, in test_insert_and_load_full_keyentry_domain_selinux()
4080 let key_id = make_test_key_entry(&mut db, Domain::SELINUX, 1, TEST_ALIAS, None) in test_insert_and_load_full_keyentry_domain_key_id()
4085 &KeyDescriptor { domain: Domain::KEY_ID, nspace: key_id, alias: None, blob: None }, in test_insert_and_load_full_keyentry_domain_key_id()
4096 &KeyDescriptor { domain: Domain::KEY_ID, nspace: key_id, alias: None, blob: None }, in test_insert_and_load_full_keyentry_domain_key_id()
4106 &KeyDescriptor { domain: Domain::KEY_ID, nspace: key_id, alias: None, blob: None }, in test_insert_and_load_full_keyentry_domain_key_id()
4123 let key_id = make_test_key_entry(&mut db, Domain::SELINUX, 1, TEST_ALIAS, Some(123)) in test_check_and_update_key_usage_count_with_limited_use_key()
4130 &KeyDescriptor { domain: Domain::KEY_ID, nspace: key_id, alias: None, blob: None }, in test_check_and_update_key_usage_count_with_limited_use_key()
4146 let key_id = make_test_key_entry(&mut db, Domain::SELINUX, 1, TEST_ALIAS, Some(1)) in test_check_and_update_key_usage_count_with_exhausted_limited_use_key()
4171 let key_id = make_test_key_entry(&mut db, Domain::APP, 1, TEST_ALIAS, None) in test_insert_and_load_full_keyentry_from_grant()
4178 domain: Domain::APP, in test_insert_and_load_full_keyentry_from_grant()
4194 assert_eq!(Domain::GRANT, k.domain); in test_insert_and_load_full_keyentry_from_grant()
4229 let key_id = make_test_key_entry(&mut db, Domain::APP, OWNER_UID as i64, TEST_ALIAS, None) in test_insert_and_load_full_keyentry_from_grant_by_key_id()
4235 domain: Domain::APP, in test_insert_and_load_full_keyentry_from_grant_by_key_id()
4250 KeyDescriptor { domain: Domain::KEY_ID, nspace: key_id, ..Default::default() }; in test_insert_and_load_full_keyentry_from_grant_by_key_id()
4259 assert_eq!(Domain::APP, k.domain); in test_insert_and_load_full_keyentry_from_grant_by_key_id()
4276 assert_eq!(Domain::APP, k.domain); in test_insert_and_load_full_keyentry_from_grant_by_key_id()
4315 make_test_key_entry(&mut db, Domain::APP, SOURCE_UID as i64, SOURCE_ALIAS, None) in test_migrate_key_app_to_app()
4319 domain: Domain::APP, in test_migrate_key_app_to_app()
4326 domain: Domain::APP, in test_migrate_key_app_to_app()
4346 assert_eq!(Domain::APP, k.domain); in test_migrate_key_app_to_app()
4384 make_test_key_entry(&mut db, Domain::APP, SOURCE_UID as i64, SOURCE_ALIAS, None) in test_migrate_key_app_to_selinux()
4388 domain: Domain::APP, in test_migrate_key_app_to_selinux()
4395 domain: Domain::SELINUX, in test_migrate_key_app_to_selinux()
4415 assert_eq!(Domain::SELINUX, k.domain); in test_migrate_key_app_to_selinux()
4452 make_test_key_entry(&mut db, Domain::APP, SOURCE_UID as i64, SOURCE_ALIAS, None) in test_migrate_key_destination_occupied()
4454 make_test_key_entry(&mut db, Domain::APP, DESTINATION_UID as i64, DESTINATION_ALIAS, None) in test_migrate_key_destination_occupied()
4458 domain: Domain::APP, in test_migrate_key_destination_occupied()
4489 make_test_key_entry(&mut db, Domain::APP, UID as i64, ALIAS1, None).unwrap().id(); in test_upgrade_0_to_1()
4491 make_bootlevel_key_entry(&mut db, Domain::APP, UID as i64, ALIAS2, false).unwrap().id(); in test_upgrade_0_to_1()
4493 make_bootlevel_key_entry(&mut db, Domain::APP, UID as i64, ALIAS3, true).unwrap().id(); in test_upgrade_0_to_1()
4498 domain: Domain::APP, in test_upgrade_0_to_1()
4507 assert_eq!(Domain::APP, k.domain); in test_upgrade_0_to_1()
4518 domain: Domain::APP, in test_upgrade_0_to_1()
4527 assert_eq!(Domain::APP, k.domain); in test_upgrade_0_to_1()
4538 domain: Domain::APP, in test_upgrade_0_to_1()
4547 assert_eq!(Domain::APP, k.domain); in test_upgrade_0_to_1()
4564 domain: Domain::APP, in test_upgrade_0_to_1()
4573 assert_eq!(Domain::APP, k.domain); in test_upgrade_0_to_1()
4584 domain: Domain::APP, in test_upgrade_0_to_1()
4593 assert_eq!(Domain::APP, k.domain); in test_upgrade_0_to_1()
4605 domain: Domain::APP, in test_upgrade_0_to_1()
4614 assert_eq!(Domain::APP, k.domain); in test_upgrade_0_to_1()
4634 let key_id = make_test_key_entry(&mut db, Domain::APP, 33, KEY_LOCK_TEST_ALIAS, None) in test_insert_and_load_full_keyentry_domain_app_concurrently()
4640 domain: Domain::APP, in test_insert_and_load_full_keyentry_domain_app_concurrently()
4668 domain: Domain::APP, in test_insert_and_load_full_keyentry_domain_app_concurrently()
4757 make_test_key_entry(&mut db, Domain::APP, 1, &alias, None) in test_large_number_of_concurrent_db_manipulations()
4772 make_test_key_entry(&mut db, Domain::APP, 2, &alias, None) in test_large_number_of_concurrent_db_manipulations()
4782 domain: Domain::APP, in test_large_number_of_concurrent_db_manipulations()
4802 domain: Domain::APP, in test_large_number_of_concurrent_db_manipulations()
4826 make_test_key_entry(&mut db, Domain::APP, 3, &alias, None) in test_large_number_of_concurrent_db_manipulations()
4829 domain: Domain::APP, in test_large_number_of_concurrent_db_manipulations()
4849 static LIST_O_ENTRIES: &[(Domain, i64, &str)] = &[ in list()
4850 (Domain::APP, 1, "test1"), in list()
4851 (Domain::APP, 1, "test2"), in list()
4852 (Domain::APP, 1, "test3"), in list()
4853 (Domain::APP, 1, "test4"), in list()
4854 (Domain::APP, 1, "test5"), in list()
4855 (Domain::APP, 1, "test6"), in list()
4856 (Domain::APP, 1, "test7"), in list()
4857 (Domain::APP, 2, "test1"), in list()
4858 (Domain::APP, 2, "test2"), in list()
4859 (Domain::APP, 2, "test3"), in list()
4860 (Domain::APP, 2, "test4"), in list()
4861 (Domain::APP, 2, "test5"), in list()
4862 (Domain::APP, 2, "test6"), in list()
4863 (Domain::APP, 2, "test8"), in list()
4864 (Domain::SELINUX, 100, "test1"), in list()
4865 (Domain::SELINUX, 100, "test2"), in list()
4866 (Domain::SELINUX, 100, "test3"), in list()
4867 (Domain::SELINUX, 100, "test4"), in list()
4868 (Domain::SELINUX, 100, "test5"), in list()
4869 (Domain::SELINUX, 100, "test6"), in list()
4870 (Domain::SELINUX, 100, "test9"), in list()
4885 &[(Domain::APP, 1i64), (Domain::APP, 2i64), (Domain::SELINUX, 100i64)] in list()
4930 assert_eq!(Vec::<KeyDescriptor>::new(), db.list(Domain::SELINUX, 101, KeyType::Client)?); in list()
4955 domain: Option<Domain>,
4970 Some(i) => Some(Domain(i)), in get_keyentry()
5008 db.assign_attestation_key(Domain::APP, namespace, &KEYSTORE_UUID)?; in load_attestation_key_pool()
5243 domain: Domain, in make_test_key_entry() argument
5302 domain: Domain, in make_bootlevel_key_entry() argument
5449 make_test_key_entry(&mut db, Domain::APP, 210000, TEST_ALIAS, None)?; in test_unbind_keys_for_user()
5450 make_test_key_entry(&mut db, Domain::APP, 110000, TEST_ALIAS, None)?; in test_unbind_keys_for_user()
5453 assert_eq!(1, db.list(Domain::APP, 110000, KeyType::Client)?.len()); in test_unbind_keys_for_user()
5454 assert_eq!(0, db.list(Domain::APP, 210000, KeyType::Client)?.len()); in test_unbind_keys_for_user()
5457 assert_eq!(0, db.list(Domain::APP, 110000, KeyType::Client)?.len()); in test_unbind_keys_for_user()
5482 assert!(db.key_exists(Domain::APP, 1, &USER_SUPER_KEY.alias, KeyType::Super)?); in test_store_super_key()
5598 let key_id = db.create_key_entry(&Domain::APP, &42, KeyType::Client, &KEYSTORE_UUID)?; in test_verify_key_table_size_reporting()
5670 make_test_key_entry(&mut db, Domain::APP, OWNER, TEST_ALIAS, None)?; in test_verify_grant_table_size_reporting()
5675 domain: Domain::APP, in test_verify_grant_table_size_reporting()
5730 let key_id = make_test_key_entry(&mut db, Domain::APP, 1, TEST_ALIAS, None)?.0; in test_load_key_descriptor()
5734 assert_eq!(key.domain, Domain::APP); in test_load_key_descriptor()