192f3ab15Sopenharmony_ci# Copyright (c) 2023 Huawei Device Co., Ltd.
292f3ab15Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
392f3ab15Sopenharmony_ci# you may not use this file except in compliance with the License.
492f3ab15Sopenharmony_ci# You may obtain a copy of the License at
592f3ab15Sopenharmony_ci#
692f3ab15Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
792f3ab15Sopenharmony_ci#
892f3ab15Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
992f3ab15Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
1092f3ab15Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1192f3ab15Sopenharmony_ci# See the License for the specific language governing permissions and
1292f3ab15Sopenharmony_ci# limitations under the License.
1392f3ab15Sopenharmony_ci
1492f3ab15Sopenharmony_ciimport("//build/ohos.gni")
1592f3ab15Sopenharmony_ci
1692f3ab15Sopenharmony_ciohos_cargo_crate("lib") {
1792f3ab15Sopenharmony_ci  crate_name = "openssl"
1892f3ab15Sopenharmony_ci  crate_type = "rlib"
1992f3ab15Sopenharmony_ci  crate_root = "src/lib.rs"
2092f3ab15Sopenharmony_ci
2192f3ab15Sopenharmony_ci  sources = [ "src/lib.rs" ]
2292f3ab15Sopenharmony_ci  edition = "2018"
2392f3ab15Sopenharmony_ci  cargo_pkg_version = "0.10.56"
2492f3ab15Sopenharmony_ci  cargo_pkg_authors = "Steven Fackler <sfackler@gmail.com>"
2592f3ab15Sopenharmony_ci  cargo_pkg_name = "openssl"
2692f3ab15Sopenharmony_ci  cargo_pkg_description = "OpenSSL bindings"
2792f3ab15Sopenharmony_ci  deps = [
2892f3ab15Sopenharmony_ci    "//third_party/rust/crates/bitflags:lib",
2992f3ab15Sopenharmony_ci    "//third_party/rust/crates/cfg-if:lib",
3092f3ab15Sopenharmony_ci    "//third_party/rust/crates/foreign-types/foreign-types/:lib",
3192f3ab15Sopenharmony_ci    "//third_party/rust/crates/libc:lib",
3292f3ab15Sopenharmony_ci    "//third_party/rust/crates/once_cell:lib",
3392f3ab15Sopenharmony_ci    "//third_party/rust/crates/rust-openssl/openssl-macros:lib(${host_toolchain})",
3492f3ab15Sopenharmony_ci    "//third_party/rust/crates/rust-openssl/openssl-sys:lib",
3592f3ab15Sopenharmony_ci  ]
3692f3ab15Sopenharmony_ci  features = [ "default" ]
3792f3ab15Sopenharmony_ci  rustflags = [
3892f3ab15Sopenharmony_ci    "--cfg=osslconf=\"OPENSSL_NO_BF\"",
3992f3ab15Sopenharmony_ci    "--cfg=osslconf=\"OPENSSL_NO_IDEA\"",
4092f3ab15Sopenharmony_ci    "--cfg=osslconf=\"OPENSSL_NO_CAMELLIA\"",
4192f3ab15Sopenharmony_ci    "--cfg=osslconf=\"OPENSSL_NO_CAST\"",
4292f3ab15Sopenharmony_ci    "--cfg=osslconf=\"OPENSSL_NO_RMD160\"",
4392f3ab15Sopenharmony_ci    "--cfg=osslconf=\"OPENSSL_NO_SSL3_METHOD\"",
4492f3ab15Sopenharmony_ci    "--cfg=ossl101",
4592f3ab15Sopenharmony_ci    "--cfg=ossl102",
4692f3ab15Sopenharmony_ci    "--cfg=ossl110",
4792f3ab15Sopenharmony_ci    "--cfg=ossl110g",
4892f3ab15Sopenharmony_ci    "--cfg=ossl110h",
4992f3ab15Sopenharmony_ci    "--cfg=ossl111",
5092f3ab15Sopenharmony_ci    "--cfg=ossl300",
5192f3ab15Sopenharmony_ci  ]
5292f3ab15Sopenharmony_ci}
53