From c2574fa08db1e5543c9671bc06c52d32711d1df8 Mon Sep 17 00:00:00 2001 From: lichao Date: Tue, 20 Feb 2024 15:19:13 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=94=AF=E6=8C=81=E9=83=A8=E4=BB=B6?= =?UTF-8?q?=E7=8B=AC=E7=AB=8B=E7=BC=96=E8=AF=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lichao --- BUILD.gn | 12 +++++++----- bundle.json | 8 ++++++-- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index af83609ad..335b186c7 100755 --- a/BUILD.gn +++ b/BUILD.gn @@ -46,7 +46,7 @@ if (defined(ohos_lite)) { config("mbedtls_config") { include_dirs = MBEDTLS_INLCUDE_DIRS - include_dirs += [ "//third_party/bounds_checking_function/include" ] + if (ohos_kernel_type == "liteos_m") { defines += [ "__unix__", @@ -61,9 +61,10 @@ if (defined(ohos_lite)) { } } - lite_library("mbedtls_shared") { + group("mbedtls") { target_type = "shared_library" public_configs = [ ":mbedtls_config" ] + external_deps = [ "bounds_checking_function:libsec_static" ] output_name = "mbedtls" sources = MBEDTLS_SOURCES } @@ -71,11 +72,12 @@ if (defined(ohos_lite)) { lite_library("mbedtls_static") { target_type = "static_library" public_configs = [ ":mbedtls_config" ] + external_deps = [ "bounds_checking_function:libsec_static" ] output_name = "mbedtls" sources = MBEDTLS_SOURCES } - group("mbedtls") { + ohos_shared_library("mbedtls") { if (ohos_kernel_type == "liteos_m") { if (ohos_security_huks_mbedtls_porting_path != "") { public_deps = [ ohos_security_huks_mbedtls_porting_path ] @@ -115,7 +117,7 @@ if (defined(ohos_lite)) { ] } - static_library("mbedtls_gt") { + ohos_shared_library("mbedtls_gt") { sources = MBEDTLS_SOURCES output_name = "mbedtls_gt" public_configs = [ ":mbedtls_profile_test" ] @@ -125,7 +127,6 @@ if (defined(ohos_lite)) { import("//build/ohos.gni") config("mbedtls_config") { include_dirs = MBEDTLS_INLCUDE_DIRS - include_dirs += [ "//third_party/bounds_checking_function/include" ] } ohos_shared_library("mbedtls_shared") { @@ -136,6 +137,7 @@ if (defined(ohos_lite)) { "platformsdk_indirect", "sasdk", ] + external_deps = [ "bounds_checking_function:libsec_static" ] part_name = "mbedtls" sources = MBEDTLS_SOURCES install_images = [ diff --git a/bundle.json b/bundle.json index 272885909..f7e5ad76d 100755 --- a/bundle.json +++ b/bundle.json @@ -22,8 +22,12 @@ "rom": "", "ram": "", "deps": { - "components": [], - "third_party": [] + "components": [ + "bounds_checking_function" + ], + "third_party": [ + "bounds_checking_function" + ] }, "build": { "sub_component": [], -- Gitee From c3073e6ebcf112d145caa0715d0dbf37107ee55a Mon Sep 17 00:00:00 2001 From: lichao Date: Sun, 25 Feb 2024 14:19:58 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=94=AF=E6=8C=81=E9=83=A8=E4=BB=B6?= =?UTF-8?q?=E7=8B=AC=E7=AB=8B=E7=BC=96=E8=AF=91=E4=BF=AE=E6=94=B9-?= =?UTF-8?q?=E8=BF=98=E5=8E=9Fmbedtls=E4=BF=AE=E6=94=B9=EF=BC=8C=E9=81=BF?= =?UTF-8?q?=E5=85=8Dhispark=5Ftaurus=5FLiteOS=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lichao --- BUILD.gn | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 335b186c7..8dc60de93 100755 --- a/BUILD.gn +++ b/BUILD.gn @@ -61,7 +61,7 @@ if (defined(ohos_lite)) { } } - group("mbedtls") { + lite_library("mbedtls_shared") { target_type = "shared_library" public_configs = [ ":mbedtls_config" ] external_deps = [ "bounds_checking_function:libsec_static" ] @@ -77,7 +77,7 @@ if (defined(ohos_lite)) { sources = MBEDTLS_SOURCES } - ohos_shared_library("mbedtls") { + group("mbedtls") { if (ohos_kernel_type == "liteos_m") { if (ohos_security_huks_mbedtls_porting_path != "") { public_deps = [ ohos_security_huks_mbedtls_porting_path ] @@ -117,7 +117,7 @@ if (defined(ohos_lite)) { ] } - ohos_shared_library("mbedtls_gt") { + static_library("mbedtls_gt") { sources = MBEDTLS_SOURCES output_name = "mbedtls_gt" public_configs = [ ":mbedtls_profile_test" ] -- Gitee From 0417e667fb98e29e95327484483febba9eba2935 Mon Sep 17 00:00:00 2001 From: lichao Date: Sun, 25 Feb 2024 20:44:18 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=94=AF=E6=8C=81=E9=83=A8=E4=BB=B6?= =?UTF-8?q?=E7=8B=AC=E7=AB=8B=E7=BC=96=E8=AF=91=E4=BF=AE=E6=94=B9-?= =?UTF-8?q?=E6=8C=89gn=20format=E4=BF=AE=E6=94=B9=EF=BC=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0inner=5Fapi=20mbedtls=5Fstatic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lichao --- BUILD.gn | 2 +- bundle.json | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/BUILD.gn b/BUILD.gn index 8dc60de93..0f7bd4de6 100755 --- a/BUILD.gn +++ b/BUILD.gn @@ -46,7 +46,7 @@ if (defined(ohos_lite)) { config("mbedtls_config") { include_dirs = MBEDTLS_INLCUDE_DIRS - + if (ohos_kernel_type == "liteos_m") { defines += [ "__unix__", diff --git a/bundle.json b/bundle.json index f7e5ad76d..2a5d25afe 100755 --- a/bundle.json +++ b/bundle.json @@ -42,6 +42,17 @@ ] }, "name" : "//third_party/mbedtls:mbedtls_shared" + }, + { + "header" : { + "header_base": "//third_party/mbedtls/include", + "header_files": [ + "mbedtls/md.h", + "mbedtls/rsa.h", + "mbedtls/x509.h" + ] + }, + "name" : "//third_party/mbedtls:mbedtls_static" } ], "test": [] -- Gitee From 64a9a28aaaabc4d3a4f33921b0c402e3540fa5d8 Mon Sep 17 00:00:00 2001 From: lichao Date: Sun, 25 Feb 2024 21:27:38 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=94=AF=E6=8C=81=E9=83=A8=E4=BB=B6?= =?UTF-8?q?=E7=8B=AC=E7=AB=8B=E7=BC=96=E8=AF=91=E4=BF=AE=E6=94=B9-?= =?UTF-8?q?=E5=B0=9D=E8=AF=95=E4=BF=AE=E5=A4=8D=E9=97=A8=E7=A6=81hispark?= =?UTF-8?q?=5Fpegasus=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lichao --- BUILD.gn | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 0f7bd4de6..2cb1ebecd 100755 --- a/BUILD.gn +++ b/BUILD.gn @@ -46,7 +46,7 @@ if (defined(ohos_lite)) { config("mbedtls_config") { include_dirs = MBEDTLS_INLCUDE_DIRS - + include_dirs += [ "//third_party/bounds_checking_function/include" ] if (ohos_kernel_type == "liteos_m") { defines += [ "__unix__", @@ -64,7 +64,6 @@ if (defined(ohos_lite)) { lite_library("mbedtls_shared") { target_type = "shared_library" public_configs = [ ":mbedtls_config" ] - external_deps = [ "bounds_checking_function:libsec_static" ] output_name = "mbedtls" sources = MBEDTLS_SOURCES } @@ -72,7 +71,6 @@ if (defined(ohos_lite)) { lite_library("mbedtls_static") { target_type = "static_library" public_configs = [ ":mbedtls_config" ] - external_deps = [ "bounds_checking_function:libsec_static" ] output_name = "mbedtls" sources = MBEDTLS_SOURCES } -- Gitee