diff --git a/common/BUILD.gn b/common/BUILD.gn index 39cb861fea52cd9d08557e06f87d9eeed2117ae3..8bd102d896f357bac9e9ebec82c38d1f5a8ec6f5 100644 --- a/common/BUILD.gn +++ b/common/BUILD.gn @@ -25,6 +25,15 @@ ohos_static_library("crypto_plugin_common") { sources = crypto_framwork_common_files + if (os_level == "standard") { + sanitize = { + cfi = true + cfi_cross_dso = true + debug = true + blocklist = "//base/security/crypto_framework/cfi_blocklist.txt" + } + } + defines = [ "HILOG_ENABLE" ] cflags = [ "-DHILOG_ENABLE", diff --git a/frameworks/BUILD.gn b/frameworks/BUILD.gn index 3d7acb9f34f3c12fc2d720639c0d9300cda33e64..9f54cf9d2eacc51fbf4e4769eeeda662bec5ae30 100644 --- a/frameworks/BUILD.gn +++ b/frameworks/BUILD.gn @@ -40,7 +40,8 @@ ohos_shared_library("crypto_framework_lib") { if (os_level == "standard") { sanitize = { cfi = true - debug = false + cfi_cross_dso = true + debug = true blocklist = "//base/security/crypto_framework/cfi_blocklist.txt" } } diff --git a/frameworks/js/napi/crypto/BUILD.gn b/frameworks/js/napi/crypto/BUILD.gn index 1ea4d3ed2ed4e32d57aae8b0625d9fed192308dd..adafb1ea1abdb826dc8eb7e986df28747c8bfa9e 100644 --- a/frameworks/js/napi/crypto/BUILD.gn +++ b/frameworks/js/napi/crypto/BUILD.gn @@ -9,7 +9,7 @@ # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and -# limitations under the License. +# limitations under the License. import("//base/security/crypto_framework/common/common.gni") import("//base/security/crypto_framework/frameworks/frameworks.gni") @@ -30,7 +30,8 @@ ohos_shared_library("cryptoframework_napi") { if (os_level == "standard") { sanitize = { cfi = true - debug = false + cfi_cross_dso = true + debug = true blocklist = "//base/security/crypto_framework/cfi_blocklist.txt" } } diff --git a/plugin/BUILD.gn b/plugin/BUILD.gn index d6979b59cd268f6aefd9f88a533761637c40747b..ba25eaf7a8fe86719035762b4f0859860ee7edad 100644 --- a/plugin/BUILD.gn +++ b/plugin/BUILD.gn @@ -41,7 +41,8 @@ ohos_shared_library("crypto_openssl_plugin_lib") { if (os_level == "standard") { sanitize = { cfi = true - debug = false + cfi_cross_dso = true + debug = true } }