1# Copyright (C) 2024 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//base/security/crypto_framework/common/common.gni") 15import("//base/security/crypto_framework/frameworks/frameworks.gni") 16import("//build/ohos.gni") 17 18ohos_shared_library("ohcrypto") { 19 branch_protector_ret = "pac_ret" 20 if (os_level == "standard") { 21 sanitize = { 22 cfi = true 23 cfi_cross_dso = true 24 debug = false 25 } 26 } 27 28 cflags = [ 29 "-DHILOG_ENABLE", 30 "-fPIC", 31 "-Wall", 32 ] 33 34 include_dirs = [ 35 "../../interfaces/kits/native/include", 36 "include", 37 ] 38 include_dirs += framework_inc_path 39 40 sources = [ 41 "src/asym_key.c", 42 "src/crypto_common.c", 43 "src/digest.c", 44 "src/native_common.c", 45 "src/signature.c", 46 "src/sym_cipher.c", 47 "src/sym_key.c", 48 ] 49 50 deps = [ "${framework_path}:crypto_framework_lib" ] 51 52 external_deps = [ "hilog:libhilog" ] 53 54 subsystem_name = "security" 55 output_extension = "so" 56 innerapi_tags = [ "ndk" ] 57 part_name = "crypto_framework" 58} 59