From de41c6038d7ce7cde5e476c37e0b6ef510c6ae3c Mon Sep 17 00:00:00 2001 From: yeyuning Date: Fri, 10 May 2024 12:00:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9Eweb=E8=AF=81=E4=B9=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yeyuning Change-Id: I103ad044cdf7240af7ed61b381902db3441ce34a --- .../not_sign_hap_py_path/trusted_cert_path_test.json | 9 ++++++++- .../config/openharmony/dev/trusted_cert_path.json | 9 ++++++++- .../config/openharmony/release/trusted_cert_path.json | 9 ++++++++- services/key_enable/config/trusted_cert_path.json | 9 ++++++++- services/key_enable/config/trusted_cert_path_test.json | 2 +- services/key_enable/src/cert_path_utils.rs | 10 ++++++++-- 6 files changed, 41 insertions(+), 7 deletions(-) diff --git a/services/key_enable/config/not_sign_hap_py_path/trusted_cert_path_test.json b/services/key_enable/config/not_sign_hap_py_path/trusted_cert_path_test.json index a5c3bb3..52c07dc 100644 --- a/services/key_enable/config/not_sign_hap_py_path/trusted_cert_path_test.json +++ b/services/key_enable/config/not_sign_hap_py_path/trusted_cert_path_test.json @@ -39,7 +39,7 @@ }, { "mode":"Release", - "type":"Authed", + "type":"Platform", "subject":"ALL", "issuer":"C=CN, O=Huawei, OU=Huawei CBG, CN=Huawei CBG Software Signing Service CA Test", "max-certs-path":3 @@ -51,6 +51,13 @@ "issuer":"C=CN, O=OpenHarmony, OU=OpenHarmony Team, CN=OpenHarmony Application CA", "max-certs-path":3 }, + { + "mode":"Release", + "type":"NWeb", + "subject":"C=CN, O=Huawei, OU=Huawei CBG, CN=NWeb", + "issuer":"C=CN, O=Huawei, OU=Huawei CBG, CN=Huawei CBG Software Signing Service CA", + "max-certs-path":3 + }, { "mode":"Release", "type":"Block", diff --git a/services/key_enable/config/openharmony/dev/trusted_cert_path.json b/services/key_enable/config/openharmony/dev/trusted_cert_path.json index 6df369b..0d7d171 100644 --- a/services/key_enable/config/openharmony/dev/trusted_cert_path.json +++ b/services/key_enable/config/openharmony/dev/trusted_cert_path.json @@ -46,11 +46,18 @@ }, { "mode":"Release", - "type":"Authed", + "type":"Platform", "subject":"ALL", "issuer":"C=CN, O=Huawei, OU=Huawei CBG, CN=Huawei CBG Software Signing Service CA", "max-certs-path":3 }, + { + "mode":"Release", + "type":"NWeb", + "subject":"C=CN, O=Huawei, OU=Huawei CBG, CN=NWeb", + "issuer":"C=CN, O=Huawei, OU=Huawei CBG, CN=Huawei CBG Software Signing Service CA", + "max-certs-path":3 + }, { "mode":"Release", "type":"Block", diff --git a/services/key_enable/config/openharmony/release/trusted_cert_path.json b/services/key_enable/config/openharmony/release/trusted_cert_path.json index fd49474..6056f75 100644 --- a/services/key_enable/config/openharmony/release/trusted_cert_path.json +++ b/services/key_enable/config/openharmony/release/trusted_cert_path.json @@ -46,11 +46,18 @@ }, { "mode":"Release", - "type":"Authed", + "type":"Platform", "subject":"ALL", "issuer":"C=CN, O=Huawei, OU=Huawei CBG, CN=Huawei CBG Software Signing Service CA", "max-certs-path":3 }, + { + "mode":"Release", + "type":"NWeb", + "subject":"C=CN, O=Huawei, OU=Huawei CBG, CN=NWeb", + "issuer":"C=CN, O=Huawei, OU=Huawei CBG, CN=Huawei CBG Software Signing Service CA", + "max-certs-path":3 + }, { "mode":"Release", "type":"Block", diff --git a/services/key_enable/config/trusted_cert_path.json b/services/key_enable/config/trusted_cert_path.json index 2b843e2..69aef6f 100644 --- a/services/key_enable/config/trusted_cert_path.json +++ b/services/key_enable/config/trusted_cert_path.json @@ -39,11 +39,18 @@ }, { "mode":"Release", - "type":"Authed", + "type":"Platform", "subject":"ALL", "issuer":"C=CN, O=Huawei, OU=Huawei CBG, CN=Huawei CBG Software Signing Service CA", "max-certs-path":3 }, + { + "mode":"Release", + "type":"NWeb", + "subject":"C=CN, O=Huawei, OU=Huawei CBG, CN=NWeb", + "issuer":"C=CN, O=Huawei, OU=Huawei CBG, CN=Huawei CBG Software Signing Service CA", + "max-certs-path":3 + }, { "mode":"Release", "type":"Block", diff --git a/services/key_enable/config/trusted_cert_path_test.json b/services/key_enable/config/trusted_cert_path_test.json index 0802282..5b6847d 100644 --- a/services/key_enable/config/trusted_cert_path_test.json +++ b/services/key_enable/config/trusted_cert_path_test.json @@ -39,7 +39,7 @@ }, { "mode":"Release", - "type":"Authed", + "type":"Platform", "subject":"ALL", "issuer":"C=CN, O=Huawei, OU=Huawei CBG, CN=Huawei CBG Software Signing Service CA Test", "max-certs-path":3 diff --git a/services/key_enable/src/cert_path_utils.rs b/services/key_enable/src/cert_path_utils.rs index bcab701..6bec3e1 100644 --- a/services/key_enable/src/cert_path_utils.rs +++ b/services/key_enable/src/cert_path_utils.rs @@ -46,6 +46,8 @@ pub enum ReleaseCertPathType { Developer = 0x3, /// release block code Block = 0x4, + /// release NWeb code + NWeb = 0x5, } impl ReleaseCertPathType { @@ -55,6 +57,7 @@ impl ReleaseCertPathType { "Authed" => Ok(ReleaseCertPathType::Authed as u32), "Developer" => Ok(ReleaseCertPathType::Developer as u32), "Block" => Ok(ReleaseCertPathType::Block as u32), + "NWeb" => Ok(ReleaseCertPathType::NWeb as u32), _ => Err(()), } } @@ -67,8 +70,10 @@ pub enum DebugCertPathType { Authed = 0x102, /// debug developer code Developer = 0x103, - /// debug code - Debug = 0x104, + /// debug block code + Block = 0x104, + /// debug debug code + Debug = 0x105, } impl DebugCertPathType { @@ -77,6 +82,7 @@ impl DebugCertPathType { "Platform" => Ok(DebugCertPathType::Platform as u32), "Authed" => Ok(DebugCertPathType::Authed as u32), "Developer" => Ok(DebugCertPathType::Developer as u32), + "Block" => Ok(DebugCertPathType::Block as u32), "Debug" => Ok(DebugCertPathType::Debug as u32), _ => Err(()), } -- Gitee