From b604bbf210362436bdc681ce8b0b3f97ead04fd4 Mon Sep 17 00:00:00 2001 From: cbl Date: Thu, 28 Mar 2024 14:33:57 +0800 Subject: [PATCH] pc trusts Application Release Signed-off-by: cbl --- bundle.json | 3 +- code_signature.gni | 1 + services/key_enable/BUILD.gn | 6 +- .../{ => dev}/trusted_cert_path.json | 0 .../release/trusted_cert_path.json | 104 ++++++++++++++++++ 5 files changed, 112 insertions(+), 2 deletions(-) rename services/key_enable/config/openharmony/{ => dev}/trusted_cert_path.json (100%) create mode 100644 services/key_enable/config/openharmony/release/trusted_cert_path.json diff --git a/bundle.json b/bundle.json index 08cfb68..3ed3986 100644 --- a/bundle.json +++ b/bundle.json @@ -18,7 +18,8 @@ ], "features": [ "code_signature_support_oh_code_sign", - "code_signature_enable_xpm_mode" + "code_signature_enable_xpm_mode", + "code_signature_support_oh_release_app" ], "adapted_system_type": [ "standard" ], "rom": "1024KB", diff --git a/code_signature.gni b/code_signature.gni index eabe8ea..c14b176 100644 --- a/code_signature.gni +++ b/code_signature.gni @@ -23,4 +23,5 @@ declare_args() { code_signature_support_openharmony_ca = true code_signature_support_oh_code_sign = false code_signature_enable_xpm_mode = false + code_signature_support_oh_release_app = true } diff --git a/services/key_enable/BUILD.gn b/services/key_enable/BUILD.gn index 2978094..324e61a 100644 --- a/services/key_enable/BUILD.gn +++ b/services/key_enable/BUILD.gn @@ -61,7 +61,11 @@ ohos_rust_shared_ffi("key_enable_lib") { ohos_prebuilt_etc("trusted_cert_path") { if (code_signature_support_openharmony_ca) { - source = "config/openharmony/trusted_cert_path.json" + if (code_signature_support_oh_release_app) { + source = "config/openharmony/release/trusted_cert_path.json" + } else { + source = "config/openharmony/dev/trusted_cert_path.json" + } } else { source = "config/trusted_cert_path.json" } diff --git a/services/key_enable/config/openharmony/trusted_cert_path.json b/services/key_enable/config/openharmony/dev/trusted_cert_path.json similarity index 100% rename from services/key_enable/config/openharmony/trusted_cert_path.json rename to services/key_enable/config/openharmony/dev/trusted_cert_path.json diff --git a/services/key_enable/config/openharmony/release/trusted_cert_path.json b/services/key_enable/config/openharmony/release/trusted_cert_path.json new file mode 100644 index 0000000..fd49474 --- /dev/null +++ b/services/key_enable/config/openharmony/release/trusted_cert_path.json @@ -0,0 +1,104 @@ +{ + "trust-profile-path":[ + { + "mode":"developer", + "type":"", + "subject":"C=CN, O=Huawei, OU=HOS AppGallery, CN=HOS Profile Management", + "issuer":"C=CN, O=Huawei, OU=Huawei CBG, CN=Huawei CBG Software Signing Service CA", + "max-certs-path":3 + }, + { + "mode":"developer", + "type":"", + "subject":"C=CN, O=Huawei CBG, OU=HOS Development Team, CN=HOS Application Provision Profile Release", + "issuer":"C=CN, O=Huawei, OU=Huawei CBG, CN=Huawei CBG Software Signing Service CA", + "max-certs-path":3 + }, + { + "mode":"debug", + "type":"", + "subject":"C=CN, O=Huawei, OU=HOS AppGallery, CN=HOS Profile Management Debug", + "issuer":"C=CN, O=Huawei, OU=Huawei CBG, CN=Huawei CBG Software Signing Service CA", + "max-certs-path":3 + }, + { + "mode":"debug", + "type":"", + "subject":"C=CN, O=OpenHarmony, OU=OpenHarmony Team, CN=OpenHarmony Application Profile Debug", + "issuer":"C=CN, O=OpenHarmony, OU=OpenHarmony Team, CN=OpenHarmony Application CA", + "max-certs-path":3 + }, + { + "mode":"debug", + "type":"", + "subject":"C=CN, O=Huawei CBG, OU=HOS Development Team, CN=HOS Application Provision Profile Release_Debug", + "issuer":"C=CN, O=Huawei, OU=Huawei CBG, CN=Huawei CBG Software Signing Service CA", + "max-certs-path":3 + } + ], + "trust-cert-path":[ + { + "mode":"Release", + "type":"Authed", + "subject":"C=CN, O=Huawei, OU=HOS AppGallery, CN=HOS AppGallery Application Release", + "issuer":"C=CN, O=Huawei, OU=Huawei CBG, CN=Huawei CBG Software Signing Service CA", + "max-certs-path":3 + }, + { + "mode":"Release", + "type":"Authed", + "subject":"ALL", + "issuer":"C=CN, O=Huawei, OU=Huawei CBG, CN=Huawei CBG Software Signing Service CA", + "max-certs-path":3 + }, + { + "mode":"Release", + "type":"Block", + "subject":"C=CN, O=Huawei, OU=Huawei CBG, CN=HOS Application Provision Debug V2", + "issuer":"C=CN, O=Huawei, OU=Huawei CBG, CN=Huawei CBG Software Signing Service CA", + "max-certs-path":3 + }, + { + "mode":"Release", + "type":"Block", + "subject":"C=CN, O=Huawei, OU=Huawei CBG, CN=DevEcoTesting Release", + "issuer":"C=CN, O=Huawei, OU=Huawei CBG, CN=Huawei CBG Software Signing Service CA", + "max-certs-path":3 + }, + { + "mode":"Release", + "type":"Block", + "subject":"C=CN, O=Huawei, OU=Huawei CBG, CN=HarmonyOS SDK debug tools", + "issuer":"C=CN, O=Huawei, OU=Huawei CBG, CN=Huawei CBG Software Signing Service CA", + "max-certs-path":3 + }, + { + "mode":"Dev", + "type":"Platform", + "subject":"C=CN, O=Huawei, OU=Huawei CBG, CN=HOS Application Provision Debug V2", + "issuer":"C=CN, O=Huawei, OU=Huawei CBG, CN=Huawei CBG Software Signing Service CA", + "max-certs-path":3 + }, + { + "mode":"Dev", + "type":"Platform", + "subject":"C=CN, O=Huawei, OU=Huawei CBG, CN=DevEcoTesting Release", + "issuer":"C=CN, O=Huawei, OU=Huawei CBG, CN=Huawei CBG Software Signing Service CA", + "max-certs-path":3 + }, + { + "mode":"Dev", + "type":"Platform", + "subject":"C=CN, O=Huawei, OU=Huawei CBG, CN=HarmonyOS SDK debug tools", + "issuer":"C=CN, O=Huawei, OU=Huawei CBG, CN=Huawei CBG Software Signing Service CA", + "max-certs-path":3 + }, + { + "mode":"Release", + "type":"Authed", + "subject":"C=CN, O=OpenHarmony, OU=OpenHarmony Team, CN=OpenHarmony Application Release", + "issuer":"C=CN, O=OpenHarmony, OU=OpenHarmony Team, CN=OpenHarmony Application CA", + "max-certs-path":3 + } + ] +} -- Gitee