11e934351Sopenharmony_ci# Copyright (c) 2023 Huawei Device Co., Ltd. 21e934351Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 31e934351Sopenharmony_ci# you may not use this file except in compliance with the License. 41e934351Sopenharmony_ci# You may obtain a copy of the License at 51e934351Sopenharmony_ci# 61e934351Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 71e934351Sopenharmony_ci# 81e934351Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 91e934351Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 101e934351Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 111e934351Sopenharmony_ci# See the License for the specific language governing permissions and 121e934351Sopenharmony_ci# limitations under the License. 131e934351Sopenharmony_ci 141e934351Sopenharmony_ciimport("//build/ohos.gni") 151e934351Sopenharmony_ciimport("//build/test.gni") 161e934351Sopenharmony_ciimport("//foundation/communication/netstack/netstack_config.gni") 171e934351Sopenharmony_ci 181e934351Sopenharmony_ciNETSSL_NAPI = "$NETSTACK_DIR/frameworks/js/napi/net_ssl" 191e934351Sopenharmony_ciNETSSL_INNERAPI = "$NETSTACK_DIR/interfaces/innerkits/net_ssl" 201e934351Sopenharmony_ci 211e934351Sopenharmony_ciutils_include = [ 221e934351Sopenharmony_ci "$SUBSYSTEM_DIR/netstack/utils/common_utils/include", 231e934351Sopenharmony_ci "$SUBSYSTEM_DIR/netstack/utils/log/include", 241e934351Sopenharmony_ci "$SUBSYSTEM_DIR/netstack/utils/napi_utils/include", 251e934351Sopenharmony_ci "$THIRD_PARTY_ROOT/curl/include", 261e934351Sopenharmony_ci] 271e934351Sopenharmony_ci 281e934351Sopenharmony_cicommon_external_deps = [ 291e934351Sopenharmony_ci "hilog:libhilog", 301e934351Sopenharmony_ci "napi:ace_napi", 311e934351Sopenharmony_ci] 321e934351Sopenharmony_ci 331e934351Sopenharmony_ciohos_unittest("netssl_unittest") { 341e934351Sopenharmony_ci module_out_path = "netstack/netssl_unittest" 351e934351Sopenharmony_ci 361e934351Sopenharmony_ci include_dirs = [ 371e934351Sopenharmony_ci "$NETSTACK_DIR/utils/napi_utils/include", 381e934351Sopenharmony_ci "$THIRD_PARTY_ROOT/openssl/include", 391e934351Sopenharmony_ci "$NETSSL_INNERAPI/include", 401e934351Sopenharmony_ci "$NETSTACK_DIR/frameworks/native/net_ssl/include", 411e934351Sopenharmony_ci "$NETSSL_NAPI/async_context/include", 421e934351Sopenharmony_ci "$NETSSL_NAPI/async_work/include", 431e934351Sopenharmony_ci "$NETSSL_NAPI/net_ssl_exec/include", 441e934351Sopenharmony_ci "$NETSSL_NAPI/net_ssl_module/include", 451e934351Sopenharmony_ci ] 461e934351Sopenharmony_ci include_dirs += utils_include 471e934351Sopenharmony_ci 481e934351Sopenharmony_ci sources = [ 491e934351Sopenharmony_ci "$NETSSL_NAPI/async_context/src/cert_context.cpp", 501e934351Sopenharmony_ci "$NETSSL_NAPI/async_work/src/net_ssl_async_work.cpp", 511e934351Sopenharmony_ci "$NETSSL_NAPI/net_ssl_exec/src/net_ssl_exec.cpp", 521e934351Sopenharmony_ci "$NETSSL_NAPI/net_ssl_module/src/net_ssl_module.cpp", 531e934351Sopenharmony_ci "NetsslTest.cpp", 541e934351Sopenharmony_ci ] 551e934351Sopenharmony_ci 561e934351Sopenharmony_ci deps = [ 571e934351Sopenharmony_ci "$NETSSL_INNERAPI:net_ssl", 581e934351Sopenharmony_ci "$NETSSL_NAPI:networksecurity_napi", 591e934351Sopenharmony_ci "$NETSTACK_DIR/utils/napi_utils:napi_utils", 601e934351Sopenharmony_ci ] 611e934351Sopenharmony_ci 621e934351Sopenharmony_ci external_deps = common_external_deps 631e934351Sopenharmony_ci external_deps += [ 641e934351Sopenharmony_ci "openssl:libcrypto_shared", 651e934351Sopenharmony_ci "openssl:libssl_shared", 661e934351Sopenharmony_ci ] 671e934351Sopenharmony_ci 681e934351Sopenharmony_ci part_name = "netstack" 691e934351Sopenharmony_ci subsystem_name = "communication" 701e934351Sopenharmony_ci} 711e934351Sopenharmony_ci 721e934351Sopenharmony_cigroup("unittest") { 731e934351Sopenharmony_ci testonly = true 741e934351Sopenharmony_ci deps = [ ":netssl_unittest" ] 751e934351Sopenharmony_ci} 76