From 7a19ebea100da3edf37f99390279f23a90cc9809 Mon Sep 17 00:00:00 2001 From: zfeixiang Date: Mon, 14 Oct 2024 16:43:25 +0800 Subject: [PATCH] =?UTF-8?q?=E9=95=9C=E5=83=8F=E5=BA=94=E7=94=A8=E5=B8=82?= =?UTF-8?q?=E5=9C=BA=E9=A2=84=E7=BD=AE=E8=AF=81=E4=B9=A6=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=98=8E=E7=A1=AE=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zfeixiang --- services/key_enable/BUILD.gn | 6 +++--- ...ed_cert_path_test.json => trusted_cert_path_mirror.json} | 0 services/key_enable/src/cert_utils.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) rename services/key_enable/config/{trusted_cert_path_test.json => trusted_cert_path_mirror.json} (100%) diff --git a/services/key_enable/BUILD.gn b/services/key_enable/BUILD.gn index 31887f5..e58f2d4 100644 --- a/services/key_enable/BUILD.gn +++ b/services/key_enable/BUILD.gn @@ -93,8 +93,8 @@ ohos_prebuilt_etc("trusted_cert_path") { relative_install_dir = "security" } -ohos_prebuilt_etc("trusted_cert_path_test") { - source = "config/trusted_cert_path_test.json" +ohos_prebuilt_etc("trusted_cert_path_mirror") { + source = "config/trusted_cert_path_mirror.json" part_name = "code_signature" subsystem_name = "security" relative_install_dir = "security" @@ -125,7 +125,7 @@ group("key_enable_targets") { deps += [ ":key_enable.cfg", ":trusted_cert_path", - ":trusted_cert_path_test", + ":trusted_cert_path_mirror", ] if (!use_clang_coverage) { deps += [ diff --git a/services/key_enable/config/trusted_cert_path_test.json b/services/key_enable/config/trusted_cert_path_mirror.json similarity index 100% rename from services/key_enable/config/trusted_cert_path_test.json rename to services/key_enable/config/trusted_cert_path_mirror.json diff --git a/services/key_enable/src/cert_utils.rs b/services/key_enable/src/cert_utils.rs index 455afe4..f7ed50e 100644 --- a/services/key_enable/src/cert_utils.rs +++ b/services/key_enable/src/cert_utils.rs @@ -24,7 +24,7 @@ const TRUSTED_ROOT_CERT_TEST: &str = "/system/etc/security/trusted_root_ca_test. const ALLOWED_ROOT_CERT_MEMBER_NAMES_TEST: &[&str] = &["C=CN, O=Huawei, OU=Huawei CBG, CN=Huawei CBG Root CA G2 Test"]; const TRUSTED_CERT_PATH: &str = "/system/etc/security/trusted_cert_path.json"; -const TRUSTED_CERT_PATH_TEST: &str = "/system/etc/security/trusted_cert_path_test.json"; +const TRUSTED_CERT_PATH_MIRROR: &str = "/system/etc/security/trusted_cert_path_mirror.json"; extern "C" { fn IsRdDevice() -> bool; @@ -54,7 +54,7 @@ pub fn get_cert_path() -> TrustCertPath { let mut cert_paths = TrustCertPath::new(); cert_paths.load_cert_path_from_json_file(TRUSTED_CERT_PATH); if env!("code_signature_debuggable") == "on" || unsafe { IsRdDevice() } { - cert_paths.load_cert_path_from_json_file(TRUSTED_CERT_PATH_TEST); + cert_paths.load_cert_path_from_json_file(TRUSTED_CERT_PATH_MIRROR); } cert_paths } -- Gitee