# Copyright (c) 2021-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/ohos.gni") ## build sm execute bin file config("storage_daemon_crypto_config") { visibility = [ ":*" ] include_dirs = [ "../include", "../include/crypto", "//foundation/filemanagement/storage_service/services/common/include", "//utils/system/safwk/native/include", "//commonlibrary/c_utils/base/include", "//third_party/openssl/include", ] cflags = [ "-g3", "-Wall", ] } config("crypto_public_config") { include_dirs = [ "//base/security/huks/interfaces/innerkits/huks_standard/main/include" ] } ohos_static_library("libsdcrypto") { sources = [ "src/base_key.cpp", "src/fbex.cpp", "src/fscrypt_key_v1.cpp", "src/fscrypt_key_v1_ext.cpp", "src/fscrypt_key_v2.cpp", "src/huks_master.cpp", "src/key_manager.cpp", ] defines = [ "STORAGE_LOG_TAG = \"StorageDaemon\"", "LOG_DOMAIN = 0xD004301", ] configs = [ ":storage_daemon_crypto_config" ] public_configs = [ ":crypto_public_config" ] deps = [ "//base/security/huks/frameworks/huks_standard/main/os_dependency:libhuks_os_dependency_standard_static", "//foundation/filemanagement/storage_service/services/storage_daemon:storage_common_utils", "//foundation/filemanagement/storage_service/services/storage_daemon/libfscrypt:libfscryptutils", "//third_party/openssl:libcrypto_shared", ] external_deps = [ "c_utils:utils", "hiviewdfx_hilog_native:libhilog", "init:libbegetutil", ] subsystem_name = "filemanagement" part_name = "storage_service" }