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 cflags = [ "-Wno-int-conversion" ] 29 defines = [ "PARSE_PEM_FORMAT_SIGNED_DATA" ] 30 if (ohos_sign_haps_by_server) { 31 defines += [ "OHOS_SIGN_HAPS_BY_SERVER" ] 32 } 33 } 34 35 shared_library("verify") { 36 sources = [ 37 "src/app_centraldirectory.c", 38 "src/app_common.c", 39 "src/app_file.c", 40 "src/app_provision.c", 41 "src/app_verify.c", 42 "src/app_verify_hal.c", 43 "src/app_verify_hap.c", 44 "src/mbedtls_pkcs7.c", 45 ] 46 configs += [ ":app_verify_config" ] 47 public_deps = [ 48 "//base/security/appverify/interfaces/innerkits/appverify_lite/products/ipcamera:verify_base", 49 "//build/lite/config/component/cJSON:cjson_shared", 50 "//third_party/bounds_checking_function:libsec_shared", 51 "//third_party/mbedtls:mbedtls_shared", 52 ] 53 } 54} else { 55 group("verify") { 56 } 57} 58