diff --git a/bundle.json b/bundle.json index 08cfb6817ac9adfb55fea1a4753f9f3795b49ec1..3ed3986aedce0e2f4ef2f0e071663e190fe764ce 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 eabe8eaa9066ca9e4c145f6667ef17be1742b7a7..c14b17632a055ec353431b7ee2126d09d754d239 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 2978094b362c44efa049d4aa0d3940f78cdfaba0..324e61a16e98445b00d2dcbec1a581f2e5e81e9f 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 0000000000000000000000000000000000000000..fd49474bd17a06bc45956467129dc9d933590c78 --- /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 + } + ] +}