Home
last modified time | relevance | path

Searched refs:Some (Results 1 – 25 of 210) sorted by relevance

123456789

/system/security/keystore2/tests/
Dkeystore2_client_rsa_key_tests.rs93 if let Some(value) = key_params.digest { in create_rsa_key_and_operation()
96 if let Some(value) = key_params.padding { in create_rsa_key_and_operation()
99 if let Some(value) = key_params.mgf_digest { in create_rsa_key_and_operation()
102 if let Some(value) = key_params.block_mode { in create_rsa_key_and_operation()
123 Some(alias.to_string()), in perform_rsa_sign_key_op_success()
127 padding: Some(padding), in perform_rsa_sign_key_op_success()
128 digest: Some(digest), in perform_rsa_sign_key_op_success()
159 Some(alias.to_string()), in perform_rsa_sign_key_op_failure()
163 padding: Some(padding), in perform_rsa_sign_key_op_failure()
164 digest: Some(digest), in perform_rsa_sign_key_op_failure()
[all …]
Dkeystore2_client_update_subcomponent_tests.rs41 Some(alias.to_string()), in keystore2_update_subcomponent_success()
50 .updateSubcomponent(&key_metadata.key, Some(&other_cert), Some(&other_cert_chain)) in keystore2_update_subcomponent_success()
54 assert_eq!(Some(other_cert.to_vec()), key_entry_response.metadata.certificate); in keystore2_update_subcomponent_success()
55 assert_eq!(Some(other_cert_chain.to_vec()), key_entry_response.metadata.certificateChain); in keystore2_update_subcomponent_success()
73 alias: Some(alias.to_string()), in keystore2_update_subcomponent_fail()
76 Some(&other_cert), in keystore2_update_subcomponent_fail()
77 Some(&other_cert_chain), in keystore2_update_subcomponent_fail()
95 alias: Some(alias.to_string()), in keystore2_update_subcomponent_no_key_entry_cert_fail()
98 Some(&other_cert), in keystore2_update_subcomponent_no_key_entry_cert_fail()
118 &KeyDescriptor { domain, nspace, alias: Some(alias.to_string()), blob: None }, in keystore2_update_subcomponent_no_key_entry_cert_chain_success()
[all …]
Dkeystore2_client_attest_key_tests.rs69 Some(sign_key_alias), in keystore2_attest_rsa_signing_key_success()
73 padding: Some(PaddingMode::RSA_PKCS1_1_5_SIGN), in keystore2_attest_rsa_signing_key_success()
74 digest: Some(Digest::SHA_2_256), in keystore2_attest_rsa_signing_key_success()
77 att_challenge: Some(att_challenge.to_vec()), in keystore2_attest_rsa_signing_key_success()
79 Some(&attestation_key_metadata.key), in keystore2_attest_rsa_signing_key_success()
117 Some(decrypt_key_alias), in keystore2_attest_rsa_encrypt_key_success()
121 padding: Some(PaddingMode::RSA_PKCS1_1_5_ENCRYPT), in keystore2_attest_rsa_encrypt_key_success()
122 digest: Some(Digest::SHA_2_256), in keystore2_attest_rsa_encrypt_key_success()
125 att_challenge: Some(att_challenge.to_vec()), in keystore2_attest_rsa_encrypt_key_success()
127 Some(&attestation_key_metadata.key), in keystore2_attest_rsa_encrypt_key_success()
[all …]
Dkeystore2_client_test_utils.rs233 let result = op.finish(Some(b"my message"), Some(&sig)).unwrap(); in perform_sample_hmac_sign_verify_op()
240 Some(Digest::MD5) => MessageDigest::md5(), in get_openssl_digest_mode()
241 Some(Digest::SHA1) => MessageDigest::sha1(), in get_openssl_digest_mode()
242 Some(Digest::SHA_2_224) => MessageDigest::sha224(), in get_openssl_digest_mode()
243 Some(Digest::SHA_2_256) => MessageDigest::sha256(), in get_openssl_digest_mode()
244 Some(Digest::SHA_2_384) => MessageDigest::sha384(), in get_openssl_digest_mode()
245 Some(Digest::SHA_2_512) => MessageDigest::sha512(), in get_openssl_digest_mode()
269 if let Some(value) = padding { in perform_sample_asym_sign_verify_op()
272 if let Some(value) = digest { in perform_sample_asym_sign_verify_op()
289 if let Some(value) = padding { in perform_sample_asym_sign_verify_op()
[all …]
Dkeystore2_client_import_keys_tests.rs59 Some(PaddingMode::RSA_PSS), in import_rsa_sign_key_and_perform_sample_operation()
60 Some(Digest::SHA_2_256), in import_rsa_sign_key_and_perform_sample_operation()
106 key_generations::import_transport_key(sec_level, Some(transport_key_alias), transport_key) in build_secure_key_wrapper()
159 Some(alias), in keystore2_rsa_import_key_success()
190 Some(alias), in keystore2_rsa_import_key_determine_key_size_and_pub_exponent()
217 &KeyDescriptor { domain: Domain::APP, nspace: -1, alias: Some(alias), blob: None }, in keystore2_rsa_import_key_fails_with_keysize_param_mismatch_error()
250 &KeyDescriptor { domain: Domain::APP, nspace: -1, alias: Some(alias), blob: None }, in keystore2_rsa_import_key_fails_with_public_exponent_param_mismatch_error()
284 &KeyDescriptor { domain: Domain::APP, nspace: -1, alias: Some(alias), blob: None }, in keystore2_rsa_import_key_with_multipurpose_fails_incompt_purpose_error()
330 Some(alias), in keystore2_import_ec_key_success()
335 perform_sample_asym_sign_verify_op(&sec_level, &key_metadata, None, Some(Digest::SHA_2_256)); in keystore2_import_ec_key_success()
[all …]
/system/nfc/src/rust/nci/
Dapi.rs84 self.commands = Some(nci.commands); in nfc_enable()
85 self.connections = Some(nci.connections); in nfc_enable()
86 self.callback = Some(callback); in nfc_enable()
87 self.hal_events = Some(nci.hal_events); in nfc_enable()
107 if let Some(mut event) = self.hal_events.take() { in nfc_disable()
110 if let Some(cmd) = self.commands.take() { in nfc_disable()
113 if let Some(conn) = self.connections.take() { in nfc_disable()
119 if let Some(cb) = self.callback.take() { in nfc_disable()
137 if let Some(cmd) = self.commands.as_mut() { in nfc_init()
154 if let Some(conn) = self.connections.as_mut() { in nfc_init()
[all …]
Dnci.rs118 notification: Some(ntx), in send_and_notify()
181 if let Some(conn_params) = self.conns.read().await.get(&conn_id) { in set_static_callback()
189 if let Some(conn_params) = self.conns.write().await.remove(&conn_id) { in close()
197 if let Some(conn_params) = self.conns.read().await.get(&conn_id) { in add_credits()
209 if let Some(conn_params) = self.conns.read().await.get(&conn_id) { in send_packet()
219 payload: Some(p.split_to(conn_params.max_payload_size.into())), in send_packet()
229 payload: Some(p), in send_packet()
253 if let Some(conn_params) = self.conns.read().await.get(&conn_id) { in send_callback()
285 if let Some(conn_params) = self.conns.read().await.get(&conn_id) { in flush_data()
331 Some(cmd) = hc.in_cmd_rx.recv() => { in dispatch()
[all …]
/system/libfmq/tests/
Dfmq_test.rs41 Some(mut wc) => { in test_body()
57 Some(mut rc) => { in test_body()
58 assert_return!(rc.read() == Some(200)); in test_body()
68 assert_return!(join_handle.join().ok() == Some(true)); in test_body()
71 Some(mut rc) => { in test_body()
72 assert_return!(rc.read() == Some(201)); in test_body()
73 assert_return!(rc.read() == Some(202)); in test_body()
74 assert_return!(rc.read() == Some(203)); in test_body()
/system/logging/rust/
Dlogger.rs48 self.log_level = Some(level); in with_max_level()
54 self.tag = Some(CString::new(tag).expect("Can't convert tag to CString")); in with_tag_on_device()
71 self.custom_format = Some(Box::new(format)); in format()
77 self.filter = Some(filter); in with_filter()
92 if let Some(log_level) = config.log_level { in init()
95 if let Some(custom_format) = config.custom_format { in init()
103 if let Some(filter_str) = config.filter { in init()
122 if let Some(log_level) = config.log_level { in init()
125 if let Some(custom_format) = config.custom_format { in init()
131 if let Some(filter_str) = config.filter { in init()
[all …]
/system/keymint/hal/src/
Dhal.rs76 Some(&CString::new("conversion from HAL type to internal type failed").unwrap()), in failed_conversion()
512 Some(KeyParam::Purpose(value_of!(val, KeyPurpose)?.try_innto()?)) in try_fromm()
515 Some(KeyParam::Algorithm(value_of!(val, Algorithm)?.try_innto()?)) in try_fromm()
518 Some(KeyParam::BlockMode(value_of!(val, BlockMode)?.try_innto()?)) in try_fromm()
521 Some(KeyParam::Digest(value_of!(val, Digest)?.try_innto()?)) in try_fromm()
524 Some(KeyParam::Padding(value_of!(val, PaddingMode)?.try_innto()?)) in try_fromm()
527 Some(KeyParam::EcCurve(value_of!(val, EcCurve)?.try_innto()?)) in try_fromm()
530 Some(KeyParam::RsaOaepMgfDigest(value_of!(val, Digest)?.try_innto()?)) in try_fromm()
533 Some(KeyParam::Origin(value_of!(val, Origin)?.try_innto()?)) in try_fromm()
540 Some(KeyParam::UserAuthType(val.0 as u32)) in try_fromm()
[all …]
Dkeymint.rs120 Some(k) => Some(k.clone().try_innto().map_err(failed_conversion)?), in generateKey()
142 Some(k) => Some(k.clone().try_innto().map_err(failed_conversion)?), in importKey()
215 Some(t) => Some(t.clone().try_innto().map_err(failed_conversion)?), in begin()
227 operation: Some(op), in begin()
239 Some(&CString::new("Deprecated method deviceLocked() is not implemented").unwrap()), in deviceLocked()
329 let op = Self { channel, op_handle: RwLock::new(Some(op_handle)) }; in new_as_binder()
351 Some(&CString::new("Operation handle not valid").unwrap()), in validate_handle()
375 Some(t) => Some(t.clone().try_innto().map_err(failed_conversion)?), in updateAad()
403 Some(t) => Some(t.clone().try_innto().map_err(failed_conversion)?), in update()
432 Some(t) => Some(t.clone().try_innto().map_err(failed_conversion)?), in finish()
[all …]
/system/keymint/ta/src/
Doperation.rs93 if let Some(max_size) = max_size { in check_size()
130 auth_type = Some(*atype); in new()
137 timeout_secs = Some(*secs) in new()
149 } else if let Some(auth_type) = auth_type { in new()
153 Ok(Some(AuthInfo { secure_ids, auth_type, timeout_secs })) in new()
186 Some(try_to_vec(CONFIRMATION_DATA_PREFIX)?) in begin_operation()
191 let slot_to_delete = if let Some(&1) = get_opt_tag_value!(key_chars, UsageCountLimit)? { in begin_operation()
208 if let Some(auth_info) = &op_auth_info { in begin_operation()
211 if let Some(timeout_secs) = auth_info.timeout_secs { in begin_operation()
212 if let Some(clock) = &self.imp.clock { in begin_operation()
[all …]
/system/security/keystore2/src/
Denforcements.rs85 hat: Mutex::new(Some(hat)), in timestamp()
90 *self.hat.lock().unwrap() = Some(hat) in add_auth_token()
109 Some(result.context(ks_err!( in get_auth_tokens()
192 if let Some((_, recv)) = recv { in add_auth_token()
220 if let Some(state_arc) = self.0.upgrade() { in add_auth_token()
255 Some(OperationChallenge { challenge }) in finalize_create_authorization()
265 Some(OperationChallenge { challenge }) in finalize_create_authorization()
292 if let Some(ref confirmation_token_receiver) = self.confirmation_token_receiver { in before_finish()
294 if let Some(ref receiver) = *locked_receiver { in before_finish()
299 Ok(t) => confirmation_token = Some(t), in before_finish()
[all …]
Dlegacy_importer.rs129 *initializer = Some(Box::new(f_init)) in set_init()
156 if let Some(initializer) = initializer.take() { in check_state()
218 alias: Some(alias), in list_uid()
238 Err(e) => return Some(Err(e)), in do_serialized()
251 let (new_state, result) = if let Some(legacy_importer_state) = in do_serialized()
255 (legacy_importer_state.check_empty(), Some(result)) in do_serialized()
274 return Some(Err(e).context(ks_err!("Failed to receive from the sender."))); in do_serialized()
308 Some(&Error::Rc(ResponseCode::KEY_NOT_FOUND)) => {} in with_try_import()
316 KeyDescriptor { domain: Domain::APP, alias: Some(_), .. } => caller_uid, in with_try_import()
317 KeyDescriptor { domain: Domain::SELINUX, nspace, alias: Some(_), .. } => { in with_try_import()
[all …]
Draw_device.rs85 KeyMintDevice::get(security_level).map(Some).or_else(|e| { in get_or_none()
87 Some(Error::Km(ErrorCode::HARDWARE_TYPE_UNAVAILABLE)) => Ok(None), in get_or_none()
145 alias: Some(alias), in internal_descriptor()
165 Ok(result) => Ok(Some(result)), in not_found_is_none()
167 Some(&Error::Rc(ResponseCode::KEY_NOT_FOUND)) => Ok(None), in not_found_is_none()
194 if let Some((key_id_guard, mut key_entry)) = lookup { in lookup_or_generate_key()
199 if Some(&self.km_uuid) == blob_metadata.km_uuid() { in lookup_or_generate_key()
200 Some(key_blob) in lookup_or_generate_key()
206 if let Some(key_blob_vec) = key_blob { in lookup_or_generate_key()
276 Some(upgraded_blob), in upgrade_keyblob_if_required_with()
[all …]
Doperation.rs254 Some(PruningInfo { in get_pruning_info()
397 Ok(Some(output)) in update()
405 if let Some(input) = input { in finish()
438 Ok(Some(output)) in finish()
513 Some(free_slot) => { in create_operation()
631 if let Some(op) = op.upgrade() { in prune()
632 if let Some(p_info) = op.get_pruning_info() { in prune()
664 if let Some(CandidateInfo { age: a, .. }) = oldest_caller_op { in prune()
667 Some(CandidateInfo { index, malus: 0, last_usage, age }); in prune()
671 Some(CandidateInfo { index, malus: 0, last_usage, age }); in prune()
[all …]
Dglobals.rs67 let mut db = KeystoreDB::new(&db_path, Some(GC.clone())).expect("Failed to open database."); in create_thread_local_db()
189 Some(format!("{}/default", keymint_descriptor)) in keymint_service_name()
196 Some(format!("{}/strongbox", keymint_descriptor)) in keymint_service_name()
223 let (keymint, hal_version) = if let Some(service_name) = service_name { in connect_keymint()
233 (km, Some(km_version * 100)) in connect_keymint()
261 Some(300) => { in connect_keymint()
270 Some(200) => { in connect_keymint()
279 Some(100) => { in connect_keymint()
324 if let Some(hal_version) = hal_version { in connect_keymint()
338 if let Some((dev, hw_info, uuid)) = devices_map.dev_by_sec_level(security_level) { in get_keymint_device()
[all …]
/system/authgraph/core/src/
Dkey.rs239 Some(coset::Algorithm::Assigned(iana::Algorithm::EdDSA)) => { in from_cose_key()
242 Some(coset::Algorithm::Assigned(iana::Algorithm::ES256)) => { in from_cose_key()
245 Some(coset::Algorithm::Assigned(iana::Algorithm::ES384)) => { in from_cose_key()
248 Some(_) => { in from_cose_key()
540 Some(dice_chain_entries) => { in validate()
582 parent_subj = Some(subject); in validate()
608 Some(dice_chain_entries) in from_cbor_value()
644 if let Some(dice_chain_entries) = self.dice_cert_chain { in to_cbor_value()
694 None => dice_chain_entry_payload.issuer = Some(issuer.to_string()), in from_cbor_value()
695 Some(_) => { in from_cbor_value()
[all …]
/system/libfmq/tests/aidl/default/
DTestAidlMsgQ.rs49 *self.queue_sync.lock().unwrap() = Some(fmq::MessageQueue::from_desc(mq_desc, false)); in configureFmqSyncReadWrite()
69 let Some(ref mut mq) = *queue_guard else { in requestReadFmqSync() localVariable
70 return Err(binder::Status::new_service_specific_error_str(107, Some("no fmq set up"))); in requestReadFmqSync()
74 Some(mut rc) => { in requestReadFmqSync()
97 let Some(ref mut mq) = *queue_guard else { in requestWriteFmqSync() localVariable
98 return Err(binder::Status::new_service_specific_error_str(107, Some("no fmq set up"))); in requestWriteFmqSync()
102 Some(mut wc) => { in requestWriteFmqSync()
/system/librustutils/
Dsystem_properties.rs61 Some(self.prop_info) in get_prop_info()
80 Some(unsafe { CStr::from_ptr(name) }) in read_raw()
87 Some(unsafe { CStr::from_ptr(value) }) in read_raw()
101 Some(callback), in read_raw()
134 Some(_) => return Ok(()), in wait_for_property_creation_until()
145 if let Some(remaining_timeout) = &remaining_timeout { in wait_for_property_creation_until()
178 if let Some(remaining_timeout) = &remaining_timeout { in wait_for_property_change_until()
222 Ok(value) => Ok(Some(value)), in read()
230 "1" | "y" | "yes" | "on" | "true" => Some(true), in parse_bool()
231 "0" | "n" | "no" | "off" | "false" => Some(false), in parse_bool()
[all …]
/system/keymint/common/src/tag/
Dinfo.rs216 ext_asn1_type: Some("SET OF INTEGER"),
231 ext_asn1_type: Some("INTEGER"),
246 ext_asn1_type: Some("INTEGER"),
276 ext_asn1_type: Some("SET OF INTEGER"),
291 ext_asn1_type: Some("SET OF INTEGER"),
336 ext_asn1_type: Some("INTEGER"),
351 ext_asn1_type: Some("INTEGER"),
381 ext_asn1_type: Some("SET OF INTEGER"),
411 ext_asn1_type: Some("NULL"),
426 ext_asn1_type: Some("NULL"),
[all …]
/system/keymint/common/src/
Dkeyblob.rs103 Some("EncryptedKeyBlob".to_string()) in cddl_typename()
106 Some(format!( in cddl_schema()
243 if let Some(slot) = self.slot.take() { in drop()
259 Ok((Self { mgr, slot: Some(slot) }, sdd)) in new()
301 if let Some(sdd) = sdd {
358 (true, Some(sdd_mgr)) => { in encrypt()
362 (Some(holder), Some(sdd)) in encrypt()
370 (false, Some(sdd_mgr)) => { in encrypt()
372 (None, Some(sdd_mgr.get_or_create_factory_reset_secret(rng)?)) in encrypt()
426 (Some(slot), Some(sdd_mgr)) => Some(sdd_mgr.get_secret(slot)?), in decrypt()
[all …]
/system/nfc/src/rust/hal/
Dhidl_hal.rs32 *CALLBACKS.lock().unwrap() = Some(Callbacks { in init()
33 hal_open_evt_tx: Some(hal_open_evt_tx), in init()
34 hal_close_evt_tx: Some(hal_close_evt_tx), in init()
126 if let Some(evt_tx) = callbacks.as_mut().unwrap().hal_open_evt_tx.take() { in on_event()
131 if let Some(evt_tx) = callbacks.as_mut().unwrap().hal_close_evt_tx.take() { in on_event()
163 Some(cmd) = out_cmd_rx.recv() => ffi::send_command(&cmd.encode_to_bytes().unwrap()), in dispatch_outgoing()
164 Some(data) = out_data_rx.recv() => ffi::send_command(&data.encode_to_bytes().unwrap()), in dispatch_outgoing()
170 if let Some(evt) = hal_events.unregister(HalEvent::CloseComplete).await { in dispatch_outgoing()
/system/authgraph/wire/src/
Dfragmentation.rs55 Some(result) in next()
75 Some(Cow::Borrowed(content)) in accumulate()
80 Some(Cow::Owned(full_req)) in accumulate()
161 if let Some(got) = result { in test_reassembly()
180 if let Some(got) = result { in test_fragmentation_reassembly()
195 if let Some(msg) = rsp_reassembler.borrow_mut().accumulate(data) { in test_ta_fragmentation_wrapper()
196 *full_rsp.borrow_mut() = Some(msg.to_vec()); in test_ta_fragmentation_wrapper()
209 if let Some(full_req) = self.pending_req.accumulate(req_frag) { in test_ta_fragmentation_wrapper()
241 if let Some(rsp) = full_rsp.borrow().as_ref() { in test_ta_fragmentation_wrapper()
/system/keymint/boringssl/src/
Dlib.rs142 Digest::Md5 => Some(MessageDigest::md5()), in digest_into_openssl()
143 Digest::Sha1 => Some(MessageDigest::sha1()), in digest_into_openssl()
144 Digest::Sha224 => Some(MessageDigest::sha224()), in digest_into_openssl()
145 Digest::Sha256 => Some(MessageDigest::sha256()), in digest_into_openssl()
146 Digest::Sha384 => Some(MessageDigest::sha384()), in digest_into_openssl()
147 Digest::Sha512 => Some(MessageDigest::sha512()), in digest_into_openssl()

123456789