From b05f1a48e3e06afa70d85e573699ceacdc7a3d2e Mon Sep 17 00:00:00 2001 From: cy Date: Wed, 25 Dec 2024 17:32:00 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=B8=80=E8=87=B4=E6=80=A7=E6=95=B4?= =?UTF-8?q?=E6=94=B9=E3=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: cy --- BUILD.gn | 1 + bundle.json | 1 + include/mbedtls/mbedtls_config.h | 1 + mbedtls.gni | 1 + port/config/config_liteos_a.h | 1 + port/config/config_liteos_m.h | 1 + 6 files changed, 6 insertions(+) diff --git a/BUILD.gn b/BUILD.gn index 29bf71715..46f1579b2 100755 --- a/BUILD.gn +++ b/BUILD.gn @@ -1,4 +1,5 @@ # + # Copyright (c) 2020-2023 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/bundle.json b/bundle.json index 57eec1799..e69bec572 100755 --- a/bundle.json +++ b/bundle.json @@ -1,4 +1,5 @@ { + "name": "@ohos/mbedtls", "description": "An open source, portable, easy to use, readable and flexible SSL library.", "version": "5.0", diff --git a/include/mbedtls/mbedtls_config.h b/include/mbedtls/mbedtls_config.h index 727dd64ae..c324ccd2c 100644 --- a/include/mbedtls/mbedtls_config.h +++ b/include/mbedtls/mbedtls_config.h @@ -1,6 +1,7 @@ /** * \file mbedtls_config.h * + * * \brief Configuration options (set of defines) * * This set of compile-time options may be used to enable diff --git a/mbedtls.gni b/mbedtls.gni index 4cd41d4bf..a265365ad 100644 --- a/mbedtls.gni +++ b/mbedtls.gni @@ -1,5 +1,6 @@ # Copyright (c) 2021-2021 Huawei Device Co., Ltd. All rights reserved. # + # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # diff --git a/port/config/config_liteos_a.h b/port/config/config_liteos_a.h index 34d004ec9..c249d8aef 100755 --- a/port/config/config_liteos_a.h +++ b/port/config/config_liteos_a.h @@ -1,6 +1,7 @@ /** * \file mbedtls_config.h * + * * \brief Configuration options (set of defines) * * This set of compile-time options may be used to enable diff --git a/port/config/config_liteos_m.h b/port/config/config_liteos_m.h index 2a905c671..b3902c6d3 100755 --- a/port/config/config_liteos_m.h +++ b/port/config/config_liteos_m.h @@ -1,6 +1,7 @@ /** * \file mbedtls_config.h * + * * \brief Configuration options (set of defines) * * This set of compile-time options may be used to enable -- Gitee From a4b8942d1ff8eceb2f93f629e76463bde74a9a8e Mon Sep 17 00:00:00 2001 From: cy Date: Thu, 26 Dec 2024 06:41:00 +0000 Subject: [PATCH 2/4] update BUILD.gn. Signed-off-by: cy --- BUILD.gn | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 46f1579b2..b6c982bd4 100755 --- a/BUILD.gn +++ b/BUILD.gn @@ -1,5 +1,4 @@ # - # Copyright (c) 2020-2023 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -126,6 +125,7 @@ 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") { @@ -137,7 +137,6 @@ if (defined(ohos_lite)) { "platformsdk_indirect", "sasdk", ] - external_deps = [ "bounds_checking_function:libsec_static" ] part_name = "mbedtls" sources = MBEDTLS_SOURCES install_images = [ @@ -146,14 +145,6 @@ if (defined(ohos_lite)) { ] } - ohos_static_library("mbedtls_static") { - sources = MBEDTLS_SOURCES - public_configs = [ ":mbedtls_config" ] - external_deps = [ "bounds_checking_function:libsec_static" ] - part_name = "mbedtls" - subsystem_name = "thirdparty" - } - group("mbedtls") { public_deps = [ ":mbedtls_shared" ] } -- Gitee From caa55cad1676d08d6b6f8fcf4c2cddb45ae7dad7 Mon Sep 17 00:00:00 2001 From: cy Date: Thu, 26 Dec 2024 06:44:01 +0000 Subject: [PATCH 3/4] update bundle.json. Signed-off-by: cy --- bundle.json | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/bundle.json b/bundle.json index e69bec572..6c7cbb33f 100755 --- a/bundle.json +++ b/bundle.json @@ -1,5 +1,4 @@ { - "name": "@ohos/mbedtls", "description": "An open source, portable, easy to use, readable and flexible SSL library.", "version": "5.0", @@ -25,12 +24,8 @@ "rom": "", "ram": "", "deps": { - "components": [ - "bounds_checking_function" - ], - "third_party": [ - "bounds_checking_function" - ] + "components": [], + "third_party": [] }, "build": { "sub_component": [], @@ -45,17 +40,6 @@ ] }, "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 a549f90fb52d1e3ac023390d0a66e073adfd64ff Mon Sep 17 00:00:00 2001 From: cy Date: Thu, 26 Dec 2024 06:45:49 +0000 Subject: [PATCH 4/4] update mbedtls.gni. Signed-off-by: cy --- mbedtls.gni | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/mbedtls.gni b/mbedtls.gni index a265365ad..eb80c1943 100644 --- a/mbedtls.gni +++ b/mbedtls.gni @@ -1,6 +1,5 @@ # Copyright (c) 2021-2021 Huawei Device Co., Ltd. All rights reserved. # - # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # @@ -155,6 +154,18 @@ if (product_name == "generic_m55_arm_32_bes_aurora_wear_mini_application") { } else if (product_name == "generic_m55_arm_32_bes_phoinix_wear_mini_application") { MBEDTLS_INLCUDE_DIRS += [ "$MBEDTLSDIR/port/config/compat_lwip" ] +} else if (product_name == + "generic_m55_arm_32_bes_jana_wear_mini_application") { + MBEDTLS_INLCUDE_DIRS += [ "$MBEDTLSDIR/port/config/compat_lwip" ] +} else if (product_name == + "generic_m55_arm_32_bes_janapro_wear_mini_application") { + MBEDTLS_INLCUDE_DIRS += [ "$MBEDTLSDIR/port/config/compat_lwip" ] +} else if (product_name == + "generic_m55_arm_32_bes_vili_wear_mini_application") { + MBEDTLS_INLCUDE_DIRS += [ "$MBEDTLSDIR/port/config/compat_lwip" ] +} else if (product_name == + "generic_m55_arm_32_bes_vilipro_wear_mini_application") { + MBEDTLS_INLCUDE_DIRS += [ "$MBEDTLSDIR/port/config/compat_lwip" ] } else { MBEDTLS_INLCUDE_DIRS += [ "$MBEDTLSDIR/port/config/compat_posix" ] -} +} \ No newline at end of file -- Gitee