1# Copyright (c) 2021-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. 13import("//build/ohos.gni") 14 15## build sm execute bin file 16config("storage_daemon_crypto_config") { 17 visibility = [ ":*" ] 18 19 include_dirs = [ 20 "../include", 21 "../include/crypto", 22 "//foundation/filemanagement/storage_service/services/common/include", 23 "//utils/system/safwk/native/include", 24 "//commonlibrary/c_utils/base/include", 25 "//third_party/openssl/include", 26 ] 27 28 cflags = [ 29 "-g3", 30 "-Wall", 31 ] 32} 33 34config("crypto_public_config") { 35 include_dirs = 36 [ "//base/security/huks/interfaces/innerkits/huks_standard/main/include" ] 37} 38 39ohos_static_library("libsdcrypto") { 40 sources = [ 41 "src/base_key.cpp", 42 "src/fbex.cpp", 43 "src/fscrypt_key_v1.cpp", 44 "src/fscrypt_key_v1_ext.cpp", 45 "src/fscrypt_key_v2.cpp", 46 "src/huks_master.cpp", 47 "src/key_manager.cpp", 48 ] 49 50 defines = [ 51 "STORAGE_LOG_TAG = \"StorageDaemon\"", 52 "LOG_DOMAIN = 0xD004301", 53 ] 54 55 configs = [ ":storage_daemon_crypto_config" ] 56 public_configs = [ ":crypto_public_config" ] 57 58 deps = [ 59 "//base/security/huks/frameworks/huks_standard/main/os_dependency:libhuks_os_dependency_standard_static", 60 "//foundation/filemanagement/storage_service/services/storage_daemon:storage_common_utils", 61 "//foundation/filemanagement/storage_service/services/storage_daemon/libfscrypt:libfscryptutils", 62 "//third_party/openssl:libcrypto_shared", 63 ] 64 65 external_deps = [ 66 "c_utils:utils", 67 "hiviewdfx_hilog_native:libhilog", 68 "init:libbegetutil", 69 ] 70 71 subsystem_name = "filemanagement" 72 part_name = "storage_service" 73} 74