9 Star 0 Fork 131

OHOS_BES2600/third_party_openssl

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
BUILD.gn 60.51 KB
一键复制 编辑 原始数据 按行查看 历史
cheng_jinsong 提交于 2023-06-19 15:01 . feat:add innerapi tags
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776
# Copyright (c) 2020-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")
print("openssl detecting os now...")
print("current_cpu = ${current_cpu}")
print("current_os = ${current_os}")
print("host_os = ${host_os}")
openssl_selected_platform = ""
print("is_mingw = ${is_mingw}")
if (current_cpu == "arm" && !(current_os == "linux" || host_os == "mac")) {
print("openssl selected linux-armv4")
openssl_selected_platform = "linux-armv4"
} else if (current_cpu == "arm64" &&
(!(current_os == "linux" || host_os == "mac") ||
current_os == "ohos")) {
print("openssl selected linux-aarch64")
openssl_selected_platform = "linux-aarch64"
} else if ((current_cpu == "x64" || current_cpu == "x86_64") &&
(current_os == "mac" || current_os == "ios")) {
# compilation for ios depends the platform
print("openssl selected darwin64-x86_64-cc")
openssl_selected_platform = "darwin64-x86_64-cc"
} else if (current_cpu == "arm64" &&
(current_os == "mac" || current_os == "ios")) {
# ios and macos both use the platform
print("openssl selected darwin64-arm64-cc")
openssl_selected_platform = "darwin64-arm64-cc"
} else if ((current_cpu == "x64" || current_cpu == "x86_64") &&
current_os != "mingw") {
print("openssl selected linux-x86_64")
openssl_selected_platform = "linux-x86_64"
} else if (is_mingw) {
print("openssl selected mingw64")
openssl_selected_platform = "mingw64"
} else if (current_cpu == "arm" && current_os == "android") {
print("openssl selected linux-armv4")
openssl_selected_platform = "linux-armv4"
} else if (current_cpu == "arm64" && current_os == "android") {
print("openssl selected linux-aarch64")
openssl_selected_platform = "linux-aarch64"
}
print(
"openssl detecting os done. openssl_selected_platform = ${openssl_selected_platform}")
openssl_selected_platform_full_path =
"${target_out_dir}/build_all_generated/${openssl_selected_platform}"
libcrypto_build_all_generated_linux_armv4_sources = [
"${openssl_selected_platform_full_path}/crypto/aes/aes-armv4.S",
"${openssl_selected_platform_full_path}/crypto/aes/aesv8-armx.S",
"${openssl_selected_platform_full_path}/crypto/aes/bsaes-armv7.S",
"${openssl_selected_platform_full_path}/crypto/armv4cpuid.S",
"${openssl_selected_platform_full_path}/crypto/bn/armv4-gf2m.S",
"${openssl_selected_platform_full_path}/crypto/bn/armv4-mont.S",
"${openssl_selected_platform_full_path}/crypto/chacha/chacha-armv4.S",
"${openssl_selected_platform_full_path}/crypto/ec/ecp_nistz256-armv4.S",
"${openssl_selected_platform_full_path}/crypto/modes/ghash-armv4.S",
"${openssl_selected_platform_full_path}/crypto/modes/ghashv8-armx.S",
"${openssl_selected_platform_full_path}/crypto/poly1305/poly1305-armv4.S",
"${openssl_selected_platform_full_path}/crypto/sha/keccak1600-armv4.S",
"${openssl_selected_platform_full_path}/crypto/sha/sha1-armv4-large.S",
"${openssl_selected_platform_full_path}/crypto/sha/sha256-armv4.S",
"${openssl_selected_platform_full_path}/crypto/sha/sha512-armv4.S",
]
libcrypto_build_all_generated_linux_aarch64_sources = [
"${openssl_selected_platform_full_path}/crypto/aes/aesv8-armx.S",
"${openssl_selected_platform_full_path}/crypto/aes/vpaes-armv8.S",
"${openssl_selected_platform_full_path}/crypto/arm64cpuid.S",
"${openssl_selected_platform_full_path}/crypto/bn/armv8-mont.S",
"${openssl_selected_platform_full_path}/crypto/chacha/chacha-armv8.S",
"${openssl_selected_platform_full_path}/crypto/ec/ecp_nistz256-armv8.S",
"${openssl_selected_platform_full_path}/crypto/modes/aes-gcm-armv8_64.S",
"${openssl_selected_platform_full_path}/crypto/modes/ghashv8-armx.S",
"${openssl_selected_platform_full_path}/crypto/poly1305/poly1305-armv8.S",
"${openssl_selected_platform_full_path}/crypto/sha/keccak1600-armv8.S",
"${openssl_selected_platform_full_path}/crypto/sha/sha1-armv8.S",
"${openssl_selected_platform_full_path}/crypto/sha/sha256-armv8.S",
"${openssl_selected_platform_full_path}/crypto/sha/sha512-armv8.S",
]
libcrypto_build_all_generated_darwin64_x86_64_cc_sources = [
"${openssl_selected_platform_full_path}/crypto/aes/aes-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/aes/aesni-mb-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/aes/aesni-sha1-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/aes/aesni-sha256-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/aes/aesni-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/aes/bsaes-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/aes/vpaes-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/bn/rsaz-avx2.s",
"${openssl_selected_platform_full_path}/crypto/bn/rsaz-avx512.s",
"${openssl_selected_platform_full_path}/crypto/bn/rsaz-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/bn/x86_64-gf2m.s",
"${openssl_selected_platform_full_path}/crypto/bn/x86_64-mont.s",
"${openssl_selected_platform_full_path}/crypto/bn/x86_64-mont5.s",
"${openssl_selected_platform_full_path}/crypto/camellia/cmll-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/chacha/chacha-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/ec/ecp_nistz256-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/ec/x25519-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/md5/md5-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/modes/aesni-gcm-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/modes/ghash-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/poly1305/poly1305-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/rc4/rc4-md5-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/rc4/rc4-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/sha/keccak1600-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/sha/sha1-mb-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/sha/sha1-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/sha/sha256-mb-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/sha/sha256-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/sha/sha512-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/whrlpool/wp-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/x86_64cpuid.s",
"${openssl_selected_platform_full_path}/engines/e_padlock-x86_64.s",
]
libcrypto_build_all_generated_darwin64_arm64_cc_sources = [
"${openssl_selected_platform_full_path}/crypto/aes/aesv8-armx.S",
"${openssl_selected_platform_full_path}/crypto/aes/vpaes-armv8.S",
"${openssl_selected_platform_full_path}/crypto/arm64cpuid.S",
"${openssl_selected_platform_full_path}/crypto/bn/armv8-mont.S",
"${openssl_selected_platform_full_path}/crypto/chacha/chacha-armv8.S",
"${openssl_selected_platform_full_path}/crypto/ec/ecp_nistz256-armv8.S",
"${openssl_selected_platform_full_path}/crypto/modes/aes-gcm-armv8_64.S",
"${openssl_selected_platform_full_path}/crypto/modes/ghashv8-armx.S",
"${openssl_selected_platform_full_path}/crypto/poly1305/poly1305-armv8.S",
"${openssl_selected_platform_full_path}/crypto/sha/keccak1600-armv8.S",
"${openssl_selected_platform_full_path}/crypto/sha/sha1-armv8.S",
"${openssl_selected_platform_full_path}/crypto/sha/sha256-armv8.S",
"${openssl_selected_platform_full_path}/crypto/sha/sha512-armv8.S",
]
libcrypto_build_all_generated_linux_x86_64_sources = [
"${openssl_selected_platform_full_path}/crypto/aes/aes-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/aes/aesni-mb-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/aes/aesni-sha1-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/aes/aesni-sha256-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/aes/aesni-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/aes/bsaes-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/aes/vpaes-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/bn/rsaz-avx2.s",
"${openssl_selected_platform_full_path}/crypto/bn/rsaz-avx512.s",
"${openssl_selected_platform_full_path}/crypto/bn/rsaz-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/bn/x86_64-gf2m.s",
"${openssl_selected_platform_full_path}/crypto/bn/x86_64-mont.s",
"${openssl_selected_platform_full_path}/crypto/bn/x86_64-mont5.s",
"${openssl_selected_platform_full_path}/crypto/camellia/cmll-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/chacha/chacha-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/ec/ecp_nistz256-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/ec/x25519-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/md5/md5-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/modes/aesni-gcm-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/modes/ghash-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/poly1305/poly1305-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/rc4/rc4-md5-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/rc4/rc4-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/sha/keccak1600-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/sha/sha1-mb-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/sha/sha1-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/sha/sha256-mb-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/sha/sha256-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/sha/sha512-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/whrlpool/wp-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/x86_64cpuid.s",
"${openssl_selected_platform_full_path}/engines/e_padlock-x86_64.s",
]
libcrypto_build_all_generated_mingw64_sources = [
"${openssl_selected_platform_full_path}/crypto/aes/aes-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/aes/aesni-mb-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/aes/aesni-sha1-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/aes/aesni-sha256-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/aes/aesni-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/aes/bsaes-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/aes/vpaes-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/bn/rsaz-avx2.s",
"${openssl_selected_platform_full_path}/crypto/bn/rsaz-avx512.s",
"${openssl_selected_platform_full_path}/crypto/bn/rsaz-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/bn/x86_64-gf2m.s",
"${openssl_selected_platform_full_path}/crypto/bn/x86_64-mont.s",
"${openssl_selected_platform_full_path}/crypto/bn/x86_64-mont5.s",
"${openssl_selected_platform_full_path}/crypto/camellia/cmll-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/chacha/chacha-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/ec/ecp_nistz256-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/ec/x25519-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/md5/md5-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/modes/aesni-gcm-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/modes/ghash-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/poly1305/poly1305-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/rc4/rc4-md5-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/rc4/rc4-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/sha/keccak1600-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/sha/sha1-mb-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/sha/sha1-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/sha/sha256-mb-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/sha/sha256-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/sha/sha512-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/whrlpool/wp-x86_64.s",
"${openssl_selected_platform_full_path}/crypto/x86_64cpuid.s",
"${openssl_selected_platform_full_path}/engines/e_padlock-x86_64.s",
]
libcrypto_build_all_generated_selected_platform_sources = []
if (openssl_selected_platform == "linux-armv4") {
libcrypto_build_all_generated_selected_platform_sources +=
libcrypto_build_all_generated_linux_armv4_sources
} else if (openssl_selected_platform == "linux-aarch64") {
libcrypto_build_all_generated_selected_platform_sources +=
libcrypto_build_all_generated_linux_aarch64_sources
} else if (openssl_selected_platform == "darwin64-x86_64-cc") {
libcrypto_build_all_generated_selected_platform_sources +=
libcrypto_build_all_generated_darwin64_x86_64_cc_sources
} else if (openssl_selected_platform == "darwin64-arm64-cc") {
libcrypto_build_all_generated_selected_platform_sources +=
libcrypto_build_all_generated_darwin64_arm64_cc_sources
} else if (openssl_selected_platform == "linux-x86_64") {
libcrypto_build_all_generated_selected_platform_sources +=
libcrypto_build_all_generated_linux_x86_64_sources
} else if (openssl_selected_platform == "mingw64") {
libcrypto_build_all_generated_selected_platform_sources +=
libcrypto_build_all_generated_mingw64_sources
}
libcommon_build_all_generated_selected_platform_sources = [
"${openssl_selected_platform_full_path}/providers/common/der/der_digests_gen.c",
"${openssl_selected_platform_full_path}/providers/common/der/der_dsa_gen.c",
"${openssl_selected_platform_full_path}/providers/common/der/der_ec_gen.c",
"${openssl_selected_platform_full_path}/providers/common/der/der_ecx_gen.c",
"${openssl_selected_platform_full_path}/providers/common/der/der_rsa_gen.c",
"${openssl_selected_platform_full_path}/providers/common/der/der_wrap_gen.c",
]
libdefault_build_all_generated_selected_platform_sources = [
"${openssl_selected_platform_full_path}/providers/common/der/der_sm2_gen.c",
]
# We make use of both exec_script and action to build openssl build_all_generated items.
#
# Some modules use openssl in an incorrect way, leading to the confusing building sequences,
# so the user modules building fail because openssl headers have not been generated at the building time.
# The exec_script in the global area will be executed before ninja command,
# and it ensures that the headers is generated properly before the building of any modules.
#
# Openssl generate some assembly codes before it is building.
# The sources list in BUILD.gn include the assembly codes.
# The gn build system requires that all items in sources list should be the output of another build item.
# So we use an empty action to generate the assembly codes.
# Actually we generate the assembly codes in exec_script, not in action.
#
# The gn build system requires the script in exec_script and action should be python script,
# so we invoke the shell script in python script
print(exec_script(
rebase_path("//third_party/openssl/run_command.py"),
[
rebase_path(
"//third_party/openssl/make_openssl_build_all_generated.sh"),
rebase_path("//third_party/openssl"),
rebase_path("${target_out_dir}/build_all_generated"),
openssl_selected_platform,
],
"string",
[]))
action("openssl_build_all_generated") {
script = rebase_path("//third_party/openssl/empty.py")
outputs = []
outputs += libcommon_build_all_generated_selected_platform_sources
outputs += libdefault_build_all_generated_selected_platform_sources
outputs += libcrypto_build_all_generated_selected_platform_sources
outputs += [ "${openssl_selected_platform_full_path}/apps/progs.c" ]
if (openssl_selected_platform == "mingw64") {
outputs += [ "${openssl_selected_platform_full_path}/apps/openssl.rc" ]
}
}
openssl_internal_cflags = [
"-Wall",
# ../../third_party/openssl/crypto/o_str.c:309:9: error: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Werror,-Wint-conversion]
# err = strerror_r(errnum, buf, buflen);
# ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"-Wno-error=int-conversion",
# ../../third_party/openssl/crypto/bn/bn_conv.c:92:34: error: implicit conversion from 'unsigned long long' to 'unsigned long' changes value from 10000000000000000000 to 2313682944 [-Werror,-Wconstant-conversion]
# *lp = BN_div_word(t, BN_DEC_CONV);
# ~~~~~~~~~~~ ^~~~~~~~~~~
"-Wno-error=constant-conversion",
# ../../third_party/openssl/crypto/bn/bn_exp.c:382:38: error: shift count >= width of type [-Werror,-Wshift-count-overflow]
# if (m->d[j - 1] & (((BN_ULONG)1) << (BN_BITS2 - 1))) {
# ^ ~~~~~~~~~~~~~~
"-Wno-error=shift-count-overflow",
# ../../third_party/openssl/crypto/conf/conf_def.c:31:11: error: 'stat' macro redefined [-Werror,-Wmacro-redefined]
# # define stat _stat
# ^
# ../../prebuilts/mingw-w64/ohos/linux-x86_64/clang-mingw/x86_64-w64-mingw32/include/sys/stat.h:279:9: note: previous definition is here
# #define stat _stat64
# ^
# 1 error generated.
"-Wno-error=macro-redefined",
"-Wno-error=implicit-fallthrough",
"-Wno-error=sign-compare",
# Fix llvm-15 build error
"-Wno-unused-but-set-variable",
]
crypto_config_common_private_include_dirs = [
".",
"apps/include",
"crypto",
"crypto/bn",
"crypto/ec",
"crypto/ec/curve448",
"crypto/modes",
"crypto/rsa",
"include",
"providers/common/include",
"providers/common/include/prov",
"providers/implementations/include",
"${openssl_selected_platform_full_path}/apps",
"${openssl_selected_platform_full_path}/crypto",
"${openssl_selected_platform_full_path}/include",
"${openssl_selected_platform_full_path}/include/crypto",
"${openssl_selected_platform_full_path}/include/openssl",
"${openssl_selected_platform_full_path}/providers/common/include",
"${openssl_selected_platform_full_path}/providers/common/include/prov",
]
crypto_config_common_public_include_dirs = [
"include",
"${openssl_selected_platform_full_path}/include",
]
# located at /system/etc/
ohos_prebuilt_etc("openssl.cnf") {
source = "open_harmony_openssl_config/openssl.cnf"
subsystem_name = "thirdparty"
part_name = "openssl"
}
crypto_config_common_cflags = [
"-Wa,--noexecstack",
"-DNDEBUG",
"-DOPENSSL_BUILDING_OPENSSL",
"-DOPENSSL_CPUID_OBJ",
"-DOPENSSL_PIC",
"-DENGINESDIR=\"\"",
"-DMODULESDIR=\"\"",
# to locate openssl.cnf
"-DOPENSSLDIR=\"/system/etc\"",
"-DSTATIC_LEGACY",
]
crypto_config_linux_armv4_cflags = [
"-DOPENSSL_USE_NODELETE",
"-fPIC",
"-pthread",
"-DAES_ASM",
"-DBSAES_ASM",
"-DECP_NISTZ256_ASM",
"-DGHASH_ASM",
"-DKECCAK1600_ASM",
"-DOPENSSL_BN_ASM_GF2m",
"-DOPENSSL_BN_ASM_MONT",
"-DPOLY1305_ASM",
"-DSHA1_ASM",
"-DSHA256_ASM",
"-DSHA512_ASM",
]
crypto_config_linux_aarch64_cflags = [
"-DOPENSSL_USE_NODELETE",
"-fPIC",
"-pthread",
"-DECP_NISTZ256_ASM",
"-DKECCAK1600_ASM",
"-DOPENSSL_BN_ASM_MONT",
"-DPOLY1305_ASM",
"-DSHA1_ASM",
"-DSHA256_ASM",
"-DSHA512_ASM",
"-DVPAES_ASM",
]
crypto_config_darwin64_x86_64_cc_cflags = [
"-fPIC",
"-DL_ENDIAN",
"-D_REENTRANT",
"-DOPENSSL_IA32_SSE2",
"-DAES_ASM",
"-DBSAES_ASM",
"-DCMLL_ASM",
"-DECP_NISTZ256_ASM",
"-DGHASH_ASM",
"-DKECCAK1600_ASM",
"-DMD5_ASM",
"-DOPENSSL_BN_ASM_GF2m",
"-DOPENSSL_BN_ASM_MONT",
"-DOPENSSL_BN_ASM_MONT5",
"-DPADLOCK_ASM",
"-DPOLY1305_ASM",
"-DSHA1_ASM",
"-DSHA256_ASM",
"-DSHA512_ASM",
"-DVPAES_ASM",
"-DWHIRLPOOL_ASM",
"-DX25519_ASM",
]
crypto_config_darwin64_arm64_cc_cflags = [
"-DL_ENDIAN",
"-D_REENTRANT",
"-fPIC",
"-DECP_NISTZ256_ASM",
"-DKECCAK1600_ASM",
"-DOPENSSL_BN_ASM_MONT",
"-DPOLY1305_ASM",
"-DSHA1_ASM",
"-DSHA256_ASM",
"-DSHA512_ASM",
"-DVPAES_ASM",
]
crypto_config_linux_x86_64_cflags = [
"-DL_ENDIAN",
"-DOPENSSL_IA32_SSE2",
"-DOPENSSL_USE_NODELETE",
"-fPIC",
"-m64",
"-pthread",
"-DAES_ASM",
"-DBSAES_ASM",
"-DCMLL_ASM",
"-DECP_NISTZ256_ASM",
"-DGHASH_ASM",
"-DKECCAK1600_ASM",
"-DMD5_ASM",
"-DOPENSSL_BN_ASM_GF2m",
"-DOPENSSL_BN_ASM_MONT",
"-DOPENSSL_BN_ASM_MONT5",
"-DPADLOCK_ASM",
"-DPOLY1305_ASM",
"-DSHA1_ASM",
"-DSHA256_ASM",
"-DSHA512_ASM",
"-DVPAES_ASM",
"-DWHIRLPOOL_ASM",
"-DX25519_ASM",
]
crypto_config_mingw64_cflags = [
"-D_MT",
"-D_UNICODE",
"-DL_ENDIAN",
"-DOPENSSL_IA32_SSE2",
"-DUNICODE",
"-DWIN32_LEAN_AND_MEAN",
"-m64",
"-DAES_ASM",
"-DBSAES_ASM",
"-DCMLL_ASM",
"-DECP_NISTZ256_ASM",
"-DGHASH_ASM",
"-DKECCAK1600_ASM",
"-DMD5_ASM",
"-DOPENSSL_BN_ASM_GF2m",
"-DOPENSSL_BN_ASM_MONT",
"-DOPENSSL_BN_ASM_MONT5",
"-DPADLOCK_ASM",
"-DPOLY1305_ASM",
"-DSHA1_ASM",
"-DSHA256_ASM",
"-DSHA512_ASM",
"-DVPAES_ASM",
"-DWHIRLPOOL_ASM",
"-DX25519_ASM",
]
crypto_config_current_platform_cflags = []
if (openssl_selected_platform == "linux-armv4") {
crypto_config_current_platform_cflags += crypto_config_linux_armv4_cflags
} else if (openssl_selected_platform == "linux-aarch64") {
crypto_config_current_platform_cflags += crypto_config_linux_aarch64_cflags
} else if (openssl_selected_platform == "darwin64-x86_64-cc") {
crypto_config_current_platform_cflags +=
crypto_config_darwin64_x86_64_cc_cflags
} else if (openssl_selected_platform == "darwin64-arm64-cc") {
crypto_config_current_platform_cflags +=
crypto_config_darwin64_arm64_cc_cflags
} else if (openssl_selected_platform == "linux-x86_64") {
crypto_config_current_platform_cflags += crypto_config_linux_x86_64_cflags
} else if (openssl_selected_platform == "mingw64") {
crypto_config_current_platform_cflags += crypto_config_mingw64_cflags
}
mingw32_libs_path = []
mingw32_libs = []
if (is_mingw || is_win) {
mingw32_libs_path += [ "//prebuilts/mingw-w64/ohos/linux-x86_64/clang-mingw/x86_64-w64-mingw32/lib" ]
mingw32_libs += [
"ws2_32",
"crypt32",
]
}
config("crypto_config_private") {
include_dirs = crypto_config_common_private_include_dirs
cflags = crypto_config_common_cflags + crypto_config_current_platform_cflags +
openssl_internal_cflags
lib_dirs = mingw32_libs_path
libs = mingw32_libs
}
config("crypto_config_public") {
include_dirs = crypto_config_common_public_include_dirs
libs = mingw32_libs
}
libcommon_common_sources = [
"providers/common/der/der_dsa_key.c",
"providers/common/der/der_dsa_sig.c",
"providers/common/der/der_ec_key.c",
"providers/common/der/der_ec_sig.c",
"providers/common/der/der_ecx_key.c",
"providers/common/der/der_rsa_key.c",
"providers/common/provider_ctx.c",
"providers/common/provider_err.c",
"providers/implementations/ciphers/ciphercommon.c",
"providers/implementations/ciphers/ciphercommon_block.c",
"providers/implementations/ciphers/ciphercommon_ccm.c",
"providers/implementations/ciphers/ciphercommon_ccm_hw.c",
"providers/implementations/ciphers/ciphercommon_gcm.c",
"providers/implementations/ciphers/ciphercommon_gcm_hw.c",
"providers/implementations/ciphers/ciphercommon_hw.c",
"providers/implementations/digests/digestcommon.c",
"ssl/record/tls_pad.c",
]
libdefault_common_sources = [
"providers/common/bio_prov.c",
"providers/common/capabilities.c",
"providers/common/der/der_rsa_sig.c",
"providers/common/der/der_sm2_key.c",
"providers/common/der/der_sm2_sig.c",
"providers/common/digest_to_nid.c",
"providers/common/provider_seeding.c",
"providers/common/provider_util.c",
"providers/common/securitycheck.c",
"providers/common/securitycheck_default.c",
"providers/implementations/asymciphers/rsa_enc.c",
"providers/implementations/asymciphers/sm2_enc.c",
"providers/implementations/ciphers/cipher_aes.c",
"providers/implementations/ciphers/cipher_aes_cbc_hmac_sha.c",
"providers/implementations/ciphers/cipher_aes_cbc_hmac_sha1_hw.c",
"providers/implementations/ciphers/cipher_aes_cbc_hmac_sha256_hw.c",
"providers/implementations/ciphers/cipher_aes_ccm.c",
"providers/implementations/ciphers/cipher_aes_ccm_hw.c",
"providers/implementations/ciphers/cipher_aes_gcm.c",
"providers/implementations/ciphers/cipher_aes_gcm_hw.c",
"providers/implementations/ciphers/cipher_aes_hw.c",
"providers/implementations/ciphers/cipher_aes_ocb.c",
"providers/implementations/ciphers/cipher_aes_ocb_hw.c",
"providers/implementations/ciphers/cipher_aes_siv.c",
"providers/implementations/ciphers/cipher_aes_siv_hw.c",
"providers/implementations/ciphers/cipher_aes_wrp.c",
"providers/implementations/ciphers/cipher_aes_xts.c",
"providers/implementations/ciphers/cipher_aes_xts_fips.c",
"providers/implementations/ciphers/cipher_aes_xts_hw.c",
"providers/implementations/ciphers/cipher_aria.c",
"providers/implementations/ciphers/cipher_aria_ccm.c",
"providers/implementations/ciphers/cipher_aria_ccm_hw.c",
"providers/implementations/ciphers/cipher_aria_gcm.c",
"providers/implementations/ciphers/cipher_aria_gcm_hw.c",
"providers/implementations/ciphers/cipher_aria_hw.c",
"providers/implementations/ciphers/cipher_camellia.c",
"providers/implementations/ciphers/cipher_camellia_hw.c",
"providers/implementations/ciphers/cipher_chacha20.c",
"providers/implementations/ciphers/cipher_chacha20_hw.c",
"providers/implementations/ciphers/cipher_chacha20_poly1305.c",
"providers/implementations/ciphers/cipher_chacha20_poly1305_hw.c",
"providers/implementations/ciphers/cipher_cts.c",
"providers/implementations/ciphers/cipher_null.c",
"providers/implementations/ciphers/cipher_sm4.c",
"providers/implementations/ciphers/cipher_sm4_hw.c",
"providers/implementations/ciphers/cipher_tdes.c",
"providers/implementations/ciphers/cipher_tdes_common.c",
"providers/implementations/ciphers/cipher_tdes_default.c",
"providers/implementations/ciphers/cipher_tdes_default_hw.c",
"providers/implementations/ciphers/cipher_tdes_hw.c",
"providers/implementations/ciphers/cipher_tdes_wrap.c",
"providers/implementations/ciphers/cipher_tdes_wrap_hw.c",
"providers/implementations/digests/blake2_prov.c",
"providers/implementations/digests/blake2b_prov.c",
"providers/implementations/digests/blake2s_prov.c",
"providers/implementations/digests/md5_prov.c",
"providers/implementations/digests/md5_sha1_prov.c",
"providers/implementations/digests/null_prov.c",
"providers/implementations/digests/ripemd_prov.c",
"providers/implementations/digests/sha2_prov.c",
"providers/implementations/digests/sha3_prov.c",
"providers/implementations/digests/sm3_prov.c",
"providers/implementations/encode_decode/decode_der2key.c",
"providers/implementations/encode_decode/decode_epki2pki.c",
"providers/implementations/encode_decode/decode_msblob2key.c",
"providers/implementations/encode_decode/decode_pem2der.c",
"providers/implementations/encode_decode/decode_pvk2key.c",
"providers/implementations/encode_decode/decode_spki2typespki.c",
"providers/implementations/encode_decode/encode_key2any.c",
"providers/implementations/encode_decode/encode_key2blob.c",
"providers/implementations/encode_decode/encode_key2ms.c",
"providers/implementations/encode_decode/encode_key2text.c",
"providers/implementations/encode_decode/endecoder_common.c",
"providers/implementations/exchange/dh_exch.c",
"providers/implementations/exchange/ecdh_exch.c",
"providers/implementations/exchange/ecx_exch.c",
"providers/implementations/exchange/kdf_exch.c",
"providers/implementations/kdfs/hkdf.c",
"providers/implementations/kdfs/kbkdf.c",
"providers/implementations/kdfs/krb5kdf.c",
"providers/implementations/kdfs/pbkdf2.c",
"providers/implementations/kdfs/pbkdf2_fips.c",
"providers/implementations/kdfs/pkcs12kdf.c",
"providers/implementations/kdfs/scrypt.c",
"providers/implementations/kdfs/sshkdf.c",
"providers/implementations/kdfs/sskdf.c",
"providers/implementations/kdfs/tls1_prf.c",
"providers/implementations/kdfs/x942kdf.c",
"providers/implementations/kem/rsa_kem.c",
"providers/implementations/keymgmt/dh_kmgmt.c",
"providers/implementations/keymgmt/dsa_kmgmt.c",
"providers/implementations/keymgmt/ec_kmgmt.c",
"providers/implementations/keymgmt/ecx_kmgmt.c",
"providers/implementations/keymgmt/kdf_legacy_kmgmt.c",
"providers/implementations/keymgmt/mac_legacy_kmgmt.c",
"providers/implementations/keymgmt/rsa_kmgmt.c",
"providers/implementations/macs/blake2b_mac.c",
"providers/implementations/macs/blake2s_mac.c",
"providers/implementations/macs/cmac_prov.c",
"providers/implementations/macs/gmac_prov.c",
"providers/implementations/macs/hmac_prov.c",
"providers/implementations/macs/kmac_prov.c",
"providers/implementations/macs/poly1305_prov.c",
"providers/implementations/macs/siphash_prov.c",
"providers/implementations/rands/crngt.c",
"providers/implementations/rands/drbg.c",
"providers/implementations/rands/drbg_ctr.c",
"providers/implementations/rands/drbg_hash.c",
"providers/implementations/rands/drbg_hmac.c",
"providers/implementations/rands/seed_src.c",
"providers/implementations/rands/seeding/rand_cpu_x86.c",
"providers/implementations/rands/seeding/rand_tsc.c",
"providers/implementations/rands/seeding/rand_unix.c",
"providers/implementations/rands/seeding/rand_win.c",
"providers/implementations/rands/test_rng.c",
"providers/implementations/signature/dsa_sig.c",
"providers/implementations/signature/ecdsa_sig.c",
"providers/implementations/signature/eddsa_sig.c",
"providers/implementations/signature/mac_legacy_sig.c",
"providers/implementations/signature/rsa_sig.c",
"providers/implementations/signature/sm2_sig.c",
"providers/implementations/storemgmt/file_store.c",
"providers/implementations/storemgmt/file_store_any2obj.c",
"ssl/s3_cbc.c",
]
liblegacy_sources = [
"providers/implementations/ciphers/cipher_blowfish.c",
"providers/implementations/ciphers/cipher_blowfish_hw.c",
"providers/implementations/ciphers/cipher_cast5.c",
"providers/implementations/ciphers/cipher_cast5_hw.c",
"providers/implementations/ciphers/cipher_des.c",
"providers/implementations/ciphers/cipher_des_hw.c",
"providers/implementations/ciphers/cipher_desx.c",
"providers/implementations/ciphers/cipher_desx_hw.c",
"providers/implementations/ciphers/cipher_idea.c",
"providers/implementations/ciphers/cipher_idea_hw.c",
"providers/implementations/ciphers/cipher_rc2.c",
"providers/implementations/ciphers/cipher_rc2_hw.c",
"providers/implementations/ciphers/cipher_rc4.c",
"providers/implementations/ciphers/cipher_rc4_hmac_md5.c",
"providers/implementations/ciphers/cipher_rc4_hmac_md5_hw.c",
"providers/implementations/ciphers/cipher_rc4_hw.c",
"providers/implementations/ciphers/cipher_seed.c",
"providers/implementations/ciphers/cipher_seed_hw.c",
"providers/implementations/digests/md4_prov.c",
"providers/implementations/digests/mdc2_prov.c",
"providers/implementations/digests/wp_prov.c",
"providers/implementations/kdfs/pbkdf1.c",
]
ohos_source_set("crypto_source") {
subsystem_name = "thirdparty"
part_name = "openssl"
sources = [
"crypto/aes/aes_cfb.c",
"crypto/aes/aes_ecb.c",
"crypto/aes/aes_ige.c",
"crypto/aes/aes_misc.c",
"crypto/aes/aes_ofb.c",
"crypto/aes/aes_wrap.c",
"crypto/aria/aria.c",
"crypto/asn1/a_bitstr.c",
"crypto/asn1/a_d2i_fp.c",
"crypto/asn1/a_digest.c",
"crypto/asn1/a_dup.c",
"crypto/asn1/a_gentm.c",
"crypto/asn1/a_i2d_fp.c",
"crypto/asn1/a_int.c",
"crypto/asn1/a_mbstr.c",
"crypto/asn1/a_object.c",
"crypto/asn1/a_octet.c",
"crypto/asn1/a_print.c",
"crypto/asn1/a_sign.c",
"crypto/asn1/a_strex.c",
"crypto/asn1/a_strnid.c",
"crypto/asn1/a_time.c",
"crypto/asn1/a_type.c",
"crypto/asn1/a_utctm.c",
"crypto/asn1/a_utf8.c",
"crypto/asn1/a_verify.c",
"crypto/asn1/ameth_lib.c",
"crypto/asn1/asn1_err.c",
"crypto/asn1/asn1_gen.c",
"crypto/asn1/asn1_item_list.c",
"crypto/asn1/asn1_lib.c",
"crypto/asn1/asn1_parse.c",
"crypto/asn1/asn_mime.c",
"crypto/asn1/asn_moid.c",
"crypto/asn1/asn_mstbl.c",
"crypto/asn1/asn_pack.c",
"crypto/asn1/bio_asn1.c",
"crypto/asn1/bio_ndef.c",
"crypto/asn1/d2i_param.c",
"crypto/asn1/d2i_pr.c",
"crypto/asn1/d2i_pu.c",
"crypto/asn1/evp_asn1.c",
"crypto/asn1/f_int.c",
"crypto/asn1/f_string.c",
"crypto/asn1/i2d_evp.c",
"crypto/asn1/n_pkey.c",
"crypto/asn1/nsseq.c",
"crypto/asn1/p5_pbe.c",
"crypto/asn1/p5_pbev2.c",
"crypto/asn1/p5_scrypt.c",
"crypto/asn1/p8_pkey.c",
"crypto/asn1/t_bitst.c",
"crypto/asn1/t_pkey.c",
"crypto/asn1/t_spki.c",
"crypto/asn1/tasn_dec.c",
"crypto/asn1/tasn_enc.c",
"crypto/asn1/tasn_fre.c",
"crypto/asn1/tasn_new.c",
"crypto/asn1/tasn_prn.c",
"crypto/asn1/tasn_scn.c",
"crypto/asn1/tasn_typ.c",
"crypto/asn1/tasn_utl.c",
"crypto/asn1/x_algor.c",
"crypto/asn1/x_bignum.c",
"crypto/asn1/x_info.c",
"crypto/asn1/x_int64.c",
"crypto/asn1/x_long.c",
"crypto/asn1/x_pkey.c",
"crypto/asn1/x_sig.c",
"crypto/asn1/x_spki.c",
"crypto/asn1/x_val.c",
"crypto/asn1_dsa.c",
"crypto/async/arch/async_null.c",
"crypto/async/arch/async_posix.c",
"crypto/async/arch/async_win.c",
"crypto/async/async.c",
"crypto/async/async_err.c",
"crypto/async/async_wait.c",
"crypto/bf/bf_cfb64.c",
"crypto/bf/bf_ecb.c",
"crypto/bf/bf_enc.c",
"crypto/bf/bf_ofb64.c",
"crypto/bf/bf_skey.c",
"crypto/bio/bf_buff.c",
"crypto/bio/bf_lbuf.c",
"crypto/bio/bf_nbio.c",
"crypto/bio/bf_null.c",
"crypto/bio/bf_prefix.c",
"crypto/bio/bf_readbuff.c",
"crypto/bio/bio_addr.c",
"crypto/bio/bio_cb.c",
"crypto/bio/bio_dump.c",
"crypto/bio/bio_err.c",
"crypto/bio/bio_lib.c",
"crypto/bio/bio_meth.c",
"crypto/bio/bio_print.c",
"crypto/bio/bio_sock.c",
"crypto/bio/bio_sock2.c",
"crypto/bio/bss_acpt.c",
"crypto/bio/bss_bio.c",
"crypto/bio/bss_conn.c",
"crypto/bio/bss_core.c",
"crypto/bio/bss_dgram.c",
"crypto/bio/bss_fd.c",
"crypto/bio/bss_file.c",
"crypto/bio/bss_log.c",
"crypto/bio/bss_mem.c",
"crypto/bio/bss_null.c",
"crypto/bio/bss_sock.c",
"crypto/bio/ossl_core_bio.c",
"crypto/bn/bn_add.c",
"crypto/bn/bn_blind.c",
"crypto/bn/bn_const.c",
"crypto/bn/bn_conv.c",
"crypto/bn/bn_ctx.c",
"crypto/bn/bn_depr.c",
"crypto/bn/bn_dh.c",
"crypto/bn/bn_div.c",
"crypto/bn/bn_err.c",
"crypto/bn/bn_exp.c",
"crypto/bn/bn_exp2.c",
"crypto/bn/bn_gcd.c",
"crypto/bn/bn_gf2m.c",
"crypto/bn/bn_intern.c",
"crypto/bn/bn_kron.c",
"crypto/bn/bn_lib.c",
"crypto/bn/bn_mod.c",
"crypto/bn/bn_mont.c",
"crypto/bn/bn_mpi.c",
"crypto/bn/bn_mul.c",
"crypto/bn/bn_nist.c",
"crypto/bn/bn_prime.c",
"crypto/bn/bn_print.c",
"crypto/bn/bn_rand.c",
"crypto/bn/bn_recp.c",
"crypto/bn/bn_rsa_fips186_4.c",
"crypto/bn/bn_shift.c",
"crypto/bn/bn_sqr.c",
"crypto/bn/bn_sqrt.c",
"crypto/bn/bn_srp.c",
"crypto/bn/bn_word.c",
"crypto/bn/bn_x931p.c",
"crypto/bn/rsa_sup_mul.c",
"crypto/bsearch.c",
"crypto/buffer/buf_err.c",
"crypto/buffer/buffer.c",
"crypto/camellia/cmll_cfb.c",
"crypto/camellia/cmll_ctr.c",
"crypto/camellia/cmll_ecb.c",
"crypto/camellia/cmll_misc.c",
"crypto/camellia/cmll_ofb.c",
"crypto/cast/c_cfb64.c",
"crypto/cast/c_ecb.c",
"crypto/cast/c_enc.c",
"crypto/cast/c_ofb64.c",
"crypto/cast/c_skey.c",
"crypto/cmac/cmac.c",
"crypto/cmp/cmp_asn.c",
"crypto/cmp/cmp_client.c",
"crypto/cmp/cmp_ctx.c",
"crypto/cmp/cmp_err.c",
"crypto/cmp/cmp_hdr.c",
"crypto/cmp/cmp_http.c",
"crypto/cmp/cmp_msg.c",
"crypto/cmp/cmp_protect.c",
"crypto/cmp/cmp_server.c",
"crypto/cmp/cmp_status.c",
"crypto/cmp/cmp_util.c",
"crypto/cmp/cmp_vfy.c",
"crypto/cms/cms_asn1.c",
"crypto/cms/cms_att.c",
"crypto/cms/cms_cd.c",
"crypto/cms/cms_dd.c",
"crypto/cms/cms_dh.c",
"crypto/cms/cms_ec.c",
"crypto/cms/cms_enc.c",
"crypto/cms/cms_env.c",
"crypto/cms/cms_err.c",
"crypto/cms/cms_ess.c",
"crypto/cms/cms_io.c",
"crypto/cms/cms_kari.c",
"crypto/cms/cms_lib.c",
"crypto/cms/cms_pwri.c",
"crypto/cms/cms_rsa.c",
"crypto/cms/cms_sd.c",
"crypto/cms/cms_smime.c",
"crypto/comp/c_zlib.c",
"crypto/comp/comp_err.c",
"crypto/comp/comp_lib.c",
"crypto/conf/conf_api.c",
"crypto/conf/conf_def.c",
"crypto/conf/conf_err.c",
"crypto/conf/conf_lib.c",
"crypto/conf/conf_mall.c",
"crypto/conf/conf_mod.c",
"crypto/conf/conf_sap.c",
"crypto/conf/conf_ssl.c",
"crypto/context.c",
"crypto/core_algorithm.c",
"crypto/core_fetch.c",
"crypto/core_namemap.c",
"crypto/cpt_err.c",
"crypto/cpuid.c",
"crypto/crmf/crmf_asn.c",
"crypto/crmf/crmf_err.c",
"crypto/crmf/crmf_lib.c",
"crypto/crmf/crmf_pbm.c",
"crypto/cryptlib.c",
"crypto/ct/ct_b64.c",
"crypto/ct/ct_err.c",
"crypto/ct/ct_log.c",
"crypto/ct/ct_oct.c",
"crypto/ct/ct_policy.c",
"crypto/ct/ct_prn.c",
"crypto/ct/ct_sct.c",
"crypto/ct/ct_sct_ctx.c",
"crypto/ct/ct_vfy.c",
"crypto/ct/ct_x509v3.c",
"crypto/ctype.c",
"crypto/cversion.c",
"crypto/der_writer.c",
"crypto/des/cbc_cksm.c",
"crypto/des/cbc_enc.c",
"crypto/des/cfb64ede.c",
"crypto/des/cfb64enc.c",
"crypto/des/cfb_enc.c",
"crypto/des/des_enc.c",
"crypto/des/ecb3_enc.c",
"crypto/des/ecb_enc.c",
"crypto/des/fcrypt.c",
"crypto/des/fcrypt_b.c",
"crypto/des/ofb64ede.c",
"crypto/des/ofb64enc.c",
"crypto/des/ofb_enc.c",
"crypto/des/pcbc_enc.c",
"crypto/des/qud_cksm.c",
"crypto/des/rand_key.c",
"crypto/des/set_key.c",
"crypto/des/str2key.c",
"crypto/des/xcbc_enc.c",
"crypto/dh/dh_ameth.c",
"crypto/dh/dh_asn1.c",
"crypto/dh/dh_backend.c",
"crypto/dh/dh_check.c",
"crypto/dh/dh_depr.c",
"crypto/dh/dh_err.c",
"crypto/dh/dh_gen.c",
"crypto/dh/dh_group_params.c",
"crypto/dh/dh_kdf.c",
"crypto/dh/dh_key.c",
"crypto/dh/dh_lib.c",
"crypto/dh/dh_meth.c",
"crypto/dh/dh_pmeth.c",
"crypto/dh/dh_prn.c",
"crypto/dh/dh_rfc5114.c",
"crypto/dsa/dsa_ameth.c",
"crypto/dsa/dsa_asn1.c",
"crypto/dsa/dsa_backend.c",
"crypto/dsa/dsa_check.c",
"crypto/dsa/dsa_depr.c",
"crypto/dsa/dsa_err.c",
"crypto/dsa/dsa_gen.c",
"crypto/dsa/dsa_key.c",
"crypto/dsa/dsa_lib.c",
"crypto/dsa/dsa_meth.c",
"crypto/dsa/dsa_ossl.c",
"crypto/dsa/dsa_pmeth.c",
"crypto/dsa/dsa_prn.c",
"crypto/dsa/dsa_sign.c",
"crypto/dsa/dsa_vrf.c",
"crypto/dso/dso_dl.c",
"crypto/dso/dso_dlfcn.c",
"crypto/dso/dso_err.c",
"crypto/dso/dso_lib.c",
"crypto/dso/dso_openssl.c",
"crypto/dso/dso_vms.c",
"crypto/dso/dso_win32.c",
"crypto/ebcdic.c",
"crypto/ec/curve25519.c",
"crypto/ec/curve448/arch_32/f_impl32.c",
"crypto/ec/curve448/arch_64/f_impl64.c",
"crypto/ec/curve448/curve448.c",
"crypto/ec/curve448/curve448_tables.c",
"crypto/ec/curve448/eddsa.c",
"crypto/ec/curve448/f_generic.c",
"crypto/ec/curve448/scalar.c",
"crypto/ec/ec2_oct.c",
"crypto/ec/ec2_smpl.c",
"crypto/ec/ec_ameth.c",
"crypto/ec/ec_asn1.c",
"crypto/ec/ec_backend.c",
"crypto/ec/ec_check.c",
"crypto/ec/ec_curve.c",
"crypto/ec/ec_cvt.c",
"crypto/ec/ec_deprecated.c",
"crypto/ec/ec_err.c",
"crypto/ec/ec_key.c",
"crypto/ec/ec_kmeth.c",
"crypto/ec/ec_lib.c",
"crypto/ec/ec_mult.c",
"crypto/ec/ec_oct.c",
"crypto/ec/ec_pmeth.c",
"crypto/ec/ec_print.c",
"crypto/ec/ecdh_kdf.c",
"crypto/ec/ecdh_ossl.c",
"crypto/ec/ecdsa_ossl.c",
"crypto/ec/ecdsa_sign.c",
"crypto/ec/ecdsa_vrf.c",
"crypto/ec/eck_prn.c",
"crypto/ec/ecp_mont.c",
"crypto/ec/ecp_nist.c",
"crypto/ec/ecp_nistz256.c",
"crypto/ec/ecp_oct.c",
"crypto/ec/ecp_smpl.c",
"crypto/ec/ecx_backend.c",
"crypto/ec/ecx_key.c",
"crypto/ec/ecx_meth.c",
"crypto/encode_decode/decoder_err.c",
"crypto/encode_decode/decoder_lib.c",
"crypto/encode_decode/decoder_meth.c",
"crypto/encode_decode/decoder_pkey.c",
"crypto/encode_decode/encoder_err.c",
"crypto/encode_decode/encoder_lib.c",
"crypto/encode_decode/encoder_meth.c",
"crypto/encode_decode/encoder_pkey.c",
"crypto/engine/eng_all.c",
"crypto/engine/eng_cnf.c",
"crypto/engine/eng_ctrl.c",
"crypto/engine/eng_dyn.c",
"crypto/engine/eng_err.c",
"crypto/engine/eng_fat.c",
"crypto/engine/eng_init.c",
"crypto/engine/eng_lib.c",
"crypto/engine/eng_list.c",
"crypto/engine/eng_openssl.c",
"crypto/engine/eng_pkey.c",
"crypto/engine/eng_rdrand.c",
"crypto/engine/eng_table.c",
"crypto/engine/tb_asnmth.c",
"crypto/engine/tb_cipher.c",
"crypto/engine/tb_dh.c",
"crypto/engine/tb_digest.c",
"crypto/engine/tb_dsa.c",
"crypto/engine/tb_eckey.c",
"crypto/engine/tb_pkmeth.c",
"crypto/engine/tb_rand.c",
"crypto/engine/tb_rsa.c",
"crypto/err/err.c",
"crypto/err/err_all.c",
"crypto/err/err_all_legacy.c",
"crypto/err/err_blocks.c",
"crypto/err/err_prn.c",
"crypto/ess/ess_asn1.c",
"crypto/ess/ess_err.c",
"crypto/ess/ess_lib.c",
"crypto/evp/asymcipher.c",
"crypto/evp/bio_b64.c",
"crypto/evp/bio_enc.c",
"crypto/evp/bio_md.c",
"crypto/evp/bio_ok.c",
"crypto/evp/c_allc.c",
"crypto/evp/c_alld.c",
"crypto/evp/cmeth_lib.c",
"crypto/evp/ctrl_params_translate.c",
"crypto/evp/dh_ctrl.c",
"crypto/evp/dh_support.c",
"crypto/evp/digest.c",
"crypto/evp/dsa_ctrl.c",
"crypto/evp/e_aes.c",
"crypto/evp/e_aes_cbc_hmac_sha1.c",
"crypto/evp/e_aes_cbc_hmac_sha256.c",
"crypto/evp/e_aria.c",
"crypto/evp/e_bf.c",
"crypto/evp/e_camellia.c",
"crypto/evp/e_cast.c",
"crypto/evp/e_chacha20_poly1305.c",
"crypto/evp/e_des.c",
"crypto/evp/e_des3.c",
"crypto/evp/e_idea.c",
"crypto/evp/e_null.c",
"crypto/evp/e_old.c",
"crypto/evp/e_rc2.c",
"crypto/evp/e_rc4.c",
"crypto/evp/e_rc4_hmac_md5.c",
"crypto/evp/e_rc5.c",
"crypto/evp/e_seed.c",
"crypto/evp/e_sm4.c",
"crypto/evp/e_xcbc_d.c",
"crypto/evp/ec_ctrl.c",
"crypto/evp/ec_support.c",
"crypto/evp/encode.c",
"crypto/evp/evp_cnf.c",
"crypto/evp/evp_enc.c",
"crypto/evp/evp_err.c",
"crypto/evp/evp_fetch.c",
"crypto/evp/evp_key.c",
"crypto/evp/evp_lib.c",
"crypto/evp/evp_pbe.c",
"crypto/evp/evp_pkey.c",
"crypto/evp/evp_rand.c",
"crypto/evp/evp_utils.c",
"crypto/evp/exchange.c",
"crypto/evp/kdf_lib.c",
"crypto/evp/kdf_meth.c",
"crypto/evp/kem.c",
"crypto/evp/keymgmt_lib.c",
"crypto/evp/keymgmt_meth.c",
"crypto/evp/legacy_blake2.c",
"crypto/evp/legacy_md4.c",
"crypto/evp/legacy_md5.c",
"crypto/evp/legacy_md5_sha1.c",
"crypto/evp/legacy_mdc2.c",
"crypto/evp/legacy_ripemd.c",
"crypto/evp/legacy_sha.c",
"crypto/evp/legacy_wp.c",
"crypto/evp/m_null.c",
"crypto/evp/m_sigver.c",
"crypto/evp/mac_lib.c",
"crypto/evp/mac_meth.c",
"crypto/evp/names.c",
"crypto/evp/p5_crpt.c",
"crypto/evp/p5_crpt2.c",
"crypto/evp/p_dec.c",
"crypto/evp/p_enc.c",
"crypto/evp/p_legacy.c",
"crypto/evp/p_lib.c",
"crypto/evp/p_open.c",
"crypto/evp/p_seal.c",
"crypto/evp/p_sign.c",
"crypto/evp/p_verify.c",
"crypto/evp/pbe_scrypt.c",
"crypto/evp/pmeth_check.c",
"crypto/evp/pmeth_gn.c",
"crypto/evp/pmeth_lib.c",
"crypto/evp/signature.c",
"crypto/ex_data.c",
"crypto/ffc/ffc_backend.c",
"crypto/ffc/ffc_dh.c",
"crypto/ffc/ffc_key_generate.c",
"crypto/ffc/ffc_key_validate.c",
"crypto/ffc/ffc_params.c",
"crypto/ffc/ffc_params_generate.c",
"crypto/ffc/ffc_params_validate.c",
"crypto/getenv.c",
"crypto/hmac/hmac.c",
"crypto/http/http_client.c",
"crypto/http/http_err.c",
"crypto/http/http_lib.c",
"crypto/idea/i_cbc.c",
"crypto/idea/i_cfb64.c",
"crypto/idea/i_ecb.c",
"crypto/idea/i_ofb64.c",
"crypto/idea/i_skey.c",
"crypto/info.c",
"crypto/init.c",
"crypto/initthread.c",
"crypto/kdf/kdf_err.c",
"crypto/lhash/lh_stats.c",
"crypto/lhash/lhash.c",
"crypto/md4/md4_dgst.c",
"crypto/md4/md4_one.c",
"crypto/md5/md5_dgst.c",
"crypto/md5/md5_one.c",
"crypto/md5/md5_sha1.c",
"crypto/mdc2/mdc2_one.c",
"crypto/mdc2/mdc2dgst.c",
"crypto/mem.c",
"crypto/mem_sec.c",
"crypto/modes/cbc128.c",
"crypto/modes/ccm128.c",
"crypto/modes/cfb128.c",
"crypto/modes/ctr128.c",
"crypto/modes/cts128.c",
"crypto/modes/gcm128.c",
"crypto/modes/ocb128.c",
"crypto/modes/ofb128.c",
"crypto/modes/siv128.c",
"crypto/modes/wrap128.c",
"crypto/modes/xts128.c",
"crypto/o_dir.c",
"crypto/o_fopen.c",
"crypto/o_init.c",
"crypto/o_str.c",
"crypto/o_time.c",
"crypto/objects/o_names.c",
"crypto/objects/obj_dat.c",
"crypto/objects/obj_err.c",
"crypto/objects/obj_lib.c",
"crypto/objects/obj_xref.c",
"crypto/ocsp/ocsp_asn.c",
"crypto/ocsp/ocsp_cl.c",
"crypto/ocsp/ocsp_err.c",
"crypto/ocsp/ocsp_ext.c",
"crypto/ocsp/ocsp_http.c",
"crypto/ocsp/ocsp_lib.c",
"crypto/ocsp/ocsp_prn.c",
"crypto/ocsp/ocsp_srv.c",
"crypto/ocsp/ocsp_vfy.c",
"crypto/ocsp/v3_ocsp.c",
"crypto/packet.c",
"crypto/param_build.c",
"crypto/param_build_set.c",
"crypto/params.c",
"crypto/params_dup.c",
"crypto/params_from_text.c",
"crypto/passphrase.c",
"crypto/pem/pem_all.c",
"crypto/pem/pem_err.c",
"crypto/pem/pem_info.c",
"crypto/pem/pem_lib.c",
"crypto/pem/pem_oth.c",
"crypto/pem/pem_pk8.c",
"crypto/pem/pem_pkey.c",
"crypto/pem/pem_sign.c",
"crypto/pem/pem_x509.c",
"crypto/pem/pem_xaux.c",
"crypto/pem/pvkfmt.c",
"crypto/pkcs12/p12_add.c",
"crypto/pkcs12/p12_asn.c",
"crypto/pkcs12/p12_attr.c",
"crypto/pkcs12/p12_crpt.c",
"crypto/pkcs12/p12_crt.c",
"crypto/pkcs12/p12_decr.c",
"crypto/pkcs12/p12_init.c",
"crypto/pkcs12/p12_key.c",
"crypto/pkcs12/p12_kiss.c",
"crypto/pkcs12/p12_mutl.c",
"crypto/pkcs12/p12_npas.c",
"crypto/pkcs12/p12_p8d.c",
"crypto/pkcs12/p12_p8e.c",
"crypto/pkcs12/p12_sbag.c",
"crypto/pkcs12/p12_utl.c",
"crypto/pkcs12/pk12err.c",
"crypto/pkcs7/bio_pk7.c",
"crypto/pkcs7/pk7_asn1.c",
"crypto/pkcs7/pk7_attr.c",
"crypto/pkcs7/pk7_doit.c",
"crypto/pkcs7/pk7_lib.c",
"crypto/pkcs7/pk7_mime.c",
"crypto/pkcs7/pk7_smime.c",
"crypto/pkcs7/pkcs7err.c",
"crypto/poly1305/poly1305.c",
"crypto/property/defn_cache.c",
"crypto/property/property.c",
"crypto/property/property_err.c",
"crypto/property/property_parse.c",
"crypto/property/property_query.c",
"crypto/property/property_string.c",
"crypto/provider.c",
"crypto/provider_child.c",
"crypto/provider_conf.c",
"crypto/provider_core.c",
"crypto/provider_predefined.c",
"crypto/punycode.c",
"crypto/rand/prov_seed.c",
"crypto/rand/rand_deprecated.c",
"crypto/rand/rand_err.c",
"crypto/rand/rand_lib.c",
"crypto/rand/rand_meth.c",
"crypto/rand/rand_pool.c",
"crypto/rand/randfile.c",
"crypto/rc2/rc2_cbc.c",
"crypto/rc2/rc2_ecb.c",
"crypto/rc2/rc2_skey.c",
"crypto/rc2/rc2cfb64.c",
"crypto/rc2/rc2ofb64.c",
"crypto/ripemd/rmd_dgst.c",
"crypto/ripemd/rmd_one.c",
"crypto/rsa/rsa_ameth.c",
"crypto/rsa/rsa_asn1.c",
"crypto/rsa/rsa_backend.c",
"crypto/rsa/rsa_chk.c",
"crypto/rsa/rsa_crpt.c",
"crypto/rsa/rsa_depr.c",
"crypto/rsa/rsa_err.c",
"crypto/rsa/rsa_gen.c",
"crypto/rsa/rsa_lib.c",
"crypto/rsa/rsa_meth.c",
"crypto/rsa/rsa_mp.c",
"crypto/rsa/rsa_mp_names.c",
"crypto/rsa/rsa_none.c",
"crypto/rsa/rsa_oaep.c",
"crypto/rsa/rsa_ossl.c",
"crypto/rsa/rsa_pk1.c",
"crypto/rsa/rsa_pmeth.c",
"crypto/rsa/rsa_prn.c",
"crypto/rsa/rsa_pss.c",
"crypto/rsa/rsa_saos.c",
"crypto/rsa/rsa_schemes.c",
"crypto/rsa/rsa_sign.c",
"crypto/rsa/rsa_sp800_56b_check.c",
"crypto/rsa/rsa_sp800_56b_gen.c",
"crypto/rsa/rsa_x931.c",
"crypto/rsa/rsa_x931g.c",
"crypto/seed/seed.c",
"crypto/seed/seed_cbc.c",
"crypto/seed/seed_cfb.c",
"crypto/seed/seed_ecb.c",
"crypto/seed/seed_ofb.c",
"crypto/self_test_core.c",
"crypto/sha/sha1_one.c",
"crypto/sha/sha1dgst.c",
"crypto/sha/sha256.c",
"crypto/sha/sha3.c",
"crypto/sha/sha512.c",
"crypto/siphash/siphash.c",
"crypto/sm2/sm2_crypt.c",
"crypto/sm2/sm2_err.c",
"crypto/sm2/sm2_key.c",
"crypto/sm2/sm2_sign.c",
"crypto/sm3/legacy_sm3.c",
"crypto/sm3/sm3.c",
"crypto/sm4/sm4.c",
"crypto/sparse_array.c",
"crypto/srp/srp_lib.c",
"crypto/srp/srp_vfy.c",
"crypto/stack/stack.c",
"crypto/store/store_err.c",
"crypto/store/store_init.c",
"crypto/store/store_lib.c",
"crypto/store/store_meth.c",
"crypto/store/store_register.c",
"crypto/store/store_result.c",
"crypto/store/store_strings.c",
"crypto/threads_lib.c",
"crypto/threads_none.c",
"crypto/threads_pthread.c",
"crypto/threads_win.c",
"crypto/trace.c",
"crypto/ts/ts_asn1.c",
"crypto/ts/ts_conf.c",
"crypto/ts/ts_err.c",
"crypto/ts/ts_lib.c",
"crypto/ts/ts_req_print.c",
"crypto/ts/ts_req_utils.c",
"crypto/ts/ts_rsp_print.c",
"crypto/ts/ts_rsp_sign.c",
"crypto/ts/ts_rsp_utils.c",
"crypto/ts/ts_rsp_verify.c",
"crypto/ts/ts_verify_ctx.c",
"crypto/txt_db/txt_db.c",
"crypto/ui/ui_err.c",
"crypto/ui/ui_lib.c",
"crypto/ui/ui_null.c",
"crypto/ui/ui_openssl.c",
"crypto/ui/ui_util.c",
"crypto/uid.c",
"crypto/whrlpool/wp_dgst.c",
"crypto/x509/by_dir.c",
"crypto/x509/by_file.c",
"crypto/x509/by_store.c",
"crypto/x509/pcy_cache.c",
"crypto/x509/pcy_data.c",
"crypto/x509/pcy_lib.c",
"crypto/x509/pcy_map.c",
"crypto/x509/pcy_node.c",
"crypto/x509/pcy_tree.c",
"crypto/x509/t_crl.c",
"crypto/x509/t_req.c",
"crypto/x509/t_x509.c",
"crypto/x509/v3_addr.c",
"crypto/x509/v3_admis.c",
"crypto/x509/v3_akeya.c",
"crypto/x509/v3_akid.c",
"crypto/x509/v3_asid.c",
"crypto/x509/v3_bcons.c",
"crypto/x509/v3_bitst.c",
"crypto/x509/v3_conf.c",
"crypto/x509/v3_cpols.c",
"crypto/x509/v3_crld.c",
"crypto/x509/v3_enum.c",
"crypto/x509/v3_extku.c",
"crypto/x509/v3_genn.c",
"crypto/x509/v3_ia5.c",
"crypto/x509/v3_info.c",
"crypto/x509/v3_int.c",
"crypto/x509/v3_ist.c",
"crypto/x509/v3_lib.c",
"crypto/x509/v3_ncons.c",
"crypto/x509/v3_pci.c",
"crypto/x509/v3_pcia.c",
"crypto/x509/v3_pcons.c",
"crypto/x509/v3_pku.c",
"crypto/x509/v3_pmaps.c",
"crypto/x509/v3_prn.c",
"crypto/x509/v3_purp.c",
"crypto/x509/v3_san.c",
"crypto/x509/v3_skid.c",
"crypto/x509/v3_sxnet.c",
"crypto/x509/v3_tlsf.c",
"crypto/x509/v3_utf8.c",
"crypto/x509/v3_utl.c",
"crypto/x509/v3err.c",
"crypto/x509/x509_att.c",
"crypto/x509/x509_cmp.c",
"crypto/x509/x509_d2.c",
"crypto/x509/x509_def.c",
"crypto/x509/x509_err.c",
"crypto/x509/x509_ext.c",
"crypto/x509/x509_lu.c",
"crypto/x509/x509_meth.c",
"crypto/x509/x509_obj.c",
"crypto/x509/x509_r2x.c",
"crypto/x509/x509_req.c",
"crypto/x509/x509_set.c",
"crypto/x509/x509_trust.c",
"crypto/x509/x509_txt.c",
"crypto/x509/x509_v3.c",
"crypto/x509/x509_vfy.c",
"crypto/x509/x509_vpm.c",
"crypto/x509/x509cset.c",
"crypto/x509/x509name.c",
"crypto/x509/x509rset.c",
"crypto/x509/x509spki.c",
"crypto/x509/x509type.c",
"crypto/x509/x_all.c",
"crypto/x509/x_attrib.c",
"crypto/x509/x_crl.c",
"crypto/x509/x_exten.c",
"crypto/x509/x_name.c",
"crypto/x509/x_pubkey.c",
"crypto/x509/x_req.c",
"crypto/x509/x_x509.c",
"crypto/x509/x_x509a.c",
"engines/e_capi.c",
"engines/e_padlock.c",
"providers/baseprov.c",
"providers/defltprov.c",
"providers/legacyprov.c",
"providers/nullprov.c",
"providers/prov_running.c",
]
sources += libcommon_common_sources
sources += libcommon_build_all_generated_selected_platform_sources
sources += libdefault_common_sources
sources += libdefault_build_all_generated_selected_platform_sources
sources += libcrypto_build_all_generated_selected_platform_sources
sources += liblegacy_sources
if (openssl_selected_platform == "linux-armv4") {
sources += [
"crypto/aes/aes_cbc.c",
"crypto/armcap.c",
"crypto/bn/bn_asm.c",
"crypto/camellia/camellia.c",
"crypto/camellia/cmll_cbc.c",
"crypto/rc4/rc4_enc.c",
"crypto/rc4/rc4_skey.c",
"crypto/whrlpool/wp_block.c",
"engines/e_afalg.c",
]
} else if (openssl_selected_platform == "linux-aarch64") {
sources += [
"crypto/aes/aes_cbc.c",
"crypto/aes/aes_core.c",
"crypto/armcap.c",
"crypto/bn/bn_asm.c",
"crypto/camellia/camellia.c",
"crypto/camellia/cmll_cbc.c",
"crypto/rc4/rc4_enc.c",
"crypto/rc4/rc4_skey.c",
"crypto/whrlpool/wp_block.c",
"engines/e_afalg.c",
]
} else if (openssl_selected_platform == "darwin64-x86_64-cc") {
sources += [
"crypto/bn/asm/x86_64-gcc.c",
"crypto/bn/rsaz_exp.c",
"crypto/bn/rsaz_exp_x2.c",
]
} else if (openssl_selected_platform == "darwin64-arm64-cc") {
sources += [
"crypto/aes/aes_cbc.c",
"crypto/aes/aes_core.c",
"crypto/armcap.c",
"crypto/bn/bn_asm.c",
"crypto/camellia/camellia.c",
"crypto/camellia/cmll_cbc.c",
"crypto/rc4/rc4_enc.c",
"crypto/rc4/rc4_skey.c",
"crypto/whrlpool/wp_block.c",
]
} else if (openssl_selected_platform == "linux-x86_64") {
sources += [
"crypto/bn/asm/x86_64-gcc.c",
"crypto/bn/rsaz_exp.c",
"crypto/bn/rsaz_exp_x2.c",
"engines/e_afalg.c",
]
} else if (openssl_selected_platform == "mingw64") {
sources += [
"crypto/bn/asm/x86_64-gcc.c",
"crypto/bn/rsaz_exp.c",
"crypto/bn/rsaz_exp_x2.c",
"crypto/dllmain.c",
]
}
configs = [ ":crypto_config_private" ]
public_configs = [ ":crypto_config_public" ]
deps = [ ":openssl_build_all_generated" ]
}
ohos_static_library("libcrypto_static") {
subsystem_name = "thirdparty"
part_name = "openssl"
deps = [ ":crypto_source" ]
public_configs = [ ":crypto_config_public" ]
complete_static_lib = true
}
if (is_mingw || is_mac) {
ohos_shared_library("libcrypto_restool") {
deps = [ ":crypto_source" ]
subsystem_name = "thirdparty"
part_name = "openssl"
public_configs = [ ":crypto_config_public" ]
install_images = [
"system",
"updater",
]
}
}
ohos_shared_library("libcrypto_shared") {
deps = [
":crypto_source",
":openssl.cnf",
]
output_name = "libcrypto_openssl"
subsystem_name = "thirdparty"
part_name = "openssl"
innerapi_tags = [
"platformsdk",
"chipsetsdk",
]
public_configs = [ ":crypto_config_public" ]
install_images = [
"system",
"updater",
]
}
unused_variables = []
unused_variables += unused_variables
unused_variables += crypto_config_common_private_include_dirs
unused_variables += crypto_config_common_public_include_dirs
unused_variables += crypto_config_common_cflags
unused_variables += crypto_config_linux_armv4_cflags
unused_variables += crypto_config_linux_aarch64_cflags
unused_variables += crypto_config_darwin64_x86_64_cc_cflags
unused_variables += crypto_config_darwin64_arm64_cc_cflags
unused_variables += crypto_config_linux_x86_64_cflags
unused_variables += crypto_config_mingw64_cflags
unused_variables += libcommon_common_sources
unused_variables += libdefault_common_sources
unused_variables += libcrypto_build_all_generated_linux_armv4_sources
unused_variables += libcrypto_build_all_generated_linux_aarch64_sources
unused_variables += libcrypto_build_all_generated_darwin64_x86_64_cc_sources
unused_variables += libcrypto_build_all_generated_darwin64_arm64_cc_sources
unused_variables += libcrypto_build_all_generated_linux_x86_64_sources
unused_variables += libcrypto_build_all_generated_mingw64_sources
config("ssl_config_private") {
include_dirs = crypto_config_common_private_include_dirs
cflags = crypto_config_common_cflags + crypto_config_current_platform_cflags +
openssl_internal_cflags
}
config("ssl_config_public") {
include_dirs = crypto_config_common_public_include_dirs
}
ohos_source_set("ssl_source") {
subsystem_name = "thirdparty"
part_name = "openssl"
sources = [
"ssl/bio_ssl.c",
"ssl/d1_lib.c",
"ssl/d1_msg.c",
"ssl/d1_srtp.c",
"ssl/methods.c",
"ssl/pqueue.c",
"ssl/record/dtls1_bitmap.c",
"ssl/record/rec_layer_d1.c",
"ssl/record/rec_layer_s3.c",
"ssl/record/ssl3_buffer.c",
"ssl/record/ssl3_record.c",
"ssl/record/ssl3_record_tls13.c",
# ssl/s3_cbc.c has been added into libdefault_common_sources
"ssl/s3_enc.c",
"ssl/s3_lib.c",
"ssl/s3_msg.c",
"ssl/ssl_asn1.c",
"ssl/ssl_cert.c",
"ssl/ssl_ciph.c",
"ssl/ssl_conf.c",
"ssl/ssl_err.c",
"ssl/ssl_err_legacy.c",
"ssl/ssl_init.c",
"ssl/ssl_lib.c",
"ssl/ssl_mcnf.c",
"ssl/ssl_rsa.c",
"ssl/ssl_rsa_legacy.c",
"ssl/ssl_sess.c",
"ssl/ssl_stat.c",
"ssl/ssl_txt.c",
"ssl/ssl_utst.c",
# ssl/record/tls_pad.c has been added into libcommon_common_sources
"ssl/statem/extensions.c",
"ssl/statem/extensions_clnt.c",
"ssl/statem/extensions_cust.c",
"ssl/statem/extensions_srvr.c",
"ssl/statem/statem.c",
"ssl/statem/statem_clnt.c",
"ssl/statem/statem_dtls.c",
"ssl/statem/statem_lib.c",
"ssl/statem/statem_srvr.c",
"ssl/t1_enc.c",
"ssl/t1_lib.c",
"ssl/t1_trce.c",
"ssl/tls13_enc.c",
"ssl/tls_depr.c",
"ssl/tls_srp.c",
]
configs = [ ":ssl_config_private" ]
public_configs = [ ":ssl_config_public" ]
deps = [ ":openssl_build_all_generated" ]
}
ohos_static_library("libssl_static") {
subsystem_name = "thirdparty"
part_name = "openssl"
deps = [ ":ssl_source" ]
public_configs = [ ":ssl_config_public" ]
complete_static_lib = true
}
ohos_shared_library("libssl_shared") {
deps = [
":libcrypto_shared",
":openssl.cnf",
":ssl_source",
]
output_name = "libssl_openssl"
subsystem_name = "thirdparty"
part_name = "openssl"
innerapi_tags = [ "platformsdk" ]
public_configs = [
":crypto_config_public",
":ssl_config_public",
]
install_images = [
"system",
# compile libssl_openssl.z.so to the updater image for wpa to use
"updater",
]
}
ohos_static_library("libapps") {
sources = [
"apps/lib/app_libctx.c",
"apps/lib/app_params.c",
"apps/lib/app_provider.c",
"apps/lib/app_rand.c",
"apps/lib/app_x509.c",
"apps/lib/apps.c",
"apps/lib/apps_ui.c",
"apps/lib/columns.c",
"apps/lib/engine.c",
"apps/lib/engine_loader.c",
"apps/lib/fmt.c",
"apps/lib/http_server.c",
"apps/lib/names.c",
"apps/lib/opt.c",
"apps/lib/s_cb.c",
"apps/lib/s_socket.c",
"apps/lib/tlssrp_depr.c",
]
if (openssl_selected_platform == "mingw64") {
sources += [ "apps/lib/win32_init.c" ]
}
subsystem_name = "thirdparty"
part_name = "openssl"
configs = [ ":crypto_config_private" ]
}
ohos_executable("openssl") {
sources = [
"${openssl_selected_platform_full_path}/apps/progs.c",
"apps/asn1parse.c",
"apps/ca.c",
"apps/ciphers.c",
"apps/cmp.c",
"apps/cms.c",
"apps/crl.c",
"apps/crl2pkcs7.c",
"apps/dgst.c",
"apps/dhparam.c",
"apps/dsa.c",
"apps/dsaparam.c",
"apps/ec.c",
"apps/ecparam.c",
"apps/enc.c",
"apps/engine.c",
"apps/errstr.c",
"apps/fipsinstall.c",
"apps/gendsa.c",
"apps/genpkey.c",
"apps/genrsa.c",
"apps/info.c",
"apps/kdf.c",
"apps/lib/cmp_mock_srv.c",
"apps/list.c",
"apps/mac.c",
"apps/nseq.c",
"apps/ocsp.c",
"apps/openssl.c",
"apps/passwd.c",
"apps/pkcs12.c",
"apps/pkcs7.c",
"apps/pkcs8.c",
"apps/pkey.c",
"apps/pkeyparam.c",
"apps/pkeyutl.c",
"apps/prime.c",
"apps/rand.c",
"apps/rehash.c",
"apps/req.c",
"apps/rsa.c",
"apps/rsautl.c",
"apps/s_client.c",
"apps/s_server.c",
"apps/s_time.c",
"apps/sess_id.c",
"apps/smime.c",
"apps/speed.c",
"apps/spkac.c",
"apps/srp.c",
"apps/storeutl.c",
"apps/ts.c",
"apps/verify.c",
"apps/version.c",
"apps/x509.c",
]
if (openssl_selected_platform == "mingw64") {
sources += [ "${openssl_selected_platform_full_path}/apps/openssl.rc" ]
}
deps = [
":libapps",
":libcrypto_shared",
":libssl_shared",
":openssl.cnf",
":openssl_build_all_generated",
]
subsystem_name = "thirdparty"
part_name = "openssl"
configs = [ ":crypto_config_private" ]
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ohos_bes2600/third_party_openssl.git
git@gitee.com:ohos_bes2600/third_party_openssl.git
ohos_bes2600
third_party_openssl
third_party_openssl
master

搜索帮助