From 504c0b9aa839398b851118be6a32dba2f75bfe61 Mon Sep 17 00:00:00 2001 From: lcc Date: Tue, 23 Jul 2024 11:10:31 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9SM4=20CBC=E7=AD=89?= =?UTF-8?q?=E6=A8=A1=E5=BC=8FIV=E5=8F=82=E6=95=B0=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lcc --- .../crypto_operation/cipher/src/cipher_sm4_openssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/openssl_plugin/crypto_operation/cipher/src/cipher_sm4_openssl.c b/plugin/openssl_plugin/crypto_operation/cipher/src/cipher_sm4_openssl.c index 750f2ac..d6e46cd 100644 --- a/plugin/openssl_plugin/crypto_operation/cipher/src/cipher_sm4_openssl.c +++ b/plugin/openssl_plugin/crypto_operation/cipher/src/cipher_sm4_openssl.c @@ -237,7 +237,7 @@ static HcfResult InitCipherData(HcfCipherGeneratorSpi* self, enum HcfCryptoMode case HCF_ALG_MODE_OFB: case HCF_ALG_MODE_CFB: case HCF_ALG_MODE_CFB128: - (void)IsIvParamsValid((HcfIvParamsSpec *)params); + ret = IsIvParamsValid((HcfIvParamsSpec *)params); break; case HCF_ALG_MODE_GCM: ret = InitAadAndTagFromGcmParams(opMode, (HcfGcmParamsSpec *)params, *cipherData); -- Gitee From d6d26a468b265b132593391079d1034a31e441ae Mon Sep 17 00:00:00 2001 From: lcc Date: Sat, 31 Aug 2024 16:29:31 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=AE=97=E6=B3=95=E5=BA=93=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=90=8E=E5=90=91CFI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lcc --- common/BUILD.gn | 1 + frameworks/BUILD.gn | 1 + frameworks/js/napi/crypto/BUILD.gn | 1 + frameworks/native/BUILD.gn | 1 + plugin/BUILD.gn | 1 + 5 files changed, 5 insertions(+) diff --git a/common/BUILD.gn b/common/BUILD.gn index f216116..965bd6c 100644 --- a/common/BUILD.gn +++ b/common/BUILD.gn @@ -15,6 +15,7 @@ import("//base/security/crypto_framework/common/common.gni") import("//build/ohos.gni") ohos_static_library("crypto_plugin_common") { + branch_protector_ret = "pac_ret" subsystem_name = "security" part_name = "crypto_framework" include_dirs = crypto_framwork_common_inc_path diff --git a/frameworks/BUILD.gn b/frameworks/BUILD.gn index 11b713a..c861451 100644 --- a/frameworks/BUILD.gn +++ b/frameworks/BUILD.gn @@ -25,6 +25,7 @@ config("framework_config") { } ohos_shared_library("crypto_framework_lib") { + branch_protector_ret = "pac_ret" subsystem_name = "security" innerapi_tags = [ "platformsdk" ] part_name = "crypto_framework" diff --git a/frameworks/js/napi/crypto/BUILD.gn b/frameworks/js/napi/crypto/BUILD.gn index 4adb38c..5cd0655 100644 --- a/frameworks/js/napi/crypto/BUILD.gn +++ b/frameworks/js/napi/crypto/BUILD.gn @@ -16,6 +16,7 @@ import("//base/security/crypto_framework/frameworks/frameworks.gni") import("//build/ohos.gni") ohos_shared_library("cryptoframework_napi") { + branch_protector_ret = "pac_ret" subsystem_name = "security" part_name = "crypto_framework" relative_install_dir = "module/security" diff --git a/frameworks/native/BUILD.gn b/frameworks/native/BUILD.gn index 3281937..3bf85f5 100644 --- a/frameworks/native/BUILD.gn +++ b/frameworks/native/BUILD.gn @@ -16,6 +16,7 @@ import("//base/security/crypto_framework/frameworks/frameworks.gni") import("//build/ohos.gni") ohos_shared_library("ohcrypto") { + branch_protector_ret = "pac_ret" if (os_level == "standard") { sanitize = { cfi = true diff --git a/plugin/BUILD.gn b/plugin/BUILD.gn index fd6d724..3c3e765 100644 --- a/plugin/BUILD.gn +++ b/plugin/BUILD.gn @@ -26,6 +26,7 @@ config("plugin_config") { } ohos_shared_library("crypto_openssl_plugin_lib") { + branch_protector_ret = "pac_ret" subsystem_name = "security" innerapi_tags = [ "platformsdk_indirect" ] part_name = "crypto_framework" -- Gitee