1# Copyright (c) 2021 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("../../dsoftbus.gni") 15 16AUTH_SERVER_DEFINES = [] 17if (dsoftbus_feature_auth_account == true) { 18 AUTH_SERVER_DEFINES += [ "AUTH_ACCOUNT" ] 19} 20 21authentication_path = "$dsoftbus_root_path/core/authentication" 22native_source_path = rebase_path("$dsoftbus_root_path") 23 24auth_server_inc = [ 25 "$dsoftbus_dfx_path/interface/include", 26 "$dsoftbus_root_path/interfaces/kits/adapter", 27 "$dsoftbus_root_path/interfaces/kits/authentication", 28 "$dsoftbus_root_path/core/authentication/include", 29 "$dsoftbus_root_path/core/adapter/authentication/include", 30 "$dsoftbus_root_path/interfaces/kits/lnn", 31 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", 32 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", 33 "$dsoftbus_root_path/core/adapter/bus_center/include", 34 "$dsoftbus_root_path/core/bus_center/utils/include/", 35 "$dsoftbus_root_path/interfaces/kits/transport", 36] 37if (dsoftbus_feature_lnn_frame) { 38 auth_server_src = [ 39 "$authentication_path/applykey/auth_apply_key_manager.c", 40 "$authentication_path/applykey/auth_apply_key_process.c", 41 "$authentication_path/src/auth_common.c", 42 "$authentication_path/src/auth_connection.c", 43 "$authentication_path/src/auth_device.c", 44 "$authentication_path/src/auth_hichain.c", 45 "$authentication_path/src/auth_hichain_adapter.c", 46 "$authentication_path/src/auth_manager.c", 47 "$authentication_path/src/auth_normalize_request.c", 48 "$authentication_path/src/auth_request.c", 49 "$authentication_path/src/auth_session_fsm.c", 50 "$authentication_path/src/auth_session_key.c", 51 "$authentication_path/src/auth_session_json.c", 52 "$authentication_path/src/auth_session_message.c", 53 "$authentication_path/src/auth_interface.c", 54 "$authentication_path/src/auth_pre_link.c", 55 "$authentication_path/userkey/auth_uk_manager.c", 56 "$authentication_path/userkey/auth_user_common_key.c", 57 ] 58 59 if (defined(ohos_lite)) { 60 auth_server_src += [ "$authentication_path/src/virtual/auth_identity_service_adapter_virtual.c" ] 61 AUTH_SERVER_DEFINES += [ "DISABLE_IDENTITY_SERVICE" ] 62 } else { 63 auth_server_src += 64 [ "$authentication_path/src/auth_identity_service_adapter.c" ] 65 } 66 67 if (dsoftbus_feature_ip_auth) { 68 auth_server_src += 69 [ "$dsoftbus_root_path/core/authentication/src/auth_tcp_connection.c" ] 70 } else { 71 auth_server_src += [ "$dsoftbus_root_path/core/authentication/src/virtual/auth_tcp_connection_virtual.c" ] 72 } 73} else { 74 auth_server_src = [ 75 "$authentication_path/src/virtual/auth_interface_virtual.c", 76 "$authentication_path/src/virtual/auth_tcp_connection_virtual.c", 77 ] 78} 79 80auth_server_deps = [ "$dsoftbus_dfx_path:softbus_dfx" ] 81auth_server_ex_deps = [] 82if (defined(ohos_lite)) { 83 if (ohos_kernel_type == "liteos_m") { 84 auth_server_inc += [ "//base/security/device_auth/interfaces/inner_api" ] 85 if (dsoftbus_feature_lnn_frame) { 86 auth_server_deps += [ "//base/security/device_auth/services:deviceauth" ] 87 } 88 } else { 89 auth_server_inc += [ "//third_party/cJSON" ] 90 if (dsoftbus_feature_lnn_frame) { 91 auth_server_deps += 92 [ "//base/security/device_auth/services:deviceauth_sdk" ] 93 } 94 } 95 auth_server_src += [ "$authentication_path/src/virtual/auth_hichain_system_ability_monitor_virtual.c" ] 96} else { 97 auth_server_ex_deps += [ "device_auth:deviceauth_sdk" ] 98 auth_server_src += 99 [ "$authentication_path/src/auth_hichain_system_ability_monitor.cpp" ] 100} 101 102if (!defined(global_parts_info) || 103 defined(global_parts_info.deviceprofile_device_info_manager)) { 104 auth_server_src += [ 105 "$authentication_path/bind/auth_device_profile_listener.cpp", 106 "$authentication_path/src/auth_deviceprofile.cpp", 107 ] 108 auth_server_inc += [ 109 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", 110 "$dsoftbus_root_path/core/authentication/interface", 111 ] 112} else { 113 auth_server_src += [ 114 "$authentication_path/bind/auth_device_profile_listener_virtual.cpp", 115 "$authentication_path/src/auth_deviceprofile_virtual.cpp", 116 ] 117}