# Copyright (c) 2020-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("//build/lite/config/component/lite_component.gni") import("//build/lite/config/hap_pack.gni") if (os_level == "small" || os_level == "mini") { config("app_verify_config") { include_dirs = [ "include", "//third_party/bounds_checking_function/include", "//third_party/cJSON", "//base/security/appverify/interfaces/innerkits/appverify_lite", "//base/security/appverify/interfaces/innerkits/appverify_lite/products/default", "//base/security/appverify/interfaces/innerkits/appverify_lite/products/ipcamera", ] cflags = [ "-Wno-int-conversion" ] defines = [ "PARSE_PEM_FORMAT_SIGNED_DATA" ] if (ohos_sign_haps_by_server) { defines += [ "OHOS_SIGN_HAPS_BY_SERVER" ] } } shared_library("verify") { sources = [ "src/app_centraldirectory.c", "src/app_common.c", "src/app_file.c", "src/app_provision.c", "src/app_verify.c", "src/app_verify_hal.c", "src/app_verify_hap.c", "src/mbedtls_pkcs7.c", ] configs += [ ":app_verify_config" ] public_deps = [ "//base/security/appverify/interfaces/innerkits/appverify_lite/products/ipcamera:verify_base", "//build/lite/config/component/cJSON:cjson_shared", "//third_party/bounds_checking_function:libsec_shared", "//third_party/mbedtls:mbedtls_shared", ] } } else { group("verify") { } }