Lines Matching refs:Domain
74 Domain::Domain, KeyDescriptor::KeyDescriptor,
1267 domain: Domain, in key_exists() argument
1310 Domain::APP.0, in store_super_key()
1348 domain: Domain::APP, in load_super_key()
1376 domain: Domain, in get_or_create_key_with() argument
1517 domain: &Domain, in create_key_entry() argument
1532 domain: &Domain, in create_key_entry_internal() argument
1538 Domain::APP | Domain::SELINUX => {} in create_key_entry_internal()
1810 domain: Domain, in assign_attestation_key() argument
1817 Domain::APP | Domain::SELINUX => {} in assign_attestation_key()
1985 domain: Domain, in query_kid_for_attestation_key_and_cert_chain() argument
2022 domain: Domain, in retrieve_attestation_key_and_cert_chain() argument
2029 Domain::APP | Domain::SELINUX => {} in retrieve_attestation_key_and_cert_chain()
2111 domain: &Domain, in rebind_alias() argument
2116 Domain::APP | Domain::SELINUX => {} in rebind_alias()
2167 Domain::APP => KeyDescriptor { nspace: caller_uid as i64, ..(*destination).clone() }, in migrate_key_namespace()
2168 Domain::SELINUX => (*destination).clone(), in migrate_key_namespace()
2238 KeyDescriptor { alias: Some(alias), domain: Domain::APP, nspace, blob: None } in store_new_key()
2239 | KeyDescriptor { alias: Some(alias), domain: Domain::SELINUX, nspace, blob: None } => { in store_new_key()
2317 KeyDescriptor { alias: Some(alias), domain: Domain::APP, nspace, blob: None } in store_new_certificate()
2318 | KeyDescriptor { alias: Some(alias), domain: Domain::SELINUX, nspace, blob: None } => { in store_new_certificate()
2410 Domain::APP | Domain::SELINUX => { in load_access_tuple()
2412 if access_key.domain == Domain::APP { in load_access_tuple()
2423 Domain::GRANT => { in load_access_tuple()
2449 Domain::KEY_ID => { in load_access_tuple()
2450 let (domain, namespace): (Domain, i64) = { in load_access_tuple()
2466 Domain(r.get(0).context("Failed to unpack domain.")?), in load_access_tuple()
2480 if domain != Domain::APP || namespace != caller_uid as i64 { in load_access_tuple()
2677 Domain::KEY_ID => Some(KEY_ID_LOCK.get(key.nspace)), in load_key_entry_internal()
2725 domain: Domain::KEY_ID, in load_key_entry_internal()
2800 pub fn unbind_keys_for_namespace(&mut self, domain: Domain, namespace: i64) -> Result<()> { in unbind_keys_for_namespace() argument
2803 if !(domain == Domain::APP || domain == Domain::SELINUX) { in unbind_keys_for_namespace()
2922 Domain::APP.0 as u32, in unbind_keys_for_user()
2998 domain: Domain, in list_past_alias() argument
3054 domain: Domain, in count_keys() argument
3143 Ok(KeyDescriptor { domain: Domain::GRANT, nspace: grant_id, alias: None, blob: None }) in grant()
3248 domain: Domain(row.get(0)?), in load_key_descriptor()
3321 domain: Domain, in rebind_alias() argument
3449 db.create_key_entry(&Domain::APP, &100, KeyType::Client, &KEYSTORE_UUID)?; in test_persistence_for_files()
3462 fn extractor(ke: &KeyEntryRow) -> (Domain, i64, Option<&str>, Uuid) { in test_create_key_entry() argument
3468 db.create_key_entry(&Domain::APP, &100, KeyType::Client, &KEYSTORE_UUID)?; in test_create_key_entry()
3469 db.create_key_entry(&Domain::SELINUX, &101, KeyType::Client, &KEYSTORE_UUID)?; in test_create_key_entry()
3473 assert_eq!(extractor(&entries[0]), (Domain::APP, 100, None, KEYSTORE_UUID)); in test_create_key_entry()
3474 assert_eq!(extractor(&entries[1]), (Domain::SELINUX, 101, None, KEYSTORE_UUID)); in test_create_key_entry()
3478 db.create_key_entry(&Domain::GRANT, &102, KeyType::Client, &KEYSTORE_UUID), in test_create_key_entry()
3479 &format!("Domain {:?} must be either App or SELinux.", Domain::GRANT), in test_create_key_entry()
3482 db.create_key_entry(&Domain::BLOB, &103, KeyType::Client, &KEYSTORE_UUID), in test_create_key_entry()
3483 &format!("Domain {:?} must be either App or SELinux.", Domain::BLOB), in test_create_key_entry()
3486 db.create_key_entry(&Domain::KEY_ID, &104, KeyType::Client, &KEYSTORE_UUID), in test_create_key_entry()
3487 &format!("Domain {:?} must be either App or SELinux.", Domain::KEY_ID), in test_create_key_entry()
3523 db.retrieve_attestation_key_and_cert_chain(Domain::APP, namespace, &KEYSTORE_UUID)?; in test_store_signed_attestation_certificate_chain()
3564 db.retrieve_attestation_key_and_cert_chain(Domain::APP, namespace, &KEYSTORE_UUID)?; in test_remove_expired_certs()
3572 Domain::APP, in test_remove_expired_certs()
3578 Domain::APP, in test_remove_expired_certs()
3641 db.retrieve_attestation_key_and_cert_chain(Domain::APP, namespace1, &KEYSTORE_UUID)?; in test_dont_remove_valid_certs()
3645 db.retrieve_attestation_key_and_cert_chain(Domain::APP, namespace2, &KEYSTORE_UUID)?; in test_dont_remove_valid_certs()
3649 db.retrieve_attestation_key_and_cert_chain(Domain::APP, namespace3, &KEYSTORE_UUID)?; in test_dont_remove_valid_certs()
3670 db.create_key_entry(&Domain::APP, &42, KeyType::Client, &KEYSTORE_UUID)?; in test_delete_all_attestation_keys()
3686 ) -> (Option<Domain>, Option<i64>, Option<&str>, Option<Uuid>) { in test_rebind_alias() argument
3691 db.create_key_entry(&Domain::APP, &42, KeyType::Client, &KEYSTORE_UUID)?; in test_rebind_alias()
3692 db.create_key_entry(&Domain::APP, &42, KeyType::Client, &KEYSTORE_UUID)?; in test_rebind_alias()
3697 (Some(Domain::APP), Some(42), None, Some(KEYSTORE_UUID)) in test_rebind_alias()
3701 (Some(Domain::APP), Some(42), None, Some(KEYSTORE_UUID)) in test_rebind_alias()
3705 rebind_alias(&mut db, &KEY_ID_LOCK.get(entries[0].id), "foo", Domain::APP, 42)?; in test_rebind_alias()
3710 (Some(Domain::APP), Some(42), Some("foo"), Some(KEYSTORE_UUID)) in test_rebind_alias()
3714 (Some(Domain::APP), Some(42), None, Some(KEYSTORE_UUID)) in test_rebind_alias()
3718 rebind_alias(&mut db, &KEY_ID_LOCK.get(entries[1].id), "foo", Domain::APP, 42)?; in test_rebind_alias()
3724 (Some(Domain::APP), Some(42), Some("foo"), Some(KEYSTORE_UUID)) in test_rebind_alias()
3729 rebind_alias(&mut db, &KEY_ID_LOCK.get(0), "foo", Domain::GRANT, 42), in test_rebind_alias()
3730 &format!("Domain {:?} must be either App or SELinux.", Domain::GRANT), in test_rebind_alias()
3733 rebind_alias(&mut db, &KEY_ID_LOCK.get(0), "foo", Domain::BLOB, 42), in test_rebind_alias()
3734 &format!("Domain {:?} must be either App or SELinux.", Domain::BLOB), in test_rebind_alias()
3737 rebind_alias(&mut db, &KEY_ID_LOCK.get(0), "foo", Domain::KEY_ID, 42), in test_rebind_alias()
3738 &format!("Domain {:?} must be either App or SELinux.", Domain::KEY_ID), in test_rebind_alias()
3743 rebind_alias(&mut db, &KEY_ID_LOCK.get(0), "foo", Domain::SELINUX, 42), in test_rebind_alias()
3752 (Some(Domain::APP), Some(42), Some("foo"), Some(KEYSTORE_UUID)) in test_rebind_alias()
3771 domain: super::Domain::APP, in test_grant_ungrant()
3790 domain: super::Domain::APP, in test_grant_ungrant()
3804 domain: super::Domain::GRANT, in test_grant_ungrant()
3813 domain: super::Domain::SELINUX, in test_grant_ungrant()
3825 domain: super::Domain::SELINUX, in test_grant_ungrant()
3840 domain: super::Domain::GRANT, in test_grant_ungrant()
3855 domain: super::Domain::SELINUX, in test_grant_ungrant()
3870 domain: super::Domain::GRANT, in test_grant_ungrant()
3963 let key_id = make_test_key_entry(&mut db, Domain::APP, 1, TEST_ALIAS, None) in test_insert_and_load_full_keyentry_domain_app()
3969 domain: Domain::APP, in test_insert_and_load_full_keyentry_domain_app()
3984 domain: Domain::APP, in test_insert_and_load_full_keyentry_domain_app()
3999 domain: Domain::APP, in test_insert_and_load_full_keyentry_domain_app()
4023 domain: Domain::APP, in test_insert_and_load_certificate_entry_domain_app()
4037 domain: Domain::APP, in test_insert_and_load_certificate_entry_domain_app()
4055 domain: Domain::APP, in test_insert_and_load_certificate_entry_domain_app()
4070 domain: Domain::APP, in test_insert_and_load_certificate_entry_domain_app()
4091 let key_id = make_test_key_entry(&mut db, Domain::SELINUX, 1, TEST_ALIAS, None) in test_insert_and_load_full_keyentry_domain_selinux()
4097 domain: Domain::SELINUX, in test_insert_and_load_full_keyentry_domain_selinux()
4112 domain: Domain::SELINUX, in test_insert_and_load_full_keyentry_domain_selinux()
4127 domain: Domain::SELINUX, in test_insert_and_load_full_keyentry_domain_selinux()
4148 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()
4153 &KeyDescriptor { domain: Domain::KEY_ID, nspace: key_id, alias: None, blob: None }, in test_insert_and_load_full_keyentry_domain_key_id()
4164 &KeyDescriptor { domain: Domain::KEY_ID, nspace: key_id, alias: None, blob: None }, in test_insert_and_load_full_keyentry_domain_key_id()
4174 &KeyDescriptor { domain: Domain::KEY_ID, nspace: key_id, alias: None, blob: None }, in test_insert_and_load_full_keyentry_domain_key_id()
4191 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()
4198 &KeyDescriptor { domain: Domain::KEY_ID, nspace: key_id, alias: None, blob: None }, in test_check_and_update_key_usage_count_with_limited_use_key()
4214 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()
4239 let key_id = make_test_key_entry(&mut db, Domain::APP, 1, TEST_ALIAS, None) in test_insert_and_load_full_keyentry_from_grant()
4246 domain: Domain::APP, in test_insert_and_load_full_keyentry_from_grant()
4262 assert_eq!(Domain::GRANT, k.domain); in test_insert_and_load_full_keyentry_from_grant()
4297 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()
4303 domain: Domain::APP, in test_insert_and_load_full_keyentry_from_grant_by_key_id()
4318 KeyDescriptor { domain: Domain::KEY_ID, nspace: key_id, ..Default::default() }; in test_insert_and_load_full_keyentry_from_grant_by_key_id()
4327 assert_eq!(Domain::APP, k.domain); in test_insert_and_load_full_keyentry_from_grant_by_key_id()
4344 assert_eq!(Domain::APP, k.domain); in test_insert_and_load_full_keyentry_from_grant_by_key_id()
4383 make_test_key_entry(&mut db, Domain::APP, SOURCE_UID as i64, SOURCE_ALIAS, None) in test_migrate_key_app_to_app()
4387 domain: Domain::APP, in test_migrate_key_app_to_app()
4394 domain: Domain::APP, in test_migrate_key_app_to_app()
4414 assert_eq!(Domain::APP, k.domain); in test_migrate_key_app_to_app()
4452 make_test_key_entry(&mut db, Domain::APP, SOURCE_UID as i64, SOURCE_ALIAS, None) in test_migrate_key_app_to_selinux()
4456 domain: Domain::APP, in test_migrate_key_app_to_selinux()
4463 domain: Domain::SELINUX, in test_migrate_key_app_to_selinux()
4483 assert_eq!(Domain::SELINUX, k.domain); in test_migrate_key_app_to_selinux()
4520 make_test_key_entry(&mut db, Domain::APP, SOURCE_UID as i64, SOURCE_ALIAS, None) in test_migrate_key_destination_occupied()
4522 make_test_key_entry(&mut db, Domain::APP, DESTINATION_UID as i64, DESTINATION_ALIAS, None) in test_migrate_key_destination_occupied()
4526 domain: Domain::APP, in test_migrate_key_destination_occupied()
4557 make_test_key_entry(&mut db, Domain::APP, UID as i64, ALIAS1, None).unwrap().id(); in test_upgrade_0_to_1()
4559 make_bootlevel_key_entry(&mut db, Domain::APP, UID as i64, ALIAS2, false).unwrap().id(); in test_upgrade_0_to_1()
4561 make_bootlevel_key_entry(&mut db, Domain::APP, UID as i64, ALIAS3, true).unwrap().id(); in test_upgrade_0_to_1()
4566 domain: Domain::APP, in test_upgrade_0_to_1()
4575 assert_eq!(Domain::APP, k.domain); in test_upgrade_0_to_1()
4586 domain: Domain::APP, in test_upgrade_0_to_1()
4595 assert_eq!(Domain::APP, k.domain); in test_upgrade_0_to_1()
4606 domain: Domain::APP, in test_upgrade_0_to_1()
4615 assert_eq!(Domain::APP, k.domain); in test_upgrade_0_to_1()
4632 domain: Domain::APP, in test_upgrade_0_to_1()
4641 assert_eq!(Domain::APP, k.domain); in test_upgrade_0_to_1()
4652 domain: Domain::APP, in test_upgrade_0_to_1()
4661 assert_eq!(Domain::APP, k.domain); in test_upgrade_0_to_1()
4673 domain: Domain::APP, in test_upgrade_0_to_1()
4682 assert_eq!(Domain::APP, k.domain); in test_upgrade_0_to_1()
4702 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()
4708 domain: Domain::APP, in test_insert_and_load_full_keyentry_domain_app_concurrently()
4736 domain: Domain::APP, in test_insert_and_load_full_keyentry_domain_app_concurrently()
4825 make_test_key_entry(&mut db, Domain::APP, 1, &alias, None) in test_large_number_of_concurrent_db_manipulations()
4840 make_test_key_entry(&mut db, Domain::APP, 2, &alias, None) in test_large_number_of_concurrent_db_manipulations()
4850 domain: Domain::APP, in test_large_number_of_concurrent_db_manipulations()
4870 domain: Domain::APP, in test_large_number_of_concurrent_db_manipulations()
4894 make_test_key_entry(&mut db, Domain::APP, 3, &alias, None) in test_large_number_of_concurrent_db_manipulations()
4897 domain: Domain::APP, in test_large_number_of_concurrent_db_manipulations()
4917 static LIST_O_ENTRIES: &[(Domain, i64, &str)] = &[ in list()
4918 (Domain::APP, 1, "test1"), in list()
4919 (Domain::APP, 1, "test2"), in list()
4920 (Domain::APP, 1, "test3"), in list()
4921 (Domain::APP, 1, "test4"), in list()
4922 (Domain::APP, 1, "test5"), in list()
4923 (Domain::APP, 1, "test6"), in list()
4924 (Domain::APP, 1, "test7"), in list()
4925 (Domain::APP, 2, "test1"), in list()
4926 (Domain::APP, 2, "test2"), in list()
4927 (Domain::APP, 2, "test3"), in list()
4928 (Domain::APP, 2, "test4"), in list()
4929 (Domain::APP, 2, "test5"), in list()
4930 (Domain::APP, 2, "test6"), in list()
4931 (Domain::APP, 2, "test8"), in list()
4932 (Domain::SELINUX, 100, "test1"), in list()
4933 (Domain::SELINUX, 100, "test2"), in list()
4934 (Domain::SELINUX, 100, "test3"), in list()
4935 (Domain::SELINUX, 100, "test4"), in list()
4936 (Domain::SELINUX, 100, "test5"), in list()
4937 (Domain::SELINUX, 100, "test6"), in list()
4938 (Domain::SELINUX, 100, "test9"), in list()
4953 &[(Domain::APP, 1i64), (Domain::APP, 2i64), (Domain::SELINUX, 100i64)] in list()
5000 db.list_past_alias(Domain::SELINUX, 101, KeyType::Client, None)? in list()
5026 domain: Option<Domain>,
5040 domain: row.get::<_, Option<_>>(2)?.map(Domain), in get_keyentry()
5076 db.assign_attestation_key(Domain::APP, namespace, &KEYSTORE_UUID)?; in load_attestation_key_pool()
5315 domain: Domain, in make_test_key_entry() argument
5374 domain: Domain, in make_bootlevel_key_entry() argument
5521 make_test_key_entry(&mut db, Domain::APP, 210000, TEST_ALIAS, None)?; in test_unbind_keys_for_user()
5522 make_test_key_entry(&mut db, Domain::APP, 110000, TEST_ALIAS, None)?; in test_unbind_keys_for_user()
5525 assert_eq!(1, db.list_past_alias(Domain::APP, 110000, KeyType::Client, None)?.len()); in test_unbind_keys_for_user()
5526 assert_eq!(0, db.list_past_alias(Domain::APP, 210000, KeyType::Client, None)?.len()); in test_unbind_keys_for_user()
5529 assert_eq!(0, db.list_past_alias(Domain::APP, 110000, KeyType::Client, None)?.len()); in test_unbind_keys_for_user()
5628 assert!(db.key_exists(Domain::APP, 1, USER_SUPER_KEY.alias, KeyType::Super)?); in test_store_super_key()
5744 let key_id = db.create_key_entry(&Domain::APP, &42, KeyType::Client, &KEYSTORE_UUID)?; in test_verify_key_table_size_reporting()
5816 make_test_key_entry(&mut db, Domain::APP, OWNER, TEST_ALIAS, None)?; in test_verify_grant_table_size_reporting()
5821 domain: Domain::APP, in test_verify_grant_table_size_reporting()
5876 let key_id = make_test_key_entry(&mut db, Domain::APP, 1, TEST_ALIAS, None)?.0; in test_load_key_descriptor()
5880 assert_eq!(key.domain, Domain::APP); in test_load_key_descriptor()