/system/security/keystore2/tests/ |
D | keystore2_client_list_entries_tests.rs | 34 alias: String, in key_alias_exists() 39 .map(|key| key.alias.unwrap()) in key_alias_exists() 40 .filter(|key_alias| *key_alias == alias) in key_alias_exists() 68 let alias = format!("list_entries_grant_key1_{}", getuid()); in keystore2_list_entries_success() localVariable 76 alias.to_string(), in keystore2_list_entries_success() 82 alias: Some(alias.to_string()), in keystore2_list_entries_success() 93 Some(alias.to_string()), in keystore2_list_entries_success() 104 alias, in keystore2_list_entries_success() 125 let alias = format!("list_entries_success_key{}", getuid()); in keystore2_list_entries_success() localVariable 131 Some(alias.to_string()), in keystore2_list_entries_success() [all …]
|
D | keystore2_client_hmac_key_tests.rs | 32 alias: &str, in create_hmac_key_and_operation() 39 key_generations::generate_hmac_key(sec_level, alias, key_size, min_mac_len, digest)?; in create_hmac_key_and_operation() 76 let alias = format!("ks_hmac_test_key_{}", digest.0); in keystore2_hmac_key_op_success() localVariable 82 &alias, in keystore2_hmac_key_op_success() 103 let alias = format!("ks_hmac_test_key_{}", key_size); in keystore2_hmac_gen_keys_fails_expect_unsupported_key_size() localVariable 106 &alias, in keystore2_hmac_gen_keys_fails_expect_unsupported_key_size() 135 let alias = format!("ks_hmac_test_key_mml_{}", min_mac_len); in keystore2_hmac_gen_keys_fails_expect_unsupported_min_mac_length() localVariable 138 &alias, in keystore2_hmac_gen_keys_fails_expect_unsupported_min_mac_length() 165 let alias = "ks_hmac_test_key_multi_dig"; in keystore2_hmac_gen_key_multi_digests_fails_expect_unsupported_digest() localVariable 180 alias: Some(alias.to_string()), in keystore2_hmac_gen_key_multi_digests_fails_expect_unsupported_digest() [all …]
|
D | keystore2_client_update_subcomponent_tests.rs | 32 let alias = "update_subcomponent_success_key"; in keystore2_update_subcomponent_success() localVariable 41 Some(alias.to_string()), in keystore2_update_subcomponent_success() 62 let alias = "update_component_failure_key"; in keystore2_update_subcomponent_fail() localVariable 73 alias: Some(alias.to_string()), in keystore2_update_subcomponent_fail() 87 let alias = "update_no_key_entry_cert_only_component_fail_key"; in keystore2_update_subcomponent_no_key_entry_cert_fail() localVariable 95 alias: Some(alias.to_string()), in keystore2_update_subcomponent_no_key_entry_cert_fail() 109 let alias = "update_no_key_entry_cert_chain_only_component_success"; in keystore2_update_subcomponent_no_key_entry_cert_chain_success() localVariable 118 &KeyDescriptor { domain, nspace, alias: Some(alias.to_string()), blob: None }, in keystore2_update_subcomponent_no_key_entry_cert_chain_success() 128 alias: Some(alias.to_string()), in keystore2_update_subcomponent_no_key_entry_cert_chain_success() 141 alias: Some(alias.to_string()), in keystore2_update_subcomponent_no_key_entry_cert_chain_success() [all …]
|
D | keystore2_client_import_keys_tests.rs | 47 alias: Option<String>, in import_rsa_sign_key_and_perform_sample_operation() 51 key_generations::import_rsa_2048_key(sec_level, domain, nspace, alias, import_params) in import_rsa_sign_key_and_perform_sample_operation() 139 let alias = format!("ks_rsa_key_test_import_1_{}{}", getuid(), 2048); in keystore2_rsa_import_key_success() localVariable 157 Some(alias), in keystore2_rsa_import_key_success() 171 let alias = format!("ks_rsa_key_test_import_2_{}{}", getuid(), 2048); in keystore2_rsa_import_key_determine_key_size_and_pub_exponent() localVariable 188 Some(alias), in keystore2_rsa_import_key_determine_key_size_and_pub_exponent() 200 let alias = format!("ks_rsa_key_test_import_3_{}{}", getuid(), 2048); in keystore2_rsa_import_key_fails_with_keysize_param_mismatch_error() localVariable 215 &KeyDescriptor { domain: Domain::APP, nspace: -1, alias: Some(alias), blob: None }, in keystore2_rsa_import_key_fails_with_keysize_param_mismatch_error() 233 let alias = format!("ks_rsa_key_test_import_4_{}{}", getuid(), 2048); in keystore2_rsa_import_key_fails_with_public_exponent_param_mismatch_error() localVariable 248 &KeyDescriptor { domain: Domain::APP, nspace: -1, alias: Some(alias), blob: None }, in keystore2_rsa_import_key_fails_with_public_exponent_param_mismatch_error() [all …]
|
D | keystore2_client_key_id_domain_tests.rs | 35 let alias = "ks_gen_key_id_test_key"; in keystore2_generate_key_with_key_id_domain_expect_sys_error() localVariable 43 Some(alias.to_string()), in keystore2_generate_key_with_key_id_domain_expect_sys_error() 58 let alias = "ks_key_id_test_key"; in keystore2_find_key_with_key_id_as_domain() localVariable 64 Some(alias.to_string()), in keystore2_find_key_with_key_id_as_domain() 75 alias: Some(alias.to_string()), in keystore2_find_key_with_key_id_as_domain() 115 let alias = format!("ks_key_id_test_alias_rebind_1_{}", getuid()); in keystore2_key_id_alias_rebind_verify_by_alias() localVariable 121 Some(alias.to_string()), in keystore2_key_id_alias_rebind_verify_by_alias() 133 Some(alias), in keystore2_key_id_alias_rebind_verify_by_alias() 182 let alias = format!("ks_key_id_test_alias_rebind_2_{}", getuid()); in keystore2_key_id_alias_rebind_verify_by_key_id() localVariable 188 Some(alias.to_string()), in keystore2_key_id_alias_rebind_verify_by_key_id() [all …]
|
D | keystore2_client_delete_key_tests.rs | 32 let alias = "delete_key_success_key"; in keystore2_delete_key_success() localVariable 38 Some(alias.to_string()), in keystore2_delete_key_success() 61 alias: Some(test_alias.to_string()), in keystore2_delete_key_fail() 75 let alias = "delete_key_blob_fail_key"; in keystore2_delete_key_with_blob_domain_fail() localVariable 81 Some(alias.to_string()), in keystore2_delete_key_with_blob_domain_fail() 97 let alias = "delete_key_blob_success_key"; in keystore2_delete_key_blob_success() localVariable 103 Some(alias.to_string()), in keystore2_delete_key_blob_success() 122 alias: None, in keystore2_delete_key_fails_with_missing_key_blob() 136 let alias = format!("ks_delete_keyblob_test_key_{}", getuid()); in keystore2_delete_key_blob_fail() localVariable 142 Some(alias), in keystore2_delete_key_blob_fail()
|
D | keystore2_client_ec_key_tests.rs | 63 alias: Option<String>, in create_ec_key_and_operation() 68 key_generations::generate_ec_key(sec_level, domain, nspace, alias, ec_curve, digest)?; in create_ec_key_and_operation() 77 fn perform_ec_sign_key_op_success(alias: &str, digest: Digest, ec_curve: EcCurve) { in perform_ec_sign_key_op_success() 85 Some(alias.to_string()), in perform_ec_sign_key_op_success() 99 delete_app_key(&keystore2, alias).unwrap(); in perform_ec_sign_key_op_success() 102 fn perform_ec_sign_key_op_with_none_or_md5_digest(alias: &str, digest: Digest, ec_curve: EcCurve) { in perform_ec_sign_key_op_with_none_or_md5_digest() 110 Some(alias.to_string()), in perform_ec_sign_key_op_with_none_or_md5_digest() 129 delete_app_key(&keystore2, alias).unwrap(); in perform_ec_sign_key_op_with_none_or_md5_digest() 229 let alias = format!("ks_invalid_test_key_{}", getuid()); in keystore2_generate_key_invalid_domain() localVariable 235 Some(alias), in keystore2_generate_key_invalid_domain() [all …]
|
D | keystore2_client_grant_key_tests.rs | 42 let alias = format!("{}{}", "ks_grant_test_key_1", getuid()); in generate_ec_key_and_grant_to_user() localVariable 48 Some(alias), in generate_ec_key_and_grant_to_user() 64 alias: None, in load_grant_key_and_perform_sign_operation() 146 alias: None, in keystore2_grant_key_with_perm_none() 203 alias: None, in keystore2_grant_get_info_use_key_perm() 230 alias: None, in keystore2_grant_get_info_use_key_perm() 284 alias: None, in keystore2_grant_delete_key_success() 300 alias: Some(ALIAS.to_string()), in keystore2_grant_delete_key_success() 333 let alias = format!("ks_grant_perm_denied_key_{}", getuid()); in keystore2_grant_key_fails_with_permission_denied() localVariable 337 Some(alias), in keystore2_grant_key_fails_with_permission_denied() [all …]
|
D | keystore2_client_operation_tests.rs | 44 let alias = format!("ks_op_test_key_{}", getuid()); in create_operations() localVariable 53 Some(alias.to_string()), in create_operations() 140 let alias = format!("ks_prune_forced_op_key_{}", getuid()); in keystore2_forced_op_after_backendbusy_test() localVariable 151 Some(alias), in keystore2_forced_op_after_backendbusy_test() 205 let alias = format!("ks_forced_op_key_{}", getuid()); in keystore2_max_forced_ops_test() localVariable 210 Some(alias), in keystore2_max_forced_ops_test() 284 let alias = format!("ks_reg_op_key_{}", getuid()); in keystore2_ops_prune_test() localVariable 289 Some(alias), in keystore2_ops_prune_test() 302 let alias = format!("ks_prune_op_test_key_{}", getuid()); in keystore2_ops_prune_test() localVariable 307 Some(alias), in keystore2_ops_prune_test() [all …]
|
D | keystore2_client_aes_key_tests.rs | 42 let alias = format!("ks_aes_test_key_{}{}{}", key_size, block_mode.0, padding_mode.0); in create_aes_key_and_operation() localVariable 48 &alias, in create_aes_key_and_operation() 178 let alias = "aes_key_test_invalid_1"; in keystore2_aes_key_fails_unsupported_key_size() localVariable 184 alias, in keystore2_aes_key_fails_unsupported_key_size() 199 let alias = "aes_key_test_invalid_1"; in keystore2_aes_gcm_key_fails_missing_min_mac_len() localVariable 205 alias, in keystore2_aes_gcm_key_fails_missing_min_mac_len() 220 let alias = "aes_key_test_invalid_1"; in keystore2_aes_key_op_fails_multi_block_modes() localVariable 237 alias: Some(alias.to_string()), in keystore2_aes_key_op_fails_multi_block_modes() 268 let alias = "aes_key_test_invalid_1"; in keystore2_aes_key_op_fails_multi_padding_modes() localVariable 285 alias: Some(alias.to_string()), in keystore2_aes_key_op_fails_multi_padding_modes() [all …]
|
D | keystore2_client_3des_key_tests.rs | 39 let alias = format!("ks_3des_test_key_{}{}", block_mode.0, padding_mode.0); in create_3des_key_and_operation() localVariable 45 &alias, in create_3des_key_and_operation() 104 let alias = "3des_key_test_invalid_1"; in keystore2_3des_key_fails_unsupported_key_size() localVariable 111 alias, in keystore2_3des_key_fails_unsupported_key_size() 127 let alias = "3des_key_test_missing_padding"; in keystore2_3des_key_fails_missing_padding() localVariable 142 alias: Some(alias.to_string()), in keystore2_3des_key_fails_missing_padding() 171 let alias = "3des_key_test_invalid_input_len"; in keystore2_3des_key_encrypt_fails_invalid_input_length() localVariable 177 alias, in keystore2_3des_key_encrypt_fails_invalid_input_length()
|
D | keystore2_client_key_agreement_tests.rs | 96 let alias = format!("ks_ec_test_key_agree_{}", getuid()); in perform_ec_key_agreement() localVariable 103 Some(alias), in perform_ec_key_agreement() 129 let alias = format!("ks_ec_25519_test_key_agree_{}", getuid()); in keystore2_ec_25519_agree_key_success() localVariable 136 Some(alias), in keystore2_ec_25519_agree_key_success() 155 let alias = format!("ks_test_key_agree_fail{}", getuid()); in keystore2_ec_agree_key_with_different_curves_fail() localVariable 162 Some(alias), in keystore2_ec_agree_key_with_different_curves_fail()
|
D | keystore2_client_rsa_key_tests.rs | 83 alias: Option<String>, in create_rsa_key_and_operation() 89 key_generations::generate_rsa_key(sec_level, domain, nspace, alias, key_params, None)?; in create_rsa_key_and_operation() 113 alias: &str, in perform_rsa_sign_key_op_success() 123 Some(alias.to_string()), in perform_rsa_sign_key_op_success() 146 delete_app_key(&keystore2, alias).unwrap(); in perform_rsa_sign_key_op_success() 151 fn perform_rsa_sign_key_op_failure(digest: Digest, alias: &str, padding: PaddingMode) { in perform_rsa_sign_key_op_failure() 159 Some(alias.to_string()), in perform_rsa_sign_key_op_failure() 179 delete_app_key(&keystore2, alias).unwrap(); in perform_rsa_sign_key_op_failure() 186 alias: &str, in create_rsa_encrypt_decrypt_key_op_success() 197 Some(alias.to_string()), in create_rsa_encrypt_decrypt_key_op_success() [all …]
|
D | keystore2_client_test_utils.rs | 98 alias: Option<String>, in generate_ec_key_and_grant_to_users() 103 key_generations::generate_ec_p256_signing_key(sec_level, Domain::APP, -1, alias, None)?; in generate_ec_key_and_grant_to_users() 124 alias: Option<String>, in create_signing_operation() 130 key_generations::generate_ec_p256_signing_key(&sec_level, domain, nspace, alias, None) in create_signing_operation() 253 alias: Option<String>, in execute_op_run_as_child() 266 alias, in execute_op_run_as_child() 369 alias: &str, in delete_app_key() 374 alias: Some(alias.to_string()), in delete_app_key()
|
/system/security/keystore2/legacykeystore/ |
D | lib.rs | 125 fn put(&mut self, caller_uid: u32, alias: &str, entry: &[u8]) -> Result<()> { in put() 129 params![caller_uid, alias, entry,], in put() 136 fn get(&mut self, caller_uid: u32, alias: &str) -> Result<Option<Vec<u8>>> { in get() 140 params![caller_uid, alias], in get() 148 fn remove(&mut self, caller_uid: u32, alias: &str) -> Result<bool> { in remove() 152 params![caller_uid, alias], in remove() 318 fn get(&self, alias: &str, uid: i32) -> Result<Vec<u8>> { in get() 322 if let Some(entry) = db.get(uid, alias).context("In get: Trying to load entry from DB.")? { in get() 325 if self.get_legacy(uid, alias).context("In get: Trying to import legacy blob.")? { in get() 328 db.get(uid, alias).context("In get: Trying to load entry from DB.")? in get() [all …]
|
/system/hardware/interfaces/wifi/keystore/1.0/default/ |
D | keystore.cpp | 36 ks2::KeyDescriptor mkKeyDescriptor(const std::string& alias) { in mkKeyDescriptor() argument 39 if (android::base::StartsWith(alias, keystore2_grant_id_prefix)) { in mkKeyDescriptor() 40 std::stringstream s(alias.substr(keystore2_grant_id_prefix.size())); in mkKeyDescriptor() 44 LOG(ERROR) << AT << "Couldn't parse grant name: " << alias; in mkKeyDescriptor() 49 .alias = std::nullopt, in mkKeyDescriptor() 56 .alias = alias, in mkKeyDescriptor() 115 std::string alias = key.c_str(); in keyStore2GetCert() local 116 if (android::base::StartsWith(alias, "CACERT_")) { in keyStore2GetCert() 117 alias = alias.substr(7); in keyStore2GetCert() 119 } else if (android::base::StartsWith(alias, "USRCERT_")) { in keyStore2GetCert() [all …]
|
/system/security/keystore2/test_utils/ |
D | key_generations.rs | 337 alias: Option<String>, in generate_ec_p256_signing_key() 355 &KeyDescriptor { domain, nspace, alias, blob: None }, in generate_ec_p256_signing_key() 381 alias: Option<String>, in generate_ec_key() 394 &KeyDescriptor { domain, nspace, alias, blob: None }, in generate_ec_key() 420 alias: Option<String>, in generate_rsa_key() 450 &KeyDescriptor { domain, nspace, alias, blob: None }, in generate_rsa_key() 481 alias: &str, in generate_sym_key() 503 alias: Some(alias.to_string()), in generate_sym_key() 523 alias: &str, in generate_hmac_key() 541 alias: Some(alias.to_string()), in generate_hmac_key() [all …]
|
/system/security/keystore2/aidl/android/security/legacykeystore/ |
D | ILegacyKeystore.aidl | 65 byte[] get(in String alias, int uid); in get() argument 79 void put(in String alias, int uid, in byte[] blob); in put() argument 88 void remove(in String alias, int uid); in remove() argument
|
/system/security/keystore2/src/ |
D | legacy_importer.rs | 65 alias: String, field 69 fn new(uid: u32, alias: String) -> Self { in new() 70 Self { uid, alias } in new() 210 .map(|alias| KeyDescriptor { in list_uid() 213 alias: Some(alias), in list_uid() 311 KeyDescriptor { domain: Domain::APP, alias: Some(_), .. } => caller_uid, in with_try_import() 312 KeyDescriptor { domain: Domain::SELINUX, nspace, alias: Some(_), .. } => { in with_try_import() 442 alias: &str, in get_super_key_id_check_unlockable_or_delete() 468 .remove_keystore_entry(uid, alias) in get_super_key_id_check_unlockable_or_delete() 481 alias: &str, in characteristics_file_to_cache() [all …]
|
D | database.rs | 1269 alias: &str, in key_exists() 1276 KeyDescriptor { domain, nspace, alias: Some(alias.to_string()), blob: None }; in key_exists() 1312 key_type.alias, in store_super_key() 1350 alias: Some(key_type.alias.into()), in load_super_key() 1378 alias: &str, in get_or_create_key_with() 1401 .query(params![KeyType::Super, domain.0, namespace, alias, KeyLifeCycle::Live]) in get_or_create_key_with() 1430 alias, in get_or_create_key_with() 2110 alias: &str, in rebind_alias() 2127 params![KeyLifeCycle::Unreferenced, alias, domain.0 as u32, namespace, key_type], in rebind_alias() 2136 alias, in rebind_alias() [all …]
|
D | utils.rs | 278 if let Some(alias) = &kd.alias { in merge_and_filter_key_entry_lists() 279 alias.as_str() > past_alias in merge_and_filter_key_entry_lists() 308 if let Some(alias) = &kd.alias { in estimate_safe_amount_to_return() 309 returned_bytes += 4 + alias.len(); in estimate_safe_amount_to_return() 474 alias: Some(key_alias.to_string()), in create_key_descriptors_from_aliases() 485 if let Some(alias) = &kd.alias { in aliases_from_key_descriptors() 486 String::from(alias) in aliases_from_key_descriptors()
|
D | legacy_blob.rs | 691 alias: &str, in read_characteristics_file() 695 let blob = Self::read_generic_blob(&self.make_chr_filename(uid, alias, prefix)) in read_characteristics_file() 756 fn read_km_blob_file(&self, uid: u32, alias: &str) -> Result<Option<(Blob, String)>> { in read_km_blob_file() 762 Self::read_generic_blob(&self.make_blob_filename(uid, alias, prefix)) in read_km_blob_file() 806 alias: &str, in read_legacy_keystore_entry() 812 let path = match self.make_legacy_keystore_entry_filename(uid, alias) { in read_legacy_keystore_entry() 830 pub fn remove_legacy_keystore_entry(&self, uid: u32, alias: &str) -> Result<bool> { in remove_legacy_keystore_entry() 831 let path = match self.make_legacy_keystore_entry_filename(uid, alias) { in remove_legacy_keystore_entry() 902 if let Some(alias) = Self::extract_legacy_alias(&v[sep_pos + 1..]) { in list_legacy_keystore_entries_for_user() 904 entry.insert(alias); in list_legacy_keystore_entries_for_user() [all …]
|
/system/core/init/ |
D | selabel.cpp | 64 for (const auto& alias : aliases) { in SelabelLookupFileContextBestMatch() local 65 c_aliases.emplace_back(alias.c_str()); in SelabelLookupFileContextBestMatch()
|
/system/security/keystore-engine/ |
D | keystore2_engine.cpp | 374 std::string alias = key_id; in EVP_PKEY_from_keystore2() local 375 if (android::base::StartsWith(alias, "USRPKEY_")) { in EVP_PKEY_from_keystore2() 377 alias = alias.substr(8); in EVP_PKEY_from_keystore2() 383 .alias = alias, in EVP_PKEY_from_keystore2() 389 if (android::base::StartsWith(alias, keystore2_grant_id_prefix)) { in EVP_PKEY_from_keystore2() 390 std::stringstream s(alias.substr(keystore2_grant_id_prefix.size())); in EVP_PKEY_from_keystore2() 393 descriptor.alias = std::nullopt; in EVP_PKEY_from_keystore2()
|
/system/hardware/interfaces/wifi/keystore/1.0/default/test/ |
D | WifiLegacyKeystoreIntegrationTest.cpp | 148 static bool LegacyKeystoreRemove(const std::string& alias, in LegacyKeystoreRemove() argument 158 auto rc = legacyKeystore->remove(alias, uid); in LegacyKeystoreRemove() 166 static bool LegacyKeystorePut(const std::string& alias, const std::vector<uint8_t>& blob, in LegacyKeystorePut() argument 176 auto rc = legacyKeystore->put(alias, uid, blob); in LegacyKeystorePut() 182 const std::string& alias, int uid = lks::ILegacyKeystore::UID_SELF) { in LegacyKeystoreGet() argument 192 auto rc = legacyKeystore->get(alias, uid, &*blob); in LegacyKeystoreGet()
|