1# Copyright (C) 2022 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("cert_napi") { 19 subsystem_name = "security" 20 part_name = "crypto_framework" 21 relative_install_dir = "module/security" 22 include_dirs = [ 23 "//base/security/crypto_framework/interfaces/kits/js", 24 "//third_party/bounds_checking_function/include", 25 "//commonlibrary/c_utils/base/include", 26 "//base/security/crypto_framework/frameworks/js/napi/certificate/inc", 27 "//base/security/crypto_framework/frameworks/js/napi/crypto/inc", 28 "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", 29 ] 30 include_dirs += framework_inc_path 31 32 if (os_level == "standard") { 33 sanitize = { 34 cfi = true 35 debug = false 36 blocklist = "//base/security/crypto_framework/cfi_blocklist.txt" 37 } 38 } 39 40 cflags = [ 41 "-DHILOG_ENABLE", 42 "-fPIC", 43 "-g3", 44 ] 45 46 sources = [ 47 "src/napi_cert_chain_validator.cpp", 48 "src/napi_certificate_init.cpp", 49 "src/napi_x509_certificate.cpp", 50 "src/napi_x509_crl.cpp", 51 "src/napi_x509_crl_entry.cpp", 52 ] 53 54 deps = [ 55 "//base/security/crypto_framework/frameworks:crypto_framework_lib", 56 "//base/security/crypto_framework/frameworks/js/napi/crypto:cryptoframework_napi", 57 "//third_party/bounds_checking_function:libsec_shared", 58 ] 59 60 external_deps = [ 61 "hiviewdfx_hilog_native:libhilog", 62 "napi:ace_napi", 63 ] 64} 65