Lines Matching refs:i64

129     fn load_from_db(key_id: i64, tx: &Transaction) -> Result<Self> {  in load_from_db()  argument
137 let mut metadata: HashMap<i64, KeyMetaEntry> = Default::default(); in load_from_db()
142 let db_tag: i64 = row.get(0).context("Failed to read tag.")?; in load_from_db()
155 fn store_in_db(&self, key_id: i64, tx: &Transaction) -> Result<()> { in store_in_db() argument
204 fn load_from_db(blob_id: i64, tx: &Transaction) -> Result<Self> { in load_from_db() argument
212 let mut metadata: HashMap<i64, BlobMetaEntry> = Default::default(); in load_from_db()
217 let db_tag: i64 = row.get(0).context("Failed to read tag.")?; in load_from_db()
230 fn store_in_db(&self, blob_id: i64, tx: &Transaction) -> Result<()> { in store_in_db() argument
273 match i64::column_result(value)? { in column_result()
312 return Err(FromSqlError::OutOfRange(blob.len() as i64)); in column_result()
335 KeyId(i64),
351 _ => Ok(Self::KeyId(i64::column_result(value)?)), in column_result()
359 pub struct DateTime(i64);
386 pub fn from_millis_epoch(millis: i64) -> Self { in from_millis_epoch()
391 pub fn to_millis_epoch(&self) -> i64 { in to_millis_epoch() argument
396 pub fn to_secs_epoch(&self) -> i64 { in to_secs_epoch() argument
409 Ok(Self(i64::column_result(value)?)) in column_result()
475 match i64::column_result(value)? { in column_result()
517 locked_keys: Mutex<HashSet<i64>>,
525 pub struct KeyIdGuard(i64);
535 pub fn get(&self, key_id: i64) -> KeyIdGuard { in get()
548 pub fn try_get(&self, key_id: i64) -> Option<KeyIdGuard> { in try_get()
560 pub fn id(&self) -> i64 { in id() argument
616 id: i64,
628 pub fn id(&self) -> i64 { in id() argument
745 pub struct MonotonicRawTime(i64);
754 pub fn milliseconds(&self) -> i64 { in milliseconds() argument
759 pub fn seconds(&self) -> i64 { in seconds() argument
777 Ok(Self(i64::column_result(value)?)) in column_result()
796 pub fn satisfies(&self, user_secure_ids: &[i64], auth_type: HardwareAuthenticatorType) -> bool { in satisfies() argument
819 pub fn challenge(&self) -> i64 { in challenge() argument
830 const UNASSIGNED_KEY_ID: i64 = -1i64;
1130 blob_ids_to_delete: &[i64], in handle_next_superseded_blobs() argument
1132 ) -> Result<Vec<(i64, Vec<u8>, BlobMetaData)>> { in handle_next_superseded_blobs() argument
1149 let result: Vec<(i64, Vec<u8>)> = { in handle_next_superseded_blobs()
1170 max_blobs as i64, in handle_next_superseded_blobs()
1176 rows.collect::<Result<Vec<(i64, Vec<u8>)>, rusqlite::Error>>() in handle_next_superseded_blobs()
1185 .collect::<Result<Vec<(i64, Vec<u8>, BlobMetaData)>>>() in handle_next_superseded_blobs()
1238 nspace: i64, in key_exists() argument
1281 user_id as i64, in store_super_key()
1319 nspace: user_id as i64, in load_super_key()
1347 namespace: i64, in get_or_create_key_with() argument
1490 namespace: &i64, in create_key_entry() argument
1505 namespace: &i64, in create_key_entry_internal() argument
1622 key_id: i64, in set_blob_internal() argument
1714 expiration_date: i64, in store_signed_attestation_certificate_chain() argument
1785 namespace: i64, in assign_attestation_key() argument
1910 .collect::<rusqlite::Result<Vec<(i64, DateTime)>>>() in delete_expired_attestation_keys()
1913 SystemTime::now().duration_since(SystemTime::UNIX_EPOCH)?.as_millis() as i64, in delete_expired_attestation_keys()
1928 pub fn delete_all_attestation_keys(&mut self) -> Result<i64> { in delete_all_attestation_keys() argument
1940 .collect::<rusqlite::Result<Vec<i64>>>() in delete_all_attestation_keys()
1949 .count() as i64; in delete_all_attestation_keys()
1959 date: i64, in get_attestation_pool_status() argument
2028 namespace: i64, in retrieve_attestation_key_and_cert_chain() argument
2115 namespace: &i64, in rebind_alias() argument
2172 Domain::APP => KeyDescriptor { nspace: caller_uid as i64, ..(*destination).clone() }, in migrate_key_namespace()
2342 fn load_key_entry_id(tx: &Transaction, key: &KeyDescriptor, key_type: KeyType) -> Result<i64> { in load_key_entry_id() argument
2388 ) -> Result<(i64, KeyDescriptor, Option<KeyPermSet>)> { in load_access_tuple() argument
2399 access_key.nspace = caller_uid as i64; in load_access_tuple()
2418 .query(params![caller_uid as i64, key.nspace, KeyLifeCycle::Live]) in load_access_tuple()
2420 let (key_id, access_vector): (i64, i32) = in load_access_tuple()
2436 let (domain, namespace): (Domain, i64) = { in load_access_tuple()
2466 if domain != Domain::APP || namespace != caller_uid as i64 { in load_access_tuple()
2471 params![caller_uid as i64, key.nspace], in load_access_tuple()
2493 key_id: i64, in load_blob_components() argument
2507 let mut key_blob: Option<(i64, Vec<u8>)> = None; in load_blob_components()
2550 fn load_key_parameters(key_id: i64, tx: &Transaction) -> Result<Vec<KeyParameter>> { in load_key_parameters() argument
2580 pub fn check_and_update_key_usage_count(&mut self, key_id: i64) -> Result<()> { in check_and_update_key_usage_count()
2736 fn mark_unreferenced(tx: &Transaction, key_id: i64) -> Result<bool> { in mark_unreferenced()
2777 fn get_key_km_uuid(tx: &Transaction, key_id: i64) -> Result<Uuid> { in get_key_km_uuid()
2788 pub fn unbind_keys_for_namespace(&mut self, domain: Domain, namespace: i64) -> Result<()> { in unbind_keys_for_namespace()
2923 let mut key_ids: Vec<i64> = Vec::new(); in unbind_keys_for_user()
2956 key_id: i64, in load_key_components() argument
2988 namespace: i64, in list() argument
3133 fn insert_with_retry(inserter: impl Fn(i64) -> rusqlite::Result<usize>) -> Result<i64> { in insert_with_retry() argument
3135 let newid: i64 = match random() { in insert_with_retry()
3188 pub fn load_key_descriptor(&mut self, key_id: i64) -> Result<Option<KeyDescriptor>> { in load_key_descriptor()
3270 namespace: i64, in rebind_alias() argument
3339 challenge: i64::MAX, in test_auth_token_table_invariant()
3353 challenge: i64::MAX, in test_auth_token_table_invariant()
3372 challenge: i64::MAX, in test_auth_token_table_invariant()
3410 fn extractor(ke: &KeyEntryRow) -> (Domain, i64, Option<&str>, Uuid) { in test_create_key_entry() argument
3462 let expiration_date: i64 = 20; in test_store_signed_attestation_certificate_chain()
3463 let namespace: i64 = 30; in test_store_signed_attestation_certificate_chain()
3480 let namespace: i64 = 30; in test_get_attestation_pool_status()
3538 let expiration_date: i64 = in test_remove_expired_certs()
3539 SystemTime::now().duration_since(SystemTime::UNIX_EPOCH)?.as_millis() as i64 + 10000; in test_remove_expired_certs()
3540 let namespace: i64 = 30; in test_remove_expired_certs()
3541 let namespace_del1: i64 = 45; in test_remove_expired_certs()
3542 let namespace_del2: i64 = 60; in test_remove_expired_certs()
3618 ) -> (Option<Domain>, Option<i64>, Option<&str>, Option<Uuid>) { in test_rebind_alias() argument
3694 const SELINUX_NAMESPACE: i64 = 7; in test_grant_ungrant()
3724 nspace: CALLER_UID as i64, in test_grant_ungrant()
3816 stmt.query_map::<(i64, u32, i64, KeyPermSet), _, _>(NO_PARAMS, |row| { in test_grant_ungrant()
3867 .query_map::<((SubComponentType, i64, Vec<u8>), i64), _, _>(NO_PARAMS, |row| { in test_set_blob()
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()
4260 assert_eq!(OWNER_UID as i64, k.nspace); in test_insert_and_load_full_keyentry_from_grant_by_key_id()
4277 assert_eq!(OWNER_UID as i64, k.nspace); 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()
4347 assert_eq!(DESTINATION_UID as i64, k.nspace); in test_migrate_key_app_to_app()
4380 const DESTINATION_NAMESPACE: i64 = 1000i64; in test_migrate_key_app_to_selinux()
4384 make_test_key_entry(&mut db, Domain::APP, SOURCE_UID as i64, SOURCE_ALIAS, None) in test_migrate_key_app_to_selinux()
4416 assert_eq!(DESTINATION_NAMESPACE as i64, k.nspace); 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()
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()
4508 assert_eq!(UID as i64, k.nspace); in test_upgrade_0_to_1()
4528 assert_eq!(UID as i64, k.nspace); in test_upgrade_0_to_1()
4548 assert_eq!(UID as i64, k.nspace); in test_upgrade_0_to_1()
4574 assert_eq!(UID as i64, k.nspace); in test_upgrade_0_to_1()
4594 assert_eq!(UID as i64, k.nspace); in test_upgrade_0_to_1()
4615 assert_eq!(UID as i64, k.nspace); in test_upgrade_0_to_1()
4849 static LIST_O_ENTRIES: &[(Domain, i64, &str)] = &[ in list()
4873 let list_o_keys: Vec<(i64, i64)> = LIST_O_ENTRIES in list()
4904 let mut list_o_ids: Vec<i64> = list_o_descriptors in list()
4920 let mut loaded_entries: Vec<i64> = list_o_keys in list()
4953 id: i64,
4956 namespace: Option<i64>,
4991 expiration_date: i64, in load_attestation_key_pool() argument
4992 namespace: i64, in load_attestation_key_pool() argument
5244 namespace: i64, in make_test_key_entry() argument
5275 fn make_test_key_entry_test_vector(key_id: i64, max_usage_count: Option<i32>) -> KeyEntry { in make_test_key_entry_test_vector() argument
5303 namespace: i64, in make_bootlevel_key_entry() argument
5335 fn make_bootlevel_test_key_entry_test_vector(key_id: i64, logical_only: bool) -> KeyEntry { in make_bootlevel_test_key_entry_test_vector() argument
5364 let rows = stmt.query_map::<(i64, KeyType, i32, i64, String, KeyLifeCycle, Uuid), _, _>( in debug_dump_keyentry_table()
5394 let rows = stmt.query_map::<(i64, i64, i64, i64), _, _>(NO_PARAMS, |row| { in debug_dump_grant_table()
5410 static RANDOM_COUNTER: RefCell<i64> = RefCell::new(0);
5419 pub fn random() -> i64 { in random()
5668 const OWNER: i64 = 1; in test_verify_grant_table_size_reporting()