# Copyright (C) 2022 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. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # 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. import("//base/security/crypto_framework/common/common.gni") import("//base/security/crypto_framework/frameworks/frameworks.gni") import("//build/ohos.gni") ohos_shared_library("cryptoframework_napi") { subsystem_name = "security" part_name = "crypto_framework" relative_install_dir = "module/security" include_dirs = [ "//base/security/crypto_framework/interfaces/kits/js", "//third_party/bounds_checking_function/include", "//commonlibrary/c_utils/base/include", "//base/security/crypto_framework/frameworks/js/napi/crypto/inc", "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", ] include_dirs += framework_inc_path if (os_level == "standard") { sanitize = { cfi = true debug = false blocklist = "//base/security/crypto_framework/cfi_blocklist.txt" } } cflags = [ "-DHILOG_ENABLE", "-fPIC", "-g3", ] sources = [ "src/napi_asy_key_generator.cpp", "src/napi_cipher.cpp", "src/napi_init.cpp", "src/napi_key.cpp", "src/napi_key_agreement.cpp", "src/napi_key_pair.cpp", "src/napi_mac.cpp", "src/napi_md.cpp", "src/napi_pri_key.cpp", "src/napi_pub_key.cpp", "src/napi_rand.cpp", "src/napi_sign.cpp", "src/napi_sym_key.cpp", "src/napi_sym_key_generator.cpp", "src/napi_utils.cpp", "src/napi_verify.cpp", ] deps = [ "//base/security/crypto_framework/frameworks:crypto_framework_lib", "//third_party/bounds_checking_function:libsec_shared", ] external_deps = [ "hiviewdfx_hilog_native:libhilog", "napi:ace_napi", ] }