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") 14import("//foundation/filemanagement/storage_service/storage_service_aafwk.gni") 15 16## build sm execute bin file 17config("storage_daemon_crypto_config") { 18 visibility = [ ":*" ] 19 20 include_dirs = [ 21 "../include", 22 "../include/crypto", 23 "${storage_service_common_path}/include", 24 "//third_party/openssl/include", 25 ] 26 27 cflags = [ 28 "-g3", 29 "-Wall", 30 ] 31} 32 33ohos_static_library("libsdcrypto") { 34 sources = [ 35 "src/base_key.cpp", 36 "src/fbex.cpp", 37 "src/fscrypt_key_v1.cpp", 38 "src/fscrypt_key_v1_ext.cpp", 39 "src/fscrypt_key_v2.cpp", 40 "src/huks_master.cpp", 41 "src/key_manager.cpp", 42 ] 43 44 defines = [ 45 "STORAGE_LOG_TAG = \"StorageDaemon\"", 46 "LOG_DOMAIN = 0xD004301", 47 "OPENSSL_SUPPRESS_DEPRECATED", 48 ] 49 50 configs = [ ":storage_daemon_crypto_config" ] 51 52 deps = [ 53 "${storage_daemon_path}:storage_common_utils", 54 "${storage_daemon_path}/libfscrypt:libfscryptutils", 55 "//third_party/openssl:libcrypto_shared", 56 ] 57 58 external_deps = [ 59 "c_utils:utils", 60 "hilog:libhilog", 61 "huks:libhukssdk", 62 "init:libbegetutil", 63 ] 64 65 subsystem_name = "filemanagement" 66 part_name = "storage_service" 67} 68