# Copyright (C) 2022-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. # 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") { branch_protector_ret = "pac_ret" subsystem_name = "security" part_name = "crypto_framework" relative_install_dir = "module/security" include_dirs = [ "//base/security/crypto_framework/frameworks/js/napi/crypto/inc" ] include_dirs += framework_inc_path if (os_level == "standard") { sanitize = { cfi = true cfi_cross_dso = true debug = false } } cflags = [ "-DHILOG_ENABLE", "-fPIC", "-g3", ] sources = [ "src/napi_asy_key_generator.cpp", "src/napi_asy_key_spec_generator.cpp", "src/napi_cipher.cpp", "src/napi_dh_key_util.cpp", "src/napi_ecc_key_util.cpp", "src/napi_init.cpp", "src/napi_kdf.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_sm2_crypto_util.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" ] external_deps = [ "bounds_checking_function:libsec_shared", "hilog:libhilog", "napi:ace_napi", ] }