1e1051a39Sopenharmony_ci# 2e1051a39Sopenharmony_ci# Copyright (c) 2020 Huawei Device Co., Ltd. 3e1051a39Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 4e1051a39Sopenharmony_ci# you may not use this file except in compliance with the License. 5e1051a39Sopenharmony_ci# You may obtain a copy of the License at 6e1051a39Sopenharmony_ci# 7e1051a39Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 8e1051a39Sopenharmony_ci# 9e1051a39Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 10e1051a39Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 11e1051a39Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12e1051a39Sopenharmony_ci# See the License for the specific language governing permissions and 13e1051a39Sopenharmony_ci# limitations under the License. 14e1051a39Sopenharmony_ci# 15e1051a39Sopenharmony_ci 16e1051a39Sopenharmony_ciimport("//build/lite/config/component/lite_component.gni") 17e1051a39Sopenharmony_ci 18e1051a39Sopenharmony_ciif (defined(ohos_lite)) { 19e1051a39Sopenharmony_ci config("openssl_config") { 20e1051a39Sopenharmony_ci include_dirs = [ 21e1051a39Sopenharmony_ci "include", 22e1051a39Sopenharmony_ci "crypto/include", 23e1051a39Sopenharmony_ci "crypto/ec", 24e1051a39Sopenharmony_ci ".", 25e1051a39Sopenharmony_ci ] 26e1051a39Sopenharmony_ci 27e1051a39Sopenharmony_ci cflags = [ 28e1051a39Sopenharmony_ci "-fPIC", 29e1051a39Sopenharmony_ci "-DOPENSSL_ARM_PLATFORM", 30e1051a39Sopenharmony_ci ] 31e1051a39Sopenharmony_ci } 32e1051a39Sopenharmony_ci 33e1051a39Sopenharmony_ci openssl_source = [ 34e1051a39Sopenharmony_ci "crypto/cryptlib.c", 35e1051a39Sopenharmony_ci "crypto/ec/curve25519.c", 36e1051a39Sopenharmony_ci "crypto/mem_clr.c", 37e1051a39Sopenharmony_ci "crypto/sha/sha512.c", 38e1051a39Sopenharmony_ci ] 39e1051a39Sopenharmony_ci 40e1051a39Sopenharmony_ci lite_library("openssl_shared") { 41e1051a39Sopenharmony_ci target_type = "shared_library" 42e1051a39Sopenharmony_ci sources = openssl_source 43e1051a39Sopenharmony_ci public_configs = [ ":openssl_config" ] 44e1051a39Sopenharmony_ci } 45e1051a39Sopenharmony_ci} 46