1# Copyright (c) 2020-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("//build/lite/config/component/lite_component.gni") 15import("//build/lite/config/hap_pack.gni") 16 17if (os_level == "small" || os_level == "mini") { 18 config("app_verify_config") { 19 include_dirs = [ 20 "include", 21 "//third_party/bounds_checking_function/include", 22 "//third_party/cJSON", 23 "//base/security/appverify/interfaces/innerkits/appverify_lite", 24 "//base/security/appverify/interfaces/innerkits/appverify_lite/products/default", 25 "//base/security/appverify/interfaces/innerkits/appverify_lite/products/ipcamera", 26 ] 27 28 defines = [ "PARSE_PEM_FORMAT_SIGNED_DATA" ] 29 if (ohos_sign_haps_by_server) { 30 defines += [ "OHOS_SIGN_HAPS_BY_SERVER" ] 31 } 32 } 33 34 shared_library("verify") { 35 sources = [ 36 "src/app_centraldirectory.c", 37 "src/app_common.c", 38 "src/app_file.c", 39 "src/app_provision.c", 40 "src/app_verify.c", 41 "src/app_verify_hal.c", 42 "src/app_verify_hap.c", 43 "src/mbedtls_pkcs7.c", 44 ] 45 configs += [ ":app_verify_config" ] 46 public_deps = [ 47 "//base/security/appverify/interfaces/innerkits/appverify_lite/products/ipcamera:verify_base", 48 "//build/lite/config/component/cJSON:cjson_shared", 49 "//third_party/bounds_checking_function:libsec_shared", 50 "//third_party/mbedtls:mbedtls_shared", 51 ] 52 } 53} else { 54 group("verify") { 55 } 56} 57