# Copyright (c) 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("//build/ohos.gni")
config("libcertificate_framework_common_static_config") {
include_dirs = [
"//base/security/certificate_framework/interfaces/inner_api/certificate",
"//base/security/certificate_framework/interfaces/inner_api/common",
"//base/security/certificate_framework/interfaces/inner_api/include",
"//base/security/certificate_framework/frameworks/common/v1.0/inc",
"//commonlibrary/c_utils/base/include",
"//base/hiviewdfx/hilog/interfaces/native/innerkits/include",
"//third_party/bounds_checking_function/include",
"//base/security/crypto_framework/interfaces/inner_api/common",
"//base/security/crypto_framework/interfaces/inner_api/key",
]
}
ohos_source_set("libcertificate_framework_common_static") {
branch_protector_ret = "pac_ret"
subsystem_name = "plugins"
part_name = "security_cert"
public_configs = [ ":libcertificate_framework_common_static_config" ]
configs = [ "../../config/build:coverage_flag" ]
sources = [
"//base/security/certificate_framework/frameworks/common/v1.0/src/cf_blob.c",
"//base/security/certificate_framework/frameworks/common/v1.0/src/cf_check.c",
"//base/security/certificate_framework/frameworks/common/v1.0/src/cf_memory.c",
"//base/security/certificate_framework/frameworks/common/v1.0/src/cf_object_base.c",
"//base/security/certificate_framework/frameworks/common/v1.0/src/utils.c",
]
cflags = [
"-DHILOG_ENABLE",
"-fPIC",
"-Wall",
]
external_deps = [
"c_utils:utils",
"hilog:libhilog",
]
}