• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2020-2022 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("//build/ohos_var.gni")
15declare_args() {
16  if (defined(is_double_framework) && is_double_framework) {
17    compatible_with_legacy_build_system = true
18  } else {
19    compatible_with_legacy_build_system = false
20  }
21  if (defined(ohos_kernel_type) && ohos_kernel_type == "liteos_a") {
22    print(
23        "liteos_a doesn't support OPENSSL_cpuid_setup and liblegacy, disable them.")
24
25    # Enabling legacy on liteos_a will result in the following compilation error.
26    # [OHOS ERROR] [4756/5343] clang obj/third_party/openssl/engines/crypto_source.e_afalg.o
27    # [OHOS ERROR] FAILED: obj/third_party/openssl/engines/crypto_source.e_afalg.o
28    # [OHOS ERROR] ccache /home/user/openharmony/master/prebuilts/clang/ohos/linux-x86_64/llvm/bin/clang -D_XOPEN_SOURCE=700 -DOHOS_DEBUG -D__LITEOS__ -D__LITEOS_A__ -Oz -flto -mfloat-abi=softfp -mfpu=neon-vfpv4 -mfloat-abi=softfp -mfpu=neon-vfpv4 -mcpu=cortex-a7 -fno-common -fno-builtin -fno-strict-aliasing -Wall -fsigned-char -mno-unaligned-access -fno-omit-frame-pointer -fstack-protector-all -Wa,--noexecstack -DNDEBUG -DOPENSSL_BUILDING_OPENSSL -DOPENSSL_CPUID_OBJ -DOPENSSL_PIC -DENGINESDIR=\"\" -DMODULESDIR=\"\" -DOPENSSLDIR=\"/system/etc\" -DSTATIC_LEGACY -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 -Wall -Wno-error=int-conversion -Wno-error=constant-conversion -Wno-error=shift-count-overflow -Wno-error=macro-redefined -Wno-error=implicit-fallthrough -Wno-error=sign-compare -Wno-unused-but-set-variable --target=arm-liteos-ohos --sysroot=/home/user/openharmony/master/out/arm_virt/qemu_small_system_demo/sysroot -std=c99 -I../../../third_party/openssl -I../../../third_party/openssl/crypto -I../../../third_party/openssl/include -I../../../third_party/openssl/providers/common/include -I../../../third_party/openssl/providers/implementations/include -I../../../third_party/openssl/apps/include -I../../../third_party/openssl/crypto/bn -I../../../third_party/openssl/crypto/ec -I../../../third_party/openssl/crypto/ec/curve448 -I../../../third_party/openssl/crypto/modes -I../../../third_party/openssl/crypto/rsa -I../../../third_party/openssl/providers/common/include/prov -Iobj/third_party/openssl/build_all_generated/linux-armv4/apps -Iobj/third_party/openssl/build_all_generated/linux-armv4/crypto -Iobj/third_party/openssl/build_all_generated/linux-armv4/include -Iobj/third_party/openssl/build_all_generated/linux-armv4/include/crypto -Iobj/third_party/openssl/build_all_generated/linux-armv4/include/openssl -Iobj/third_party/openssl/build_all_generated/linux-armv4/providers/common/include -Iobj/third_party/openssl/build_all_generated/linux-armv4/providers/common/include/prov -c ../../../third_party/openssl/engines/e_afalg.c -o obj/third_party/openssl/engines/crypto_source.e_afalg.o
29    # [OHOS ERROR] ../../../third_party/openssl/engines/e_afalg.c:27:10: fatal error: 'linux/version.h' file not found
30    # [OHOS ERROR] #include <linux/version.h>
31    # [OHOS ERROR]          ^~~~~~~~~~~~~~~~~
32    # [OHOS ERROR] 1 error generated.
33
34    # see OPENSSL_cpuid_setup in crypto/armcap.c
35    build_with_liblegacy = false
36  } else {
37    build_with_liblegacy = true
38  }
39  openssl_enabled = true
40}
41
42if (!compatible_with_legacy_build_system) {
43  import("//build/config/config.gni")
44}
45import("//build/ohos.gni")
46
47print("openssl detecting os now...")
48print("current_cpu = ${current_cpu}")
49print("current_os = ${current_os}")
50print("host_os = ${host_os}")
51openssl_selected_platform = ""
52print("is_mingw = ${is_mingw}")
53if (current_cpu == "arm" && !(current_os == "linux" || host_os == "mac")) {
54  print("openssl selected linux-armv4")
55  openssl_selected_platform = "linux-armv4"
56} else if (current_cpu == "arm64" &&
57           (!(current_os == "linux" || host_os == "mac") ||
58            current_os == "ohos" ||
59            (current_os == "linux" || host_os == "linux"))) {
60  print("openssl selected linux-aarch64")
61  openssl_selected_platform = "linux-aarch64"
62} else if ((current_cpu == "x64" || current_cpu == "x86_64") &&
63           (current_os == "mac" || current_os == "ios")) {
64  # compilation for ios depends the platform
65  print("openssl selected darwin64-x86_64-cc")
66  openssl_selected_platform = "darwin64-x86_64-cc"
67} else if (current_cpu == "arm64" &&
68           (current_os == "mac" || current_os == "ios")) {
69  # ios and macos both use the platform
70  print("openssl selected darwin64-arm64-cc")
71  openssl_selected_platform = "darwin64-arm64-cc"
72} else if ((current_cpu == "x64" || current_cpu == "x86_64") &&
73           current_os != "mingw") {
74  print("openssl selected linux-x86_64")
75  openssl_selected_platform = "linux-x86_64"
76} else if (is_mingw) {
77  print("openssl selected mingw64")
78  openssl_selected_platform = "mingw64"
79} else if (current_cpu == "arm" && current_os == "android") {
80  print("openssl selected linux-armv4")
81  openssl_selected_platform = "linux-armv4"
82} else if (current_cpu == "arm64" && current_os == "android") {
83  print("openssl selected linux-aarch64")
84  openssl_selected_platform = "linux-aarch64"
85} else if (current_cpu == "loongarch64" && current_os == "ohos") {
86  print("openssl selected linux64-loongarch64")
87  openssl_selected_platform = "linux64-loongarch64"
88}
89print(
90    "openssl detecting os done. openssl_selected_platform = ${openssl_selected_platform}")
91
92build_all_generated_path = "${target_out_dir}/build_all_generated"
93
94# 升级修改适配检查点1 libcrypto 不同平台汇编代码
95libcrypto_build_all_generated_linux_armv4_sources = [
96  "${build_all_generated_path}/crypto/aes/aes-armv4.S",
97  "${build_all_generated_path}/crypto/aes/aesv8-armx.S",
98  "${build_all_generated_path}/crypto/aes/bsaes-armv7.S",
99  "${build_all_generated_path}/crypto/armv4cpuid.S",
100  "${build_all_generated_path}/crypto/bn/armv4-gf2m.S",
101  "${build_all_generated_path}/crypto/bn/armv4-mont.S",
102  "${build_all_generated_path}/crypto/chacha/chacha-armv4.S",
103  "${build_all_generated_path}/crypto/ec/ecp_nistz256-armv4.S",
104  "${build_all_generated_path}/crypto/modes/ghash-armv4.S",
105  "${build_all_generated_path}/crypto/modes/ghashv8-armx.S",
106  "${build_all_generated_path}/crypto/poly1305/poly1305-armv4.S",
107  "${build_all_generated_path}/crypto/sha/keccak1600-armv4.S",
108  "${build_all_generated_path}/crypto/sha/sha1-armv4-large.S",
109  "${build_all_generated_path}/crypto/sha/sha256-armv4.S",
110  "${build_all_generated_path}/crypto/sha/sha512-armv4.S",
111]
112
113# 升级修改适配检查点2 libcrypto 不同平台汇编代码
114libcrypto_build_all_generated_linux_aarch64_sources = [
115  "${build_all_generated_path}/crypto/aes/aesv8-armx.S",
116  "${build_all_generated_path}/crypto/aes/vpaes-armv8.S",
117  "${build_all_generated_path}/crypto/arm64cpuid.S",
118  "${build_all_generated_path}/crypto/bn/armv8-mont.S",
119  "${build_all_generated_path}/crypto/chacha/chacha-armv8.S",
120  "${build_all_generated_path}/crypto/ec/ecp_nistz256-armv8.S",
121  "${build_all_generated_path}/crypto/modes/aes-gcm-armv8_64.S",
122  "${build_all_generated_path}/crypto/modes/ghashv8-armx.S",
123  "${build_all_generated_path}/crypto/poly1305/poly1305-armv8.S",
124  "${build_all_generated_path}/crypto/sha/keccak1600-armv8.S",
125  "${build_all_generated_path}/crypto/sha/sha1-armv8.S",
126  "${build_all_generated_path}/crypto/sha/sha256-armv8.S",
127  "${build_all_generated_path}/crypto/sha/sha512-armv8.S",
128]
129
130# 升级修改适配检查点3 libcrypto 不同平台汇编代码
131libcrypto_build_all_generated_darwin64_x86_64_cc_sources = [
132  "${build_all_generated_path}/crypto/aes/aes-x86_64.s",
133  "${build_all_generated_path}/crypto/aes/aesni-mb-x86_64.s",
134  "${build_all_generated_path}/crypto/aes/aesni-sha1-x86_64.s",
135  "${build_all_generated_path}/crypto/aes/aesni-sha256-x86_64.s",
136  "${build_all_generated_path}/crypto/aes/aesni-x86_64.s",
137  "${build_all_generated_path}/crypto/aes/bsaes-x86_64.s",
138  "${build_all_generated_path}/crypto/aes/vpaes-x86_64.s",
139  "${build_all_generated_path}/crypto/bn/rsaz-avx2.s",
140  "${build_all_generated_path}/crypto/bn/rsaz-avx512.s",
141  "${build_all_generated_path}/crypto/bn/rsaz-x86_64.s",
142  "${build_all_generated_path}/crypto/bn/x86_64-gf2m.s",
143  "${build_all_generated_path}/crypto/bn/x86_64-mont.s",
144  "${build_all_generated_path}/crypto/bn/x86_64-mont5.s",
145  "${build_all_generated_path}/crypto/camellia/cmll-x86_64.s",
146  "${build_all_generated_path}/crypto/chacha/chacha-x86_64.s",
147  "${build_all_generated_path}/crypto/ec/ecp_nistz256-x86_64.s",
148  "${build_all_generated_path}/crypto/ec/x25519-x86_64.s",
149  "${build_all_generated_path}/crypto/md5/md5-x86_64.s",
150  "${build_all_generated_path}/crypto/modes/aesni-gcm-x86_64.s",
151  "${build_all_generated_path}/crypto/modes/ghash-x86_64.s",
152  "${build_all_generated_path}/crypto/poly1305/poly1305-x86_64.s",
153  "${build_all_generated_path}/crypto/rc4/rc4-md5-x86_64.s",
154  "${build_all_generated_path}/crypto/rc4/rc4-x86_64.s",
155  "${build_all_generated_path}/crypto/sha/keccak1600-x86_64.s",
156  "${build_all_generated_path}/crypto/sha/sha1-mb-x86_64.s",
157  "${build_all_generated_path}/crypto/sha/sha1-x86_64.s",
158  "${build_all_generated_path}/crypto/sha/sha256-mb-x86_64.s",
159  "${build_all_generated_path}/crypto/sha/sha256-x86_64.s",
160  "${build_all_generated_path}/crypto/sha/sha512-x86_64.s",
161  "${build_all_generated_path}/crypto/whrlpool/wp-x86_64.s",
162  "${build_all_generated_path}/crypto/x86_64cpuid.s",
163]
164if (build_with_liblegacy) {
165  libcrypto_build_all_generated_darwin64_x86_64_cc_sources +=
166      [ "${build_all_generated_path}/engines/e_padlock-x86_64.s" ]
167}
168
169# 升级修改适配检查点4 libcrypto 不同平台汇编代码
170libcrypto_build_all_generated_darwin64_arm64_cc_sources = [
171  "${build_all_generated_path}/crypto/aes/aesv8-armx.S",
172  "${build_all_generated_path}/crypto/aes/vpaes-armv8.S",
173  "${build_all_generated_path}/crypto/arm64cpuid.S",
174  "${build_all_generated_path}/crypto/bn/armv8-mont.S",
175  "${build_all_generated_path}/crypto/chacha/chacha-armv8.S",
176  "${build_all_generated_path}/crypto/ec/ecp_nistz256-armv8.S",
177  "${build_all_generated_path}/crypto/modes/aes-gcm-armv8_64.S",
178  "${build_all_generated_path}/crypto/modes/ghashv8-armx.S",
179  "${build_all_generated_path}/crypto/poly1305/poly1305-armv8.S",
180  "${build_all_generated_path}/crypto/sha/keccak1600-armv8.S",
181  "${build_all_generated_path}/crypto/sha/sha1-armv8.S",
182  "${build_all_generated_path}/crypto/sha/sha256-armv8.S",
183  "${build_all_generated_path}/crypto/sha/sha512-armv8.S",
184]
185
186# 升级修改适配检查点5 libcrypto 不同平台汇编代码
187libcrypto_build_all_generated_linux_x86_64_sources = [
188  "${build_all_generated_path}/crypto/aes/aes-x86_64.s",
189  "${build_all_generated_path}/crypto/aes/aesni-mb-x86_64.s",
190  "${build_all_generated_path}/crypto/aes/aesni-sha1-x86_64.s",
191  "${build_all_generated_path}/crypto/aes/aesni-sha256-x86_64.s",
192  "${build_all_generated_path}/crypto/aes/aesni-x86_64.s",
193  "${build_all_generated_path}/crypto/aes/bsaes-x86_64.s",
194  "${build_all_generated_path}/crypto/aes/vpaes-x86_64.s",
195  "${build_all_generated_path}/crypto/bn/rsaz-avx2.s",
196  "${build_all_generated_path}/crypto/bn/rsaz-avx512.s",
197  "${build_all_generated_path}/crypto/bn/rsaz-x86_64.s",
198  "${build_all_generated_path}/crypto/bn/x86_64-gf2m.s",
199  "${build_all_generated_path}/crypto/bn/x86_64-mont.s",
200  "${build_all_generated_path}/crypto/bn/x86_64-mont5.s",
201  "${build_all_generated_path}/crypto/camellia/cmll-x86_64.s",
202  "${build_all_generated_path}/crypto/chacha/chacha-x86_64.s",
203  "${build_all_generated_path}/crypto/ec/ecp_nistz256-x86_64.s",
204  "${build_all_generated_path}/crypto/ec/x25519-x86_64.s",
205  "${build_all_generated_path}/crypto/md5/md5-x86_64.s",
206  "${build_all_generated_path}/crypto/modes/aesni-gcm-x86_64.s",
207  "${build_all_generated_path}/crypto/modes/ghash-x86_64.s",
208  "${build_all_generated_path}/crypto/poly1305/poly1305-x86_64.s",
209  "${build_all_generated_path}/crypto/rc4/rc4-md5-x86_64.s",
210  "${build_all_generated_path}/crypto/rc4/rc4-x86_64.s",
211  "${build_all_generated_path}/crypto/sha/keccak1600-x86_64.s",
212  "${build_all_generated_path}/crypto/sha/sha1-mb-x86_64.s",
213  "${build_all_generated_path}/crypto/sha/sha1-x86_64.s",
214  "${build_all_generated_path}/crypto/sha/sha256-mb-x86_64.s",
215  "${build_all_generated_path}/crypto/sha/sha256-x86_64.s",
216  "${build_all_generated_path}/crypto/sha/sha512-x86_64.s",
217  "${build_all_generated_path}/crypto/whrlpool/wp-x86_64.s",
218  "${build_all_generated_path}/crypto/x86_64cpuid.s",
219]
220if (build_with_liblegacy) {
221  libcrypto_build_all_generated_linux_x86_64_sources +=
222      [ "${build_all_generated_path}/engines/e_padlock-x86_64.s" ]
223}
224
225# 升级修改适配检查点2 libcrypto 不同平台汇编代码
226libcrypto_build_all_generated_linux_loongarch64_sources = [
227  "${build_all_generated_path}/crypto/loongarch64cpuid.s",
228  "${build_all_generated_path}/crypto/md5/md5-loongarch64.S",
229]
230
231# 升级修改适配检查点6 libcrypto 不同平台汇编代码
232libcrypto_build_all_generated_mingw64_sources = [
233  "${build_all_generated_path}/crypto/aes/aes-x86_64.s",
234  "${build_all_generated_path}/crypto/aes/aesni-mb-x86_64.s",
235  "${build_all_generated_path}/crypto/aes/aesni-sha1-x86_64.s",
236  "${build_all_generated_path}/crypto/aes/aesni-sha256-x86_64.s",
237  "${build_all_generated_path}/crypto/aes/aesni-x86_64.s",
238  "${build_all_generated_path}/crypto/aes/bsaes-x86_64.s",
239  "${build_all_generated_path}/crypto/aes/vpaes-x86_64.s",
240  "${build_all_generated_path}/crypto/bn/rsaz-avx2.s",
241  "${build_all_generated_path}/crypto/bn/rsaz-avx512.s",
242  "${build_all_generated_path}/crypto/bn/rsaz-x86_64.s",
243  "${build_all_generated_path}/crypto/bn/x86_64-gf2m.s",
244  "${build_all_generated_path}/crypto/bn/x86_64-mont.s",
245  "${build_all_generated_path}/crypto/bn/x86_64-mont5.s",
246  "${build_all_generated_path}/crypto/camellia/cmll-x86_64.s",
247  "${build_all_generated_path}/crypto/chacha/chacha-x86_64.s",
248  "${build_all_generated_path}/crypto/ec/ecp_nistz256-x86_64.s",
249  "${build_all_generated_path}/crypto/ec/x25519-x86_64.s",
250  "${build_all_generated_path}/crypto/md5/md5-x86_64.s",
251  "${build_all_generated_path}/crypto/modes/aesni-gcm-x86_64.s",
252  "${build_all_generated_path}/crypto/modes/ghash-x86_64.s",
253  "${build_all_generated_path}/crypto/poly1305/poly1305-x86_64.s",
254  "${build_all_generated_path}/crypto/rc4/rc4-md5-x86_64.s",
255  "${build_all_generated_path}/crypto/rc4/rc4-x86_64.s",
256  "${build_all_generated_path}/crypto/sha/keccak1600-x86_64.s",
257  "${build_all_generated_path}/crypto/sha/sha1-mb-x86_64.s",
258  "${build_all_generated_path}/crypto/sha/sha1-x86_64.s",
259  "${build_all_generated_path}/crypto/sha/sha256-mb-x86_64.s",
260  "${build_all_generated_path}/crypto/sha/sha256-x86_64.s",
261  "${build_all_generated_path}/crypto/sha/sha512-x86_64.s",
262  "${build_all_generated_path}/crypto/whrlpool/wp-x86_64.s",
263  "${build_all_generated_path}/crypto/x86_64cpuid.s",
264]
265if (build_with_liblegacy) {
266  libcrypto_build_all_generated_mingw64_sources +=
267      [ "${build_all_generated_path}/engines/e_padlock-x86_64.s" ]
268}
269
270libcrypto_build_all_generated_selected_platform_sources = []
271if (openssl_selected_platform == "linux-armv4") {
272  libcrypto_build_all_generated_selected_platform_sources +=
273      libcrypto_build_all_generated_linux_armv4_sources
274} else if (openssl_selected_platform == "linux-aarch64") {
275  libcrypto_build_all_generated_selected_platform_sources +=
276      libcrypto_build_all_generated_linux_aarch64_sources
277} else if (openssl_selected_platform == "darwin64-x86_64-cc") {
278  libcrypto_build_all_generated_selected_platform_sources +=
279      libcrypto_build_all_generated_darwin64_x86_64_cc_sources
280} else if (openssl_selected_platform == "darwin64-arm64-cc") {
281  libcrypto_build_all_generated_selected_platform_sources +=
282      libcrypto_build_all_generated_darwin64_arm64_cc_sources
283} else if (openssl_selected_platform == "linux-x86_64") {
284  libcrypto_build_all_generated_selected_platform_sources +=
285      libcrypto_build_all_generated_linux_x86_64_sources
286} else if (openssl_selected_platform == "mingw64") {
287  libcrypto_build_all_generated_selected_platform_sources +=
288      libcrypto_build_all_generated_mingw64_sources
289} else if (openssl_selected_platform == "linux64-loongarch64") {
290  libcrypto_build_all_generated_selected_platform_sources +=
291      libcrypto_build_all_generated_linux_loongarch64_sources
292}
293
294# 升级修改适配检查点7 libcommon 生成的源码列表
295libcommon_build_all_generated_selected_platform_sources = [
296  "${build_all_generated_path}/providers/common/der/der_digests_gen.c",
297  "${build_all_generated_path}/providers/common/der/der_dsa_gen.c",
298  "${build_all_generated_path}/providers/common/der/der_ec_gen.c",
299  "${build_all_generated_path}/providers/common/der/der_ecx_gen.c",
300  "${build_all_generated_path}/providers/common/der/der_rsa_gen.c",
301  "${build_all_generated_path}/providers/common/der/der_wrap_gen.c",
302]
303
304# 升级修改适配检查点8 libdefault 生成的源码列表
305libdefault_build_all_generated_selected_platform_sources =
306    [ "${build_all_generated_path}/providers/common/der/der_sm2_gen.c" ]
307
308action("openssl_build_all_generated") {
309  script = rebase_path("//third_party/openssl/run_command.py")
310  args = [
311    rebase_path("//third_party/openssl/make_openssl_build_all_generated.sh"),
312    rebase_path("//third_party/openssl"),
313    rebase_path("${build_all_generated_path}"),
314    openssl_selected_platform,
315    "${build_with_liblegacy}",
316  ]
317  outputs = []
318  outputs += libcommon_build_all_generated_selected_platform_sources
319  outputs += libdefault_build_all_generated_selected_platform_sources
320  outputs += libcrypto_build_all_generated_selected_platform_sources
321  outputs += [ "${build_all_generated_path}/apps/progs.c" ]
322  if (openssl_selected_platform == "mingw64") {
323    outputs += [ "${build_all_generated_path}/apps/openssl.rc" ]
324  }
325}
326
327openssl_internal_cflags = [
328  "-Wall",
329
330  # ../../third_party/openssl/crypto/o_str.c:309:9: error: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Werror,-Wint-conversion]
331  #     err = strerror_r(errnum, buf, buflen);
332  #         ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
333  "-Wno-error=int-conversion",
334
335  # ../../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]
336  #             *lp = BN_div_word(t, BN_DEC_CONV);
337  #                   ~~~~~~~~~~~    ^~~~~~~~~~~
338  "-Wno-error=constant-conversion",
339
340  # ../../third_party/openssl/crypto/bn/bn_exp.c:382:38: error: shift count >= width of type [-Werror,-Wshift-count-overflow]
341  #     if (m->d[j - 1] & (((BN_ULONG)1) << (BN_BITS2 - 1))) {
342  #                                      ^  ~~~~~~~~~~~~~~
343  "-Wno-error=shift-count-overflow",
344
345  # ../../third_party/openssl/crypto/conf/conf_def.c:31:11: error: 'stat' macro redefined [-Werror,-Wmacro-redefined]
346  # #  define stat    _stat
347  #           ^
348  # ../../prebuilts/mingw-w64/ohos/linux-x86_64/clang-mingw/x86_64-w64-mingw32/include/sys/stat.h:279:9: note: previous definition is here
349  # #define stat _stat64
350  #         ^
351  # 1 error generated.
352  "-Wno-error=macro-redefined",
353
354  "-Wno-error=implicit-fallthrough",
355  "-Wno-error=sign-compare",
356]
357if (!compatible_with_legacy_build_system) {
358  openssl_internal_cflags += [
359    # Fix llvm-15 build error
360    "-Wno-unused-but-set-variable",
361  ]
362}
363
364if (current_cpu == "loongarch64") {
365  openssl_internal_cflags -= [
366    "-Wno-error=constant-conversion",
367    "-Wno-error=macro-redefined",
368  ]
369}
370
371# 升级修改适配检查点9 内部公共头文件目录列表
372crypto_config_common_private_include_dirs = [
373  # -I args from Makefile
374  ".",
375  "crypto",
376  "include",
377  "providers/common/include",
378  "providers/implementations/include",
379
380  # internal include dirs
381  "apps/include",
382  "crypto/bn",
383  "crypto/ec",
384  "crypto/ec/curve448",
385  "crypto/modes",
386  "crypto/rsa",
387  "providers/common/include/prov",
388
389  "${build_all_generated_path}/apps",
390  "${build_all_generated_path}/crypto",
391  "${build_all_generated_path}/include",
392  "${build_all_generated_path}/include/crypto",
393  "${build_all_generated_path}/include/openssl",
394  "${build_all_generated_path}/providers/common/include",
395  "${build_all_generated_path}/providers/common/include/prov",
396]
397crypto_config_common_public_include_dirs = [
398  "include",
399  "${build_all_generated_path}/include",
400]
401
402# located at /system/etc/
403ohos_prebuilt_etc("openssl.cnf") {
404  source = "open_harmony_openssl_config/openssl.cnf"
405  if (compatible_with_legacy_build_system) {
406    subsystem_name = "security"
407    part_name = "huks"
408  } else {
409    subsystem_name = "thirdparty"
410    part_name = "openssl"
411  }
412}
413
414# 升级修改适配检查点10 内部公共编译选项宏列表
415crypto_config_common_cflags = [
416  "-Wa,--noexecstack",
417  "-DNDEBUG",
418  "-DOPENSSL_BUILDING_OPENSSL",
419  "-DOPENSSL_CPUID_OBJ",
420  "-DOPENSSL_PIC",
421
422  # use `openssl version -a` cmd to see runtime OPENSSLDIR, ENGINESDIR, MODULESDIR value
423
424  # the origin value generated by Configure
425  # linux-armv4, linux-aarch64, darwin64-x86_64-cc, darwin64-arm64-cc
426  # /usr/local/lib/engines-3
427  # linux-x86_64, mingw64
428  # /usr/local/lib64/engines-3
429  "-DENGINESDIR=\"\"",
430
431  # the origin value generated by Configure
432  # linux-armv4, linux-aarch64, darwin64-x86_64-cc, darwin64-arm64-cc
433  # /usr/local/lib/ossl-modules
434  # linux-x86_64, mingw64
435  # /usr/local/lib64/ossl-modules
436  "-DMODULESDIR=\"\"",
437
438  # the origin value generated by Configure
439  # /usr/local/ssl
440  # we set the variable as the following to locate openssl.cnf
441  "-DOPENSSLDIR=\"/system/etc\"",
442]
443if (build_with_liblegacy) {
444  crypto_config_common_cflags += [ "-DSTATIC_LEGACY" ]
445}
446
447# 升级修改适配检查点11 内部不同平台编译选项列表
448crypto_config_linux_armv4_cflags = [
449  "-DOPENSSL_USE_NODELETE",
450  "-fPIC",
451  "-pthread",
452
453  "-DAES_ASM",
454  "-DBSAES_ASM",
455  "-DECP_NISTZ256_ASM",
456  "-DGHASH_ASM",
457  "-DKECCAK1600_ASM",
458  "-DOPENSSL_BN_ASM_GF2m",
459  "-DOPENSSL_BN_ASM_MONT",
460  "-DPOLY1305_ASM",
461  "-DSHA1_ASM",
462  "-DSHA256_ASM",
463  "-DSHA512_ASM",
464]
465
466# 升级修改适配检查点12 内部不同平台编译选项列表
467crypto_config_linux_aarch64_cflags = [
468  "-DOPENSSL_USE_NODELETE",
469  "-fPIC",
470  "-pthread",
471
472  "-DECP_NISTZ256_ASM",
473  "-DKECCAK1600_ASM",
474  "-DOPENSSL_BN_ASM_MONT",
475  "-DPOLY1305_ASM",
476  "-DSHA1_ASM",
477  "-DSHA256_ASM",
478  "-DSHA512_ASM",
479  "-DVPAES_ASM",
480]
481
482# 升级修改适配检查点13 内部不同平台编译选项列表
483crypto_config_darwin64_x86_64_cc_cflags = [
484  "-fPIC",
485  "-DL_ENDIAN",
486  "-D_REENTRANT",
487  "-DOPENSSL_IA32_SSE2",
488
489  "-DAES_ASM",
490  "-DBSAES_ASM",
491  "-DCMLL_ASM",
492  "-DECP_NISTZ256_ASM",
493  "-DGHASH_ASM",
494  "-DKECCAK1600_ASM",
495  "-DMD5_ASM",
496  "-DOPENSSL_BN_ASM_GF2m",
497  "-DOPENSSL_BN_ASM_MONT",
498  "-DOPENSSL_BN_ASM_MONT5",
499  "-DPOLY1305_ASM",
500  "-DSHA1_ASM",
501  "-DSHA256_ASM",
502  "-DSHA512_ASM",
503  "-DVPAES_ASM",
504  "-DWHIRLPOOL_ASM",
505  "-DX25519_ASM",
506]
507if (build_with_liblegacy) {
508  crypto_config_darwin64_x86_64_cc_cflags += [ "-DPADLOCK_ASM" ]
509}
510
511# 升级修改适配检查点14 内部不同平台编译选项列表
512crypto_config_darwin64_arm64_cc_cflags = [
513  "-DL_ENDIAN",
514  "-D_REENTRANT",
515  "-fPIC",
516
517  "-DECP_NISTZ256_ASM",
518  "-DKECCAK1600_ASM",
519  "-DOPENSSL_BN_ASM_MONT",
520  "-DPOLY1305_ASM",
521  "-DSHA1_ASM",
522  "-DSHA256_ASM",
523  "-DSHA512_ASM",
524  "-DVPAES_ASM",
525]
526
527# 升级修改适配检查点15 内部不同平台编译选项列表
528crypto_config_linux_x86_64_cflags = [
529  "-DL_ENDIAN",
530  "-DOPENSSL_IA32_SSE2",
531  "-DOPENSSL_USE_NODELETE",
532  "-fPIC",
533  "-m64",
534  "-pthread",
535
536  "-DAES_ASM",
537  "-DBSAES_ASM",
538  "-DCMLL_ASM",
539  "-DECP_NISTZ256_ASM",
540  "-DGHASH_ASM",
541  "-DKECCAK1600_ASM",
542  "-DMD5_ASM",
543  "-DOPENSSL_BN_ASM_GF2m",
544  "-DOPENSSL_BN_ASM_MONT",
545  "-DOPENSSL_BN_ASM_MONT5",
546  "-DPOLY1305_ASM",
547  "-DSHA1_ASM",
548  "-DSHA256_ASM",
549  "-DSHA512_ASM",
550  "-DVPAES_ASM",
551  "-DWHIRLPOOL_ASM",
552  "-DX25519_ASM",
553]
554if (build_with_liblegacy) {
555  crypto_config_linux_x86_64_cflags += [ "-DPADLOCK_ASM" ]
556}
557
558# 升级修改适配检查点16 内部不同平台编译选项列表
559crypto_config_mingw64_cflags = [
560  "-D_MT",
561  "-D_UNICODE",
562  "-DL_ENDIAN",
563  "-DOPENSSL_IA32_SSE2",
564  "-DUNICODE",
565  "-DWIN32_LEAN_AND_MEAN",
566  "-m64",
567
568  "-DAES_ASM",
569  "-DBSAES_ASM",
570  "-DCMLL_ASM",
571  "-DECP_NISTZ256_ASM",
572  "-DGHASH_ASM",
573  "-DKECCAK1600_ASM",
574  "-DMD5_ASM",
575  "-DOPENSSL_BN_ASM_GF2m",
576  "-DOPENSSL_BN_ASM_MONT",
577  "-DOPENSSL_BN_ASM_MONT5",
578  "-DPOLY1305_ASM",
579  "-DSHA1_ASM",
580  "-DSHA256_ASM",
581  "-DSHA512_ASM",
582  "-DVPAES_ASM",
583  "-DWHIRLPOOL_ASM",
584  "-DX25519_ASM",
585]
586if (build_with_liblegacy) {
587  crypto_config_mingw64_cflags += [ "-DPADLOCK_ASM" ]
588}
589
590crypto_config_linux_loongarch64_cflags = [
591  "-DOPENSSL_USE_NODELETE",
592  "-fPIC",
593  "-pthread",
594  "-Wall",
595  "-O3",
596  "-DNDEBUG",
597  "-MMD",
598  "-MF",
599  "-DOPENSSL_BUILDING_OPENSSL",
600  "-DOPENSSL_PIC",
601]
602
603crypto_config_current_platform_cflags = []
604if (openssl_selected_platform == "linux-armv4") {
605  crypto_config_current_platform_cflags += crypto_config_linux_armv4_cflags
606} else if (openssl_selected_platform == "linux-aarch64") {
607  crypto_config_current_platform_cflags += crypto_config_linux_aarch64_cflags
608} else if (openssl_selected_platform == "darwin64-x86_64-cc") {
609  crypto_config_current_platform_cflags +=
610      crypto_config_darwin64_x86_64_cc_cflags
611} else if (openssl_selected_platform == "darwin64-arm64-cc") {
612  crypto_config_current_platform_cflags +=
613      crypto_config_darwin64_arm64_cc_cflags
614} else if (openssl_selected_platform == "linux-x86_64") {
615  crypto_config_current_platform_cflags += crypto_config_linux_x86_64_cflags
616} else if (openssl_selected_platform == "mingw64") {
617  crypto_config_current_platform_cflags += crypto_config_mingw64_cflags
618} else if (openssl_selected_platform == "linux64-loongarch64") {
619  crypto_config_current_platform_cflags +=
620      crypto_config_linux_loongarch64_cflags
621}
622
623mingw32_libs_path = []
624mingw32_libs = []
625if (is_mingw || is_win) {
626  mingw32_libs_path += [ "//prebuilts/mingw-w64/ohos/linux-x86_64/clang-mingw/x86_64-w64-mingw32/lib" ]
627  mingw32_libs += [
628    "ws2_32",
629    "crypt32",
630  ]
631}
632
633config("crypto_config_private") {
634  include_dirs = crypto_config_common_private_include_dirs
635  cflags = crypto_config_common_cflags + crypto_config_current_platform_cflags +
636           openssl_internal_cflags
637  lib_dirs = mingw32_libs_path
638  libs = mingw32_libs
639}
640
641config("crypto_config_public") {
642  include_dirs = crypto_config_common_public_include_dirs
643  libs = mingw32_libs
644}
645
646# 升级修改适配检查点17 libcommon 原目录源码列表
647libcommon_common_sources = [
648  "providers/common/der/der_dsa_key.c",
649  "providers/common/der/der_dsa_sig.c",
650  "providers/common/der/der_ec_key.c",
651  "providers/common/der/der_ec_sig.c",
652  "providers/common/der/der_ecx_key.c",
653  "providers/common/der/der_rsa_key.c",
654  "providers/common/provider_ctx.c",
655  "providers/common/provider_err.c",
656  "providers/implementations/ciphers/ciphercommon.c",
657  "providers/implementations/ciphers/ciphercommon_block.c",
658  "providers/implementations/ciphers/ciphercommon_ccm.c",
659  "providers/implementations/ciphers/ciphercommon_ccm_hw.c",
660  "providers/implementations/ciphers/ciphercommon_gcm.c",
661  "providers/implementations/ciphers/ciphercommon_gcm_hw.c",
662  "providers/implementations/ciphers/ciphercommon_hw.c",
663  "providers/implementations/digests/digestcommon.c",
664  "ssl/record/tls_pad.c",
665]
666
667# 升级修改适配检查点18 libdefault 原目录源码列表
668libdefault_common_sources = [
669  "providers/common/bio_prov.c",
670  "providers/common/capabilities.c",
671  "providers/common/der/der_rsa_sig.c",
672  "providers/common/der/der_sm2_key.c",
673  "providers/common/der/der_sm2_sig.c",
674  "providers/common/digest_to_nid.c",
675  "providers/common/provider_seeding.c",
676  "providers/common/provider_util.c",
677  "providers/common/securitycheck.c",
678  "providers/common/securitycheck_default.c",
679  "providers/implementations/asymciphers/rsa_enc.c",
680  "providers/implementations/asymciphers/sm2_enc.c",
681  "providers/implementations/ciphers/cipher_aes.c",
682  "providers/implementations/ciphers/cipher_aes_cbc_hmac_sha.c",
683  "providers/implementations/ciphers/cipher_aes_cbc_hmac_sha1_hw.c",
684  "providers/implementations/ciphers/cipher_aes_cbc_hmac_sha256_hw.c",
685  "providers/implementations/ciphers/cipher_aes_ccm.c",
686  "providers/implementations/ciphers/cipher_aes_ccm_hw.c",
687  "providers/implementations/ciphers/cipher_aes_gcm.c",
688  "providers/implementations/ciphers/cipher_aes_gcm_hw.c",
689  "providers/implementations/ciphers/cipher_aes_hw.c",
690  "providers/implementations/ciphers/cipher_aes_ocb.c",
691  "providers/implementations/ciphers/cipher_aes_ocb_hw.c",
692  "providers/implementations/ciphers/cipher_aes_siv.c",
693  "providers/implementations/ciphers/cipher_aes_siv_hw.c",
694  "providers/implementations/ciphers/cipher_aes_wrp.c",
695  "providers/implementations/ciphers/cipher_aes_xts.c",
696  "providers/implementations/ciphers/cipher_aes_xts_fips.c",
697  "providers/implementations/ciphers/cipher_aes_xts_hw.c",
698  "providers/implementations/ciphers/cipher_aria.c",
699  "providers/implementations/ciphers/cipher_aria_ccm.c",
700  "providers/implementations/ciphers/cipher_aria_ccm_hw.c",
701  "providers/implementations/ciphers/cipher_aria_gcm.c",
702  "providers/implementations/ciphers/cipher_aria_gcm_hw.c",
703  "providers/implementations/ciphers/cipher_aria_hw.c",
704  "providers/implementations/ciphers/cipher_camellia.c",
705  "providers/implementations/ciphers/cipher_camellia_hw.c",
706  "providers/implementations/ciphers/cipher_chacha20.c",
707  "providers/implementations/ciphers/cipher_chacha20_hw.c",
708  "providers/implementations/ciphers/cipher_chacha20_poly1305.c",
709  "providers/implementations/ciphers/cipher_chacha20_poly1305_hw.c",
710  "providers/implementations/ciphers/cipher_cts.c",
711  "providers/implementations/ciphers/cipher_null.c",
712  "providers/implementations/ciphers/cipher_sm4.c",
713  "providers/implementations/ciphers/cipher_sm4_ccm.c",
714  "providers/implementations/ciphers/cipher_sm4_ccm_hw.c",
715  "providers/implementations/ciphers/cipher_sm4_gcm.c",
716  "providers/implementations/ciphers/cipher_sm4_gcm_hw.c",
717  "providers/implementations/ciphers/cipher_sm4_hw.c",
718  "providers/implementations/ciphers/cipher_tdes.c",
719  "providers/implementations/ciphers/cipher_tdes_common.c",
720  "providers/implementations/ciphers/cipher_tdes_default.c",
721  "providers/implementations/ciphers/cipher_tdes_default_hw.c",
722  "providers/implementations/ciphers/cipher_tdes_hw.c",
723  "providers/implementations/ciphers/cipher_tdes_wrap.c",
724  "providers/implementations/ciphers/cipher_tdes_wrap_hw.c",
725  "providers/implementations/digests/blake2_prov.c",
726  "providers/implementations/digests/blake2b_prov.c",
727  "providers/implementations/digests/blake2s_prov.c",
728  "providers/implementations/digests/md5_prov.c",
729  "providers/implementations/digests/md5_sha1_prov.c",
730  "providers/implementations/digests/null_prov.c",
731  "providers/implementations/digests/ripemd_prov.c",
732  "providers/implementations/digests/sha2_prov.c",
733  "providers/implementations/digests/sha3_prov.c",
734  "providers/implementations/digests/sm3_prov.c",
735  "providers/implementations/encode_decode/decode_der2key.c",
736  "providers/implementations/encode_decode/decode_epki2pki.c",
737  "providers/implementations/encode_decode/decode_msblob2key.c",
738  "providers/implementations/encode_decode/decode_pem2der.c",
739  "providers/implementations/encode_decode/decode_pvk2key.c",
740  "providers/implementations/encode_decode/decode_spki2typespki.c",
741  "providers/implementations/encode_decode/encode_key2any.c",
742  "providers/implementations/encode_decode/encode_key2blob.c",
743  "providers/implementations/encode_decode/encode_key2ms.c",
744  "providers/implementations/encode_decode/encode_key2text.c",
745  "providers/implementations/encode_decode/endecoder_common.c",
746  "providers/implementations/exchange/dh_exch.c",
747  "providers/implementations/exchange/ecdh_exch.c",
748  "providers/implementations/exchange/ecx_exch.c",
749  "providers/implementations/exchange/kdf_exch.c",
750  "providers/implementations/kdfs/hkdf.c",
751  "providers/implementations/kdfs/kbkdf.c",
752  "providers/implementations/kdfs/krb5kdf.c",
753  "providers/implementations/kdfs/pbkdf2.c",
754  "providers/implementations/kdfs/pbkdf2_fips.c",
755  "providers/implementations/kdfs/pkcs12kdf.c",
756  "providers/implementations/kdfs/scrypt.c",
757  "providers/implementations/kdfs/sshkdf.c",
758  "providers/implementations/kdfs/sskdf.c",
759  "providers/implementations/kdfs/tls1_prf.c",
760  "providers/implementations/kdfs/x942kdf.c",
761  "providers/implementations/kem/rsa_kem.c",
762  "providers/implementations/keymgmt/dh_kmgmt.c",
763  "providers/implementations/keymgmt/dsa_kmgmt.c",
764  "providers/implementations/keymgmt/ec_kmgmt.c",
765  "providers/implementations/keymgmt/ecx_kmgmt.c",
766  "providers/implementations/keymgmt/kdf_legacy_kmgmt.c",
767  "providers/implementations/keymgmt/mac_legacy_kmgmt.c",
768  "providers/implementations/keymgmt/rsa_kmgmt.c",
769  "providers/implementations/macs/blake2b_mac.c",
770  "providers/implementations/macs/blake2s_mac.c",
771  "providers/implementations/macs/cmac_prov.c",
772  "providers/implementations/macs/gmac_prov.c",
773  "providers/implementations/macs/hmac_prov.c",
774  "providers/implementations/macs/kmac_prov.c",
775  "providers/implementations/macs/poly1305_prov.c",
776  "providers/implementations/macs/siphash_prov.c",
777  "providers/implementations/rands/crngt.c",
778  "providers/implementations/rands/drbg.c",
779  "providers/implementations/rands/drbg_ctr.c",
780  "providers/implementations/rands/drbg_hash.c",
781  "providers/implementations/rands/drbg_hmac.c",
782  "providers/implementations/rands/seed_src.c",
783  "providers/implementations/rands/seeding/rand_cpu_x86.c",
784  "providers/implementations/rands/seeding/rand_tsc.c",
785  "providers/implementations/rands/seeding/rand_unix.c",
786  "providers/implementations/rands/seeding/rand_win.c",
787  "providers/implementations/rands/test_rng.c",
788  "providers/implementations/signature/dsa_sig.c",
789  "providers/implementations/signature/ecdsa_sig.c",
790  "providers/implementations/signature/eddsa_sig.c",
791  "providers/implementations/signature/mac_legacy_sig.c",
792  "providers/implementations/signature/rsa_sig.c",
793  "providers/implementations/signature/sm2_sig.c",
794  "providers/implementations/storemgmt/file_store.c",
795  "providers/implementations/storemgmt/file_store_any2obj.c",
796  "ssl/s3_cbc.c",
797]
798
799# 升级修改适配检查点19 liblegacy 源码列表
800if (build_with_liblegacy) {
801  liblegacy_sources = [
802    "providers/implementations/ciphers/cipher_blowfish.c",
803    "providers/implementations/ciphers/cipher_blowfish_hw.c",
804    "providers/implementations/ciphers/cipher_cast5.c",
805    "providers/implementations/ciphers/cipher_cast5_hw.c",
806    "providers/implementations/ciphers/cipher_des.c",
807    "providers/implementations/ciphers/cipher_des_hw.c",
808    "providers/implementations/ciphers/cipher_desx.c",
809    "providers/implementations/ciphers/cipher_desx_hw.c",
810    "providers/implementations/ciphers/cipher_idea.c",
811    "providers/implementations/ciphers/cipher_idea_hw.c",
812    "providers/implementations/ciphers/cipher_rc2.c",
813    "providers/implementations/ciphers/cipher_rc2_hw.c",
814    "providers/implementations/ciphers/cipher_rc4.c",
815    "providers/implementations/ciphers/cipher_rc4_hmac_md5.c",
816    "providers/implementations/ciphers/cipher_rc4_hmac_md5_hw.c",
817    "providers/implementations/ciphers/cipher_rc4_hw.c",
818    "providers/implementations/ciphers/cipher_seed.c",
819    "providers/implementations/ciphers/cipher_seed_hw.c",
820    "providers/implementations/digests/md4_prov.c",
821    "providers/implementations/digests/mdc2_prov.c",
822    "providers/implementations/digests/wp_prov.c",
823    "providers/implementations/kdfs/pbkdf1.c",
824  ]
825}
826
827ohos_source_set("crypto_source") {
828  if (!compatible_with_legacy_build_system) {
829    subsystem_name = "thirdparty"
830    part_name = "openssl"
831  }
832
833  # 升级修改适配检查点20 libcrypto 原目录源码列表
834  sources = [
835    "crypto/aes/aes_cfb.c",
836    "crypto/aes/aes_ecb.c",
837    "crypto/aes/aes_ige.c",
838    "crypto/aes/aes_misc.c",
839    "crypto/aes/aes_ofb.c",
840    "crypto/aes/aes_wrap.c",
841    "crypto/aria/aria.c",
842    "crypto/asn1/a_bitstr.c",
843    "crypto/asn1/a_d2i_fp.c",
844    "crypto/asn1/a_digest.c",
845    "crypto/asn1/a_dup.c",
846    "crypto/asn1/a_gentm.c",
847    "crypto/asn1/a_i2d_fp.c",
848    "crypto/asn1/a_int.c",
849    "crypto/asn1/a_mbstr.c",
850    "crypto/asn1/a_object.c",
851    "crypto/asn1/a_octet.c",
852    "crypto/asn1/a_print.c",
853    "crypto/asn1/a_sign.c",
854    "crypto/asn1/a_strex.c",
855    "crypto/asn1/a_strnid.c",
856    "crypto/asn1/a_time.c",
857    "crypto/asn1/a_type.c",
858    "crypto/asn1/a_utctm.c",
859    "crypto/asn1/a_utf8.c",
860    "crypto/asn1/a_verify.c",
861    "crypto/asn1/ameth_lib.c",
862    "crypto/asn1/asn1_err.c",
863    "crypto/asn1/asn1_gen.c",
864    "crypto/asn1/asn1_item_list.c",
865    "crypto/asn1/asn1_lib.c",
866    "crypto/asn1/asn1_parse.c",
867    "crypto/asn1/asn_mime.c",
868    "crypto/asn1/asn_moid.c",
869    "crypto/asn1/asn_mstbl.c",
870    "crypto/asn1/asn_pack.c",
871    "crypto/asn1/bio_asn1.c",
872    "crypto/asn1/bio_ndef.c",
873    "crypto/asn1/d2i_param.c",
874    "crypto/asn1/d2i_pr.c",
875    "crypto/asn1/d2i_pu.c",
876    "crypto/asn1/evp_asn1.c",
877    "crypto/asn1/f_int.c",
878    "crypto/asn1/f_string.c",
879    "crypto/asn1/i2d_evp.c",
880    "crypto/asn1/n_pkey.c",
881    "crypto/asn1/nsseq.c",
882    "crypto/asn1/p5_pbe.c",
883    "crypto/asn1/p5_pbev2.c",
884    "crypto/asn1/p5_scrypt.c",
885    "crypto/asn1/p8_pkey.c",
886    "crypto/asn1/t_bitst.c",
887    "crypto/asn1/t_pkey.c",
888    "crypto/asn1/t_spki.c",
889    "crypto/asn1/tasn_dec.c",
890    "crypto/asn1/tasn_enc.c",
891    "crypto/asn1/tasn_fre.c",
892    "crypto/asn1/tasn_new.c",
893    "crypto/asn1/tasn_prn.c",
894    "crypto/asn1/tasn_scn.c",
895    "crypto/asn1/tasn_typ.c",
896    "crypto/asn1/tasn_utl.c",
897    "crypto/asn1/x_algor.c",
898    "crypto/asn1/x_bignum.c",
899    "crypto/asn1/x_info.c",
900    "crypto/asn1/x_int64.c",
901    "crypto/asn1/x_long.c",
902    "crypto/asn1/x_pkey.c",
903    "crypto/asn1/x_sig.c",
904    "crypto/asn1/x_spki.c",
905    "crypto/asn1/x_val.c",
906    "crypto/asn1_dsa.c",
907    "crypto/async/arch/async_null.c",
908    "crypto/async/arch/async_posix.c",
909    "crypto/async/arch/async_win.c",
910    "crypto/async/async.c",
911    "crypto/async/async_err.c",
912    "crypto/async/async_wait.c",
913    "crypto/bf/bf_cfb64.c",
914    "crypto/bf/bf_ecb.c",
915    "crypto/bf/bf_enc.c",
916    "crypto/bf/bf_ofb64.c",
917    "crypto/bf/bf_skey.c",
918    "crypto/bio/bf_buff.c",
919    "crypto/bio/bf_lbuf.c",
920    "crypto/bio/bf_nbio.c",
921    "crypto/bio/bf_null.c",
922    "crypto/bio/bf_prefix.c",
923    "crypto/bio/bf_readbuff.c",
924    "crypto/bio/bio_addr.c",
925    "crypto/bio/bio_cb.c",
926    "crypto/bio/bio_dump.c",
927    "crypto/bio/bio_err.c",
928    "crypto/bio/bio_lib.c",
929    "crypto/bio/bio_meth.c",
930    "crypto/bio/bio_print.c",
931    "crypto/bio/bio_sock.c",
932    "crypto/bio/bio_sock2.c",
933    "crypto/bio/bss_acpt.c",
934    "crypto/bio/bss_bio.c",
935    "crypto/bio/bss_conn.c",
936    "crypto/bio/bss_core.c",
937    "crypto/bio/bss_dgram.c",
938    "crypto/bio/bss_fd.c",
939    "crypto/bio/bss_file.c",
940    "crypto/bio/bss_log.c",
941    "crypto/bio/bss_mem.c",
942    "crypto/bio/bss_null.c",
943    "crypto/bio/bss_sock.c",
944    "crypto/bio/ossl_core_bio.c",
945    "crypto/bn/bn_add.c",
946    "crypto/bn/bn_blind.c",
947    "crypto/bn/bn_const.c",
948    "crypto/bn/bn_conv.c",
949    "crypto/bn/bn_ctx.c",
950    "crypto/bn/bn_depr.c",
951    "crypto/bn/bn_dh.c",
952    "crypto/bn/bn_div.c",
953    "crypto/bn/bn_err.c",
954    "crypto/bn/bn_exp.c",
955    "crypto/bn/bn_exp2.c",
956    "crypto/bn/bn_gcd.c",
957    "crypto/bn/bn_gf2m.c",
958    "crypto/bn/bn_intern.c",
959    "crypto/bn/bn_kron.c",
960    "crypto/bn/bn_lib.c",
961    "crypto/bn/bn_mod.c",
962    "crypto/bn/bn_mont.c",
963    "crypto/bn/bn_mpi.c",
964    "crypto/bn/bn_mul.c",
965    "crypto/bn/bn_nist.c",
966    "crypto/bn/bn_prime.c",
967    "crypto/bn/bn_print.c",
968    "crypto/bn/bn_rand.c",
969    "crypto/bn/bn_recp.c",
970    "crypto/bn/bn_rsa_fips186_4.c",
971    "crypto/bn/bn_shift.c",
972    "crypto/bn/bn_sqr.c",
973    "crypto/bn/bn_sqrt.c",
974    "crypto/bn/bn_srp.c",
975    "crypto/bn/bn_word.c",
976    "crypto/bn/bn_x931p.c",
977    "crypto/bsearch.c",
978    "crypto/buffer/buf_err.c",
979    "crypto/buffer/buffer.c",
980    "crypto/camellia/cmll_cfb.c",
981    "crypto/camellia/cmll_ctr.c",
982    "crypto/camellia/cmll_ecb.c",
983    "crypto/camellia/cmll_misc.c",
984    "crypto/camellia/cmll_ofb.c",
985    "crypto/cast/c_cfb64.c",
986    "crypto/cast/c_ecb.c",
987    "crypto/cast/c_enc.c",
988    "crypto/cast/c_ofb64.c",
989    "crypto/cast/c_skey.c",
990    "crypto/cmac/cmac.c",
991    "crypto/cmp/cmp_asn.c",
992    "crypto/cmp/cmp_client.c",
993    "crypto/cmp/cmp_ctx.c",
994    "crypto/cmp/cmp_err.c",
995    "crypto/cmp/cmp_hdr.c",
996    "crypto/cmp/cmp_http.c",
997    "crypto/cmp/cmp_msg.c",
998    "crypto/cmp/cmp_protect.c",
999    "crypto/cmp/cmp_server.c",
1000    "crypto/cmp/cmp_status.c",
1001    "crypto/cmp/cmp_util.c",
1002    "crypto/cmp/cmp_vfy.c",
1003    "crypto/cms/cms_asn1.c",
1004    "crypto/cms/cms_att.c",
1005    "crypto/cms/cms_cd.c",
1006    "crypto/cms/cms_dd.c",
1007    "crypto/cms/cms_dh.c",
1008    "crypto/cms/cms_ec.c",
1009    "crypto/cms/cms_enc.c",
1010    "crypto/cms/cms_env.c",
1011    "crypto/cms/cms_err.c",
1012    "crypto/cms/cms_ess.c",
1013    "crypto/cms/cms_io.c",
1014    "crypto/cms/cms_kari.c",
1015    "crypto/cms/cms_lib.c",
1016    "crypto/cms/cms_pwri.c",
1017    "crypto/cms/cms_rsa.c",
1018    "crypto/cms/cms_sd.c",
1019    "crypto/cms/cms_smime.c",
1020    "crypto/comp/c_zlib.c",
1021    "crypto/comp/comp_err.c",
1022    "crypto/comp/comp_lib.c",
1023    "crypto/conf/conf_api.c",
1024    "crypto/conf/conf_def.c",
1025    "crypto/conf/conf_err.c",
1026    "crypto/conf/conf_lib.c",
1027    "crypto/conf/conf_mall.c",
1028    "crypto/conf/conf_mod.c",
1029    "crypto/conf/conf_sap.c",
1030    "crypto/conf/conf_ssl.c",
1031    "crypto/context.c",
1032    "crypto/core_algorithm.c",
1033    "crypto/core_fetch.c",
1034    "crypto/core_namemap.c",
1035    "crypto/cpt_err.c",
1036    "crypto/cpuid.c",
1037    "crypto/crmf/crmf_asn.c",
1038    "crypto/crmf/crmf_err.c",
1039    "crypto/crmf/crmf_lib.c",
1040    "crypto/crmf/crmf_pbm.c",
1041    "crypto/cryptlib.c",
1042    "crypto/ct/ct_b64.c",
1043    "crypto/ct/ct_err.c",
1044    "crypto/ct/ct_log.c",
1045    "crypto/ct/ct_oct.c",
1046    "crypto/ct/ct_policy.c",
1047    "crypto/ct/ct_prn.c",
1048    "crypto/ct/ct_sct.c",
1049    "crypto/ct/ct_sct_ctx.c",
1050    "crypto/ct/ct_vfy.c",
1051    "crypto/ct/ct_x509v3.c",
1052    "crypto/ctype.c",
1053    "crypto/cversion.c",
1054    "crypto/der_writer.c",
1055    "crypto/des/cbc_cksm.c",
1056    "crypto/des/cbc_enc.c",
1057    "crypto/des/cfb64ede.c",
1058    "crypto/des/cfb64enc.c",
1059    "crypto/des/cfb_enc.c",
1060    "crypto/des/des_enc.c",
1061    "crypto/des/ecb3_enc.c",
1062    "crypto/des/ecb_enc.c",
1063    "crypto/des/fcrypt.c",
1064    "crypto/des/fcrypt_b.c",
1065    "crypto/des/ofb64ede.c",
1066    "crypto/des/ofb64enc.c",
1067    "crypto/des/ofb_enc.c",
1068    "crypto/des/pcbc_enc.c",
1069    "crypto/des/qud_cksm.c",
1070    "crypto/des/rand_key.c",
1071    "crypto/des/set_key.c",
1072    "crypto/des/str2key.c",
1073    "crypto/des/xcbc_enc.c",
1074    "crypto/dh/dh_ameth.c",
1075    "crypto/dh/dh_asn1.c",
1076    "crypto/dh/dh_backend.c",
1077    "crypto/dh/dh_check.c",
1078    "crypto/dh/dh_depr.c",
1079    "crypto/dh/dh_err.c",
1080    "crypto/dh/dh_gen.c",
1081    "crypto/dh/dh_group_params.c",
1082    "crypto/dh/dh_kdf.c",
1083    "crypto/dh/dh_key.c",
1084    "crypto/dh/dh_lib.c",
1085    "crypto/dh/dh_meth.c",
1086    "crypto/dh/dh_pmeth.c",
1087    "crypto/dh/dh_prn.c",
1088    "crypto/dh/dh_rfc5114.c",
1089    "crypto/dsa/dsa_ameth.c",
1090    "crypto/dsa/dsa_asn1.c",
1091    "crypto/dsa/dsa_backend.c",
1092    "crypto/dsa/dsa_check.c",
1093    "crypto/dsa/dsa_depr.c",
1094    "crypto/dsa/dsa_err.c",
1095    "crypto/dsa/dsa_gen.c",
1096    "crypto/dsa/dsa_key.c",
1097    "crypto/dsa/dsa_lib.c",
1098    "crypto/dsa/dsa_meth.c",
1099    "crypto/dsa/dsa_ossl.c",
1100    "crypto/dsa/dsa_pmeth.c",
1101    "crypto/dsa/dsa_prn.c",
1102    "crypto/dsa/dsa_sign.c",
1103    "crypto/dsa/dsa_vrf.c",
1104    "crypto/dso/dso_dl.c",
1105    "crypto/dso/dso_dlfcn.c",
1106    "crypto/dso/dso_err.c",
1107    "crypto/dso/dso_lib.c",
1108    "crypto/dso/dso_openssl.c",
1109    "crypto/dso/dso_vms.c",
1110    "crypto/dso/dso_win32.c",
1111    "crypto/ebcdic.c",
1112    "crypto/ec/curve25519.c",
1113    "crypto/ec/curve448/arch_32/f_impl32.c",
1114    "crypto/ec/curve448/arch_64/f_impl64.c",
1115    "crypto/ec/curve448/curve448.c",
1116    "crypto/ec/curve448/curve448_tables.c",
1117    "crypto/ec/curve448/eddsa.c",
1118    "crypto/ec/curve448/f_generic.c",
1119    "crypto/ec/curve448/scalar.c",
1120    "crypto/ec/ec2_oct.c",
1121    "crypto/ec/ec2_smpl.c",
1122    "crypto/ec/ec_ameth.c",
1123    "crypto/ec/ec_asn1.c",
1124    "crypto/ec/ec_backend.c",
1125    "crypto/ec/ec_check.c",
1126    "crypto/ec/ec_curve.c",
1127    "crypto/ec/ec_cvt.c",
1128    "crypto/ec/ec_deprecated.c",
1129    "crypto/ec/ec_err.c",
1130    "crypto/ec/ec_key.c",
1131    "crypto/ec/ec_kmeth.c",
1132    "crypto/ec/ec_lib.c",
1133    "crypto/ec/ec_mult.c",
1134    "crypto/ec/ec_oct.c",
1135    "crypto/ec/ec_pmeth.c",
1136    "crypto/ec/ec_print.c",
1137    "crypto/ec/ecdh_kdf.c",
1138    "crypto/ec/ecdh_ossl.c",
1139    "crypto/ec/ecdsa_ossl.c",
1140    "crypto/ec/ecdsa_sign.c",
1141    "crypto/ec/ecdsa_vrf.c",
1142    "crypto/ec/eck_prn.c",
1143    "crypto/ec/ecp_mont.c",
1144    "crypto/ec/ecp_nist.c",
1145    "crypto/ec/ecp_nistz256.c",
1146    "crypto/ec/ecp_oct.c",
1147    "crypto/ec/ecp_smpl.c",
1148    "crypto/ec/ecx_backend.c",
1149    "crypto/ec/ecx_key.c",
1150    "crypto/ec/ecx_meth.c",
1151    "crypto/encode_decode/decoder_err.c",
1152    "crypto/encode_decode/decoder_lib.c",
1153    "crypto/encode_decode/decoder_meth.c",
1154    "crypto/encode_decode/decoder_pkey.c",
1155    "crypto/encode_decode/encoder_err.c",
1156    "crypto/encode_decode/encoder_lib.c",
1157    "crypto/encode_decode/encoder_meth.c",
1158    "crypto/encode_decode/encoder_pkey.c",
1159    "crypto/engine/eng_all.c",
1160    "crypto/engine/eng_cnf.c",
1161    "crypto/engine/eng_ctrl.c",
1162    "crypto/engine/eng_dyn.c",
1163    "crypto/engine/eng_err.c",
1164    "crypto/engine/eng_fat.c",
1165    "crypto/engine/eng_init.c",
1166    "crypto/engine/eng_lib.c",
1167    "crypto/engine/eng_list.c",
1168    "crypto/engine/eng_openssl.c",
1169    "crypto/engine/eng_pkey.c",
1170    "crypto/engine/eng_rdrand.c",
1171    "crypto/engine/eng_table.c",
1172    "crypto/engine/tb_asnmth.c",
1173    "crypto/engine/tb_cipher.c",
1174    "crypto/engine/tb_dh.c",
1175    "crypto/engine/tb_digest.c",
1176    "crypto/engine/tb_dsa.c",
1177    "crypto/engine/tb_eckey.c",
1178    "crypto/engine/tb_pkmeth.c",
1179    "crypto/engine/tb_rand.c",
1180    "crypto/engine/tb_rsa.c",
1181    "crypto/err/err.c",
1182    "crypto/err/err_all.c",
1183    "crypto/err/err_all_legacy.c",
1184    "crypto/err/err_blocks.c",
1185    "crypto/err/err_prn.c",
1186    "crypto/ess/ess_asn1.c",
1187    "crypto/ess/ess_err.c",
1188    "crypto/ess/ess_lib.c",
1189    "crypto/evp/asymcipher.c",
1190    "crypto/evp/bio_b64.c",
1191    "crypto/evp/bio_enc.c",
1192    "crypto/evp/bio_md.c",
1193    "crypto/evp/bio_ok.c",
1194    "crypto/evp/c_allc.c",
1195    "crypto/evp/c_alld.c",
1196    "crypto/evp/cmeth_lib.c",
1197    "crypto/evp/ctrl_params_translate.c",
1198    "crypto/evp/dh_ctrl.c",
1199    "crypto/evp/dh_support.c",
1200    "crypto/evp/digest.c",
1201    "crypto/evp/dsa_ctrl.c",
1202    "crypto/evp/e_aes.c",
1203    "crypto/evp/e_aes_cbc_hmac_sha1.c",
1204    "crypto/evp/e_aes_cbc_hmac_sha256.c",
1205    "crypto/evp/e_aria.c",
1206    "crypto/evp/e_bf.c",
1207    "crypto/evp/e_camellia.c",
1208    "crypto/evp/e_cast.c",
1209    "crypto/evp/e_chacha20_poly1305.c",
1210    "crypto/evp/e_des.c",
1211    "crypto/evp/e_des3.c",
1212    "crypto/evp/e_idea.c",
1213    "crypto/evp/e_null.c",
1214    "crypto/evp/e_old.c",
1215    "crypto/evp/e_rc2.c",
1216    "crypto/evp/e_rc4.c",
1217    "crypto/evp/e_rc4_hmac_md5.c",
1218    "crypto/evp/e_rc5.c",
1219    "crypto/evp/e_seed.c",
1220    "crypto/evp/e_sm4.c",
1221    "crypto/evp/e_xcbc_d.c",
1222    "crypto/evp/ec_ctrl.c",
1223    "crypto/evp/ec_support.c",
1224    "crypto/evp/encode.c",
1225    "crypto/evp/evp_cnf.c",
1226    "crypto/evp/evp_enc.c",
1227    "crypto/evp/evp_err.c",
1228    "crypto/evp/evp_fetch.c",
1229    "crypto/evp/evp_key.c",
1230    "crypto/evp/evp_lib.c",
1231    "crypto/evp/evp_pbe.c",
1232    "crypto/evp/evp_pkey.c",
1233    "crypto/evp/evp_rand.c",
1234    "crypto/evp/evp_utils.c",
1235    "crypto/evp/exchange.c",
1236    "crypto/evp/kdf_lib.c",
1237    "crypto/evp/kdf_meth.c",
1238    "crypto/evp/kem.c",
1239    "crypto/evp/keymgmt_lib.c",
1240    "crypto/evp/keymgmt_meth.c",
1241    "crypto/evp/legacy_blake2.c",
1242    "crypto/evp/legacy_md4.c",
1243    "crypto/evp/legacy_md5.c",
1244    "crypto/evp/legacy_md5_sha1.c",
1245    "crypto/evp/legacy_mdc2.c",
1246    "crypto/evp/legacy_ripemd.c",
1247    "crypto/evp/legacy_sha.c",
1248    "crypto/evp/legacy_wp.c",
1249    "crypto/evp/m_null.c",
1250    "crypto/evp/m_sigver.c",
1251    "crypto/evp/mac_lib.c",
1252    "crypto/evp/mac_meth.c",
1253    "crypto/evp/names.c",
1254    "crypto/evp/p5_crpt.c",
1255    "crypto/evp/p5_crpt2.c",
1256    "crypto/evp/p_dec.c",
1257    "crypto/evp/p_enc.c",
1258    "crypto/evp/p_legacy.c",
1259    "crypto/evp/p_lib.c",
1260    "crypto/evp/p_open.c",
1261    "crypto/evp/p_seal.c",
1262    "crypto/evp/p_sign.c",
1263    "crypto/evp/p_verify.c",
1264    "crypto/evp/pbe_scrypt.c",
1265    "crypto/evp/pmeth_check.c",
1266    "crypto/evp/pmeth_gn.c",
1267    "crypto/evp/pmeth_lib.c",
1268    "crypto/evp/signature.c",
1269    "crypto/ex_data.c",
1270    "crypto/ffc/ffc_backend.c",
1271    "crypto/ffc/ffc_dh.c",
1272    "crypto/ffc/ffc_key_generate.c",
1273    "crypto/ffc/ffc_key_validate.c",
1274    "crypto/ffc/ffc_params.c",
1275    "crypto/ffc/ffc_params_generate.c",
1276    "crypto/ffc/ffc_params_validate.c",
1277    "crypto/getenv.c",
1278    "crypto/hmac/hmac.c",
1279    "crypto/http/http_client.c",
1280    "crypto/http/http_err.c",
1281    "crypto/http/http_lib.c",
1282    "crypto/idea/i_cbc.c",
1283    "crypto/idea/i_cfb64.c",
1284    "crypto/idea/i_ecb.c",
1285    "crypto/idea/i_ofb64.c",
1286    "crypto/idea/i_skey.c",
1287    "crypto/info.c",
1288    "crypto/init.c",
1289    "crypto/initthread.c",
1290    "crypto/kdf/kdf_err.c",
1291    "crypto/lhash/lh_stats.c",
1292    "crypto/lhash/lhash.c",
1293    "crypto/md4/md4_dgst.c",
1294    "crypto/md4/md4_one.c",
1295    "crypto/md5/md5_dgst.c",
1296    "crypto/md5/md5_one.c",
1297    "crypto/md5/md5_sha1.c",
1298    "crypto/mdc2/mdc2_one.c",
1299    "crypto/mdc2/mdc2dgst.c",
1300    "crypto/mem.c",
1301    "crypto/mem_sec.c",
1302    "crypto/modes/cbc128.c",
1303    "crypto/modes/ccm128.c",
1304    "crypto/modes/cfb128.c",
1305    "crypto/modes/ctr128.c",
1306    "crypto/modes/cts128.c",
1307    "crypto/modes/gcm128.c",
1308    "crypto/modes/ocb128.c",
1309    "crypto/modes/ofb128.c",
1310    "crypto/modes/siv128.c",
1311    "crypto/modes/wrap128.c",
1312    "crypto/modes/xts128.c",
1313    "crypto/o_dir.c",
1314    "crypto/o_fopen.c",
1315    "crypto/o_init.c",
1316    "crypto/o_str.c",
1317    "crypto/o_time.c",
1318    "crypto/objects/o_names.c",
1319    "crypto/objects/obj_dat.c",
1320    "crypto/objects/obj_err.c",
1321    "crypto/objects/obj_lib.c",
1322    "crypto/objects/obj_xref.c",
1323    "crypto/ocsp/ocsp_asn.c",
1324    "crypto/ocsp/ocsp_cl.c",
1325    "crypto/ocsp/ocsp_err.c",
1326    "crypto/ocsp/ocsp_ext.c",
1327    "crypto/ocsp/ocsp_http.c",
1328    "crypto/ocsp/ocsp_lib.c",
1329    "crypto/ocsp/ocsp_prn.c",
1330    "crypto/ocsp/ocsp_srv.c",
1331    "crypto/ocsp/ocsp_vfy.c",
1332    "crypto/ocsp/v3_ocsp.c",
1333    "crypto/packet.c",
1334    "crypto/param_build.c",
1335    "crypto/param_build_set.c",
1336    "crypto/params.c",
1337    "crypto/params_dup.c",
1338    "crypto/params_from_text.c",
1339    "crypto/passphrase.c",
1340    "crypto/pem/pem_all.c",
1341    "crypto/pem/pem_err.c",
1342    "crypto/pem/pem_info.c",
1343    "crypto/pem/pem_lib.c",
1344    "crypto/pem/pem_oth.c",
1345    "crypto/pem/pem_pk8.c",
1346    "crypto/pem/pem_pkey.c",
1347    "crypto/pem/pem_sign.c",
1348    "crypto/pem/pem_x509.c",
1349    "crypto/pem/pem_xaux.c",
1350    "crypto/pem/pvkfmt.c",
1351    "crypto/pkcs12/p12_add.c",
1352    "crypto/pkcs12/p12_asn.c",
1353    "crypto/pkcs12/p12_attr.c",
1354    "crypto/pkcs12/p12_crpt.c",
1355    "crypto/pkcs12/p12_crt.c",
1356    "crypto/pkcs12/p12_decr.c",
1357    "crypto/pkcs12/p12_init.c",
1358    "crypto/pkcs12/p12_key.c",
1359    "crypto/pkcs12/p12_kiss.c",
1360    "crypto/pkcs12/p12_mutl.c",
1361    "crypto/pkcs12/p12_npas.c",
1362    "crypto/pkcs12/p12_p8d.c",
1363    "crypto/pkcs12/p12_p8e.c",
1364    "crypto/pkcs12/p12_sbag.c",
1365    "crypto/pkcs12/p12_utl.c",
1366    "crypto/pkcs12/pk12err.c",
1367    "crypto/pkcs7/bio_pk7.c",
1368    "crypto/pkcs7/pk7_asn1.c",
1369    "crypto/pkcs7/pk7_attr.c",
1370    "crypto/pkcs7/pk7_doit.c",
1371    "crypto/pkcs7/pk7_lib.c",
1372    "crypto/pkcs7/pk7_mime.c",
1373    "crypto/pkcs7/pk7_smime.c",
1374    "crypto/pkcs7/pkcs7err.c",
1375    "crypto/poly1305/poly1305.c",
1376    "crypto/property/defn_cache.c",
1377    "crypto/property/property.c",
1378    "crypto/property/property_err.c",
1379    "crypto/property/property_parse.c",
1380    "crypto/property/property_query.c",
1381    "crypto/property/property_string.c",
1382    "crypto/provider.c",
1383    "crypto/provider_child.c",
1384    "crypto/provider_conf.c",
1385    "crypto/provider_core.c",
1386    "crypto/provider_predefined.c",
1387    "crypto/punycode.c",
1388    "crypto/rand/prov_seed.c",
1389    "crypto/rand/rand_deprecated.c",
1390    "crypto/rand/rand_err.c",
1391    "crypto/rand/rand_lib.c",
1392    "crypto/rand/rand_meth.c",
1393    "crypto/rand/rand_pool.c",
1394    "crypto/rand/randfile.c",
1395    "crypto/rc2/rc2_cbc.c",
1396    "crypto/rc2/rc2_ecb.c",
1397    "crypto/rc2/rc2_skey.c",
1398    "crypto/rc2/rc2cfb64.c",
1399    "crypto/rc2/rc2ofb64.c",
1400    "crypto/ripemd/rmd_dgst.c",
1401    "crypto/ripemd/rmd_one.c",
1402    "crypto/rsa/rsa_ameth.c",
1403    "crypto/rsa/rsa_asn1.c",
1404    "crypto/rsa/rsa_backend.c",
1405    "crypto/rsa/rsa_chk.c",
1406    "crypto/rsa/rsa_crpt.c",
1407    "crypto/rsa/rsa_depr.c",
1408    "crypto/rsa/rsa_err.c",
1409    "crypto/rsa/rsa_gen.c",
1410    "crypto/rsa/rsa_lib.c",
1411    "crypto/rsa/rsa_meth.c",
1412    "crypto/rsa/rsa_mp.c",
1413    "crypto/rsa/rsa_mp_names.c",
1414    "crypto/rsa/rsa_none.c",
1415    "crypto/rsa/rsa_oaep.c",
1416    "crypto/rsa/rsa_ossl.c",
1417    "crypto/rsa/rsa_pk1.c",
1418    "crypto/rsa/rsa_pmeth.c",
1419    "crypto/rsa/rsa_prn.c",
1420    "crypto/rsa/rsa_pss.c",
1421    "crypto/rsa/rsa_saos.c",
1422    "crypto/rsa/rsa_schemes.c",
1423    "crypto/rsa/rsa_sign.c",
1424    "crypto/rsa/rsa_sp800_56b_check.c",
1425    "crypto/rsa/rsa_sp800_56b_gen.c",
1426    "crypto/rsa/rsa_x931.c",
1427    "crypto/rsa/rsa_x931g.c",
1428    "crypto/seed/seed.c",
1429    "crypto/seed/seed_cbc.c",
1430    "crypto/seed/seed_cfb.c",
1431    "crypto/seed/seed_ecb.c",
1432    "crypto/seed/seed_ofb.c",
1433    "crypto/self_test_core.c",
1434    "crypto/sha/sha1_one.c",
1435    "crypto/sha/sha1dgst.c",
1436    "crypto/sha/sha256.c",
1437    "crypto/sha/sha3.c",
1438    "crypto/sha/sha512.c",
1439    "crypto/siphash/siphash.c",
1440    "crypto/sm2/sm2_crypt.c",
1441    "crypto/sm2/sm2_err.c",
1442    "crypto/sm2/sm2_key.c",
1443    "crypto/sm2/sm2_sign.c",
1444    "crypto/sm3/legacy_sm3.c",
1445    "crypto/sm3/sm3.c",
1446    "crypto/sm4/sm4.c",
1447    "crypto/sparse_array.c",
1448    "crypto/srp/srp_lib.c",
1449    "crypto/srp/srp_vfy.c",
1450    "crypto/stack/stack.c",
1451    "crypto/store/store_err.c",
1452    "crypto/store/store_init.c",
1453    "crypto/store/store_lib.c",
1454    "crypto/store/store_meth.c",
1455    "crypto/store/store_register.c",
1456    "crypto/store/store_result.c",
1457    "crypto/store/store_strings.c",
1458    "crypto/threads_lib.c",
1459    "crypto/threads_none.c",
1460    "crypto/threads_pthread.c",
1461    "crypto/threads_win.c",
1462    "crypto/trace.c",
1463    "crypto/ts/ts_asn1.c",
1464    "crypto/ts/ts_conf.c",
1465    "crypto/ts/ts_err.c",
1466    "crypto/ts/ts_lib.c",
1467    "crypto/ts/ts_req_print.c",
1468    "crypto/ts/ts_req_utils.c",
1469    "crypto/ts/ts_rsp_print.c",
1470    "crypto/ts/ts_rsp_sign.c",
1471    "crypto/ts/ts_rsp_utils.c",
1472    "crypto/ts/ts_rsp_verify.c",
1473    "crypto/ts/ts_verify_ctx.c",
1474    "crypto/txt_db/txt_db.c",
1475    "crypto/ui/ui_err.c",
1476    "crypto/ui/ui_lib.c",
1477    "crypto/ui/ui_null.c",
1478    "crypto/ui/ui_openssl.c",
1479    "crypto/ui/ui_util.c",
1480    "crypto/uid.c",
1481    "crypto/whrlpool/wp_dgst.c",
1482    "crypto/x509/by_dir.c",
1483    "crypto/x509/by_file.c",
1484    "crypto/x509/by_store.c",
1485    "crypto/x509/pcy_cache.c",
1486    "crypto/x509/pcy_data.c",
1487    "crypto/x509/pcy_lib.c",
1488    "crypto/x509/pcy_map.c",
1489    "crypto/x509/pcy_node.c",
1490    "crypto/x509/pcy_tree.c",
1491    "crypto/x509/t_crl.c",
1492    "crypto/x509/t_req.c",
1493    "crypto/x509/t_x509.c",
1494    "crypto/x509/v3_addr.c",
1495    "crypto/x509/v3_admis.c",
1496    "crypto/x509/v3_akeya.c",
1497    "crypto/x509/v3_akid.c",
1498    "crypto/x509/v3_asid.c",
1499    "crypto/x509/v3_bcons.c",
1500    "crypto/x509/v3_bitst.c",
1501    "crypto/x509/v3_conf.c",
1502    "crypto/x509/v3_cpols.c",
1503    "crypto/x509/v3_crld.c",
1504    "crypto/x509/v3_enum.c",
1505    "crypto/x509/v3_extku.c",
1506    "crypto/x509/v3_genn.c",
1507    "crypto/x509/v3_ia5.c",
1508    "crypto/x509/v3_info.c",
1509    "crypto/x509/v3_int.c",
1510    "crypto/x509/v3_ist.c",
1511    "crypto/x509/v3_lib.c",
1512    "crypto/x509/v3_ncons.c",
1513    "crypto/x509/v3_pci.c",
1514    "crypto/x509/v3_pcia.c",
1515    "crypto/x509/v3_pcons.c",
1516    "crypto/x509/v3_pku.c",
1517    "crypto/x509/v3_pmaps.c",
1518    "crypto/x509/v3_prn.c",
1519    "crypto/x509/v3_purp.c",
1520    "crypto/x509/v3_san.c",
1521    "crypto/x509/v3_skid.c",
1522    "crypto/x509/v3_sxnet.c",
1523    "crypto/x509/v3_tlsf.c",
1524    "crypto/x509/v3_utf8.c",
1525    "crypto/x509/v3_utl.c",
1526    "crypto/x509/v3err.c",
1527    "crypto/x509/x509_att.c",
1528    "crypto/x509/x509_cmp.c",
1529    "crypto/x509/x509_d2.c",
1530    "crypto/x509/x509_def.c",
1531    "crypto/x509/x509_err.c",
1532    "crypto/x509/x509_ext.c",
1533    "crypto/x509/x509_lu.c",
1534    "crypto/x509/x509_meth.c",
1535    "crypto/x509/x509_obj.c",
1536    "crypto/x509/x509_r2x.c",
1537    "crypto/x509/x509_req.c",
1538    "crypto/x509/x509_set.c",
1539    "crypto/x509/x509_trust.c",
1540    "crypto/x509/x509_txt.c",
1541    "crypto/x509/x509_v3.c",
1542    "crypto/x509/x509_vfy.c",
1543    "crypto/x509/x509_vpm.c",
1544    "crypto/x509/x509cset.c",
1545    "crypto/x509/x509name.c",
1546    "crypto/x509/x509rset.c",
1547    "crypto/x509/x509spki.c",
1548    "crypto/x509/x509type.c",
1549    "crypto/x509/x_all.c",
1550    "crypto/x509/x_attrib.c",
1551    "crypto/x509/x_crl.c",
1552    "crypto/x509/x_exten.c",
1553    "crypto/x509/x_name.c",
1554    "crypto/x509/x_pubkey.c",
1555    "crypto/x509/x_req.c",
1556    "crypto/x509/x_x509.c",
1557    "crypto/x509/x_x509a.c",
1558    "providers/baseprov.c",
1559    "providers/defltprov.c",
1560    "providers/nullprov.c",
1561    "providers/prov_running.c",
1562  ]
1563  if (build_with_liblegacy) {
1564    sources += [
1565      "engines/e_capi.c",
1566      "engines/e_padlock.c",
1567      "providers/legacyprov.c",
1568    ]
1569  }
1570  sources += libcommon_common_sources
1571  sources += libcommon_build_all_generated_selected_platform_sources
1572  sources += libdefault_common_sources
1573  sources += libdefault_build_all_generated_selected_platform_sources
1574  sources += libcrypto_build_all_generated_selected_platform_sources
1575  if (build_with_liblegacy) {
1576    sources += liblegacy_sources
1577  }
1578
1579  if (openssl_selected_platform == "linux-armv4") {
1580    # 升级修改适配检查点21 libcrypto 不同平台c源码列表
1581    sources += [
1582      "crypto/aes/aes_cbc.c",
1583      "crypto/armcap.c",
1584      "crypto/bn/bn_asm.c",
1585      "crypto/camellia/camellia.c",
1586      "crypto/camellia/cmll_cbc.c",
1587      "crypto/rc4/rc4_enc.c",
1588      "crypto/rc4/rc4_skey.c",
1589      "crypto/whrlpool/wp_block.c",
1590    ]
1591    if (build_with_liblegacy) {
1592      sources += [ "engines/e_afalg.c" ]
1593    }
1594  } else if (openssl_selected_platform == "linux-aarch64") {
1595    # 升级修改适配检查点22 libcrypto 不同平台c源码列表
1596    sources += [
1597      "crypto/aes/aes_cbc.c",
1598      "crypto/aes/aes_core.c",
1599      "crypto/armcap.c",
1600      "crypto/bn/bn_asm.c",
1601      "crypto/camellia/camellia.c",
1602      "crypto/camellia/cmll_cbc.c",
1603      "crypto/rc4/rc4_enc.c",
1604      "crypto/rc4/rc4_skey.c",
1605      "crypto/whrlpool/wp_block.c",
1606    ]
1607    if (build_with_liblegacy) {
1608      sources += [ "engines/e_afalg.c" ]
1609    }
1610  } else if (openssl_selected_platform == "darwin64-x86_64-cc") {
1611    # 升级修改适配检查点23 libcrypto 不同平台c源码列表
1612    sources += [
1613      "crypto/bn/asm/x86_64-gcc.c",
1614      "crypto/bn/rsaz_exp.c",
1615      "crypto/bn/rsaz_exp_x2.c",
1616    ]
1617  } else if (openssl_selected_platform == "darwin64-arm64-cc") {
1618    # 升级修改适配检查点24 libcrypto 不同平台c源码列表
1619    sources += [
1620      "crypto/aes/aes_cbc.c",
1621      "crypto/aes/aes_core.c",
1622      "crypto/armcap.c",
1623      "crypto/bn/bn_asm.c",
1624      "crypto/camellia/camellia.c",
1625      "crypto/camellia/cmll_cbc.c",
1626      "crypto/rc4/rc4_enc.c",
1627      "crypto/rc4/rc4_skey.c",
1628      "crypto/whrlpool/wp_block.c",
1629    ]
1630  } else if (openssl_selected_platform == "linux-x86_64") {
1631    # 升级修改适配检查点25 libcrypto 不同平台c源码列表
1632    sources += [
1633      "crypto/bn/asm/x86_64-gcc.c",
1634      "crypto/bn/rsaz_exp.c",
1635      "crypto/bn/rsaz_exp_x2.c",
1636    ]
1637    if (build_with_liblegacy) {
1638      sources += [ "engines/e_afalg.c" ]
1639    }
1640  } else if (openssl_selected_platform == "mingw64") {
1641    # 升级修改适配检查点26 libcrypto 不同平台c源码列表
1642    sources += [
1643      "crypto/bn/asm/x86_64-gcc.c",
1644      "crypto/bn/rsaz_exp.c",
1645      "crypto/bn/rsaz_exp_x2.c",
1646    ]
1647  } else if (openssl_selected_platform == "linux64-loongarch64") {
1648    sources += [
1649      "crypto/aes/aes_cbc.c",
1650      "crypto/aes/aes_core.c",
1651      "crypto/bn/bn_asm.c",
1652      "crypto/camellia/camellia.c",
1653      "crypto/camellia/cmll_cbc.c",
1654      "crypto/loongarchcap.c",
1655      "crypto/rc4/rc4_enc.c",
1656      "crypto/rc4/rc4_skey.c",
1657      "crypto/whrlpool/wp_block.c",
1658
1659      # v_check bind_engine multi defined
1660      "engines/e_afalg.c",
1661
1662      # ChaCha20_ctr32
1663      "crypto/chacha/chacha_enc.c",
1664
1665      # ./crypto/sha/keccak1600.c:1096 SHA3_squeeze func
1666      "crypto/sha/keccak1600.c",
1667    ]
1668
1669    sources -= [
1670      # ecp_nistz256_xxx func
1671      "crypto/ec/ecp_nistz256.c",
1672
1673      # v_check bind_engine multi defined
1674      "engines/e_capi.c",
1675    ]
1676  }
1677
1678  configs = [ ":crypto_config_private" ]
1679  public_configs = [ ":crypto_config_public" ]
1680  deps = [ ":openssl_build_all_generated" ]
1681}
1682
1683ohos_static_library("libcrypto_static") {
1684  if (!compatible_with_legacy_build_system) {
1685    subsystem_name = "thirdparty"
1686    part_name = "openssl"
1687  }
1688  deps = [ ":crypto_source" ]
1689  public_configs = [ ":crypto_config_public" ]
1690  complete_static_lib = true
1691}
1692
1693if (is_mingw || is_mac) {
1694  ohos_shared_library("libcrypto_restool") {
1695    sources = []
1696    configs = []
1697    deps = [ ":crypto_source" ]
1698    if (openssl_selected_platform == "mingw64") {
1699      sources += [ "crypto/dllmain.c" ]
1700      configs += [ ":crypto_config_private" ]
1701    }
1702    if (compatible_with_legacy_build_system) {
1703      subsystem_name = "security"
1704      part_name = "huks"
1705    } else {
1706      subsystem_name = "thirdparty"
1707      part_name = "openssl"
1708    }
1709    public_configs = [ ":crypto_config_public" ]
1710    install_images = [
1711      "system",
1712      "updater",
1713    ]
1714  }
1715} else {
1716  group("libcrypto_restool") {
1717  }
1718}
1719
1720config("openssl_link_config") {
1721  if (current_os == "ohos" && current_cpu == "arm64") {
1722    ldflags = [ "-Wl,--lto-O0" ]
1723  }
1724}
1725
1726ohos_shared_library("libcrypto_shared") {
1727  sources = []
1728  configs = []
1729  deps = [
1730    ":crypto_source",
1731    ":openssl.cnf",
1732  ]
1733  if (openssl_selected_platform == "mingw64") {
1734    sources += [ "crypto/dllmain.c" ]
1735    configs += [ ":crypto_config_private" ]
1736  }
1737  if (current_os == "ios") {
1738    ldflags = [
1739      "-Wl",
1740      "-install_name",
1741      "@rpath/libcrypto_openssl.framework/libcrypto_openssl",
1742    ]
1743    output_name = "crypto_openssl"
1744  } else {
1745    configs += [ ":openssl_link_config" ]
1746    output_name = "libcrypto_openssl"
1747  }
1748  if (compatible_with_legacy_build_system) {
1749    subsystem_name = "security"
1750    part_name = "huks"
1751  } else {
1752    subsystem_name = "thirdparty"
1753    part_name = "openssl"
1754  }
1755  if (!compatible_with_legacy_build_system) {
1756    innerapi_tags = [
1757      "platformsdk",
1758      "chipsetsdk_sp",
1759    ]
1760  }
1761  public_configs = [ ":crypto_config_public" ]
1762  install_images = [
1763    "system",
1764    "updater",
1765  ]
1766}
1767
1768if (current_os == "ios") {
1769  ohos_combine_darwin_framework("libcrypto_openssl") {
1770    deps = [ ":libcrypto_shared" ]
1771    subsystem_name = "thirdparty"
1772    part_name = "openssl"
1773  }
1774}
1775
1776unused_variables = []
1777unused_variables += unused_variables
1778unused_variables += crypto_config_common_private_include_dirs
1779unused_variables += crypto_config_common_public_include_dirs
1780unused_variables += crypto_config_common_cflags
1781unused_variables += crypto_config_linux_armv4_cflags
1782unused_variables += crypto_config_linux_aarch64_cflags
1783unused_variables += crypto_config_darwin64_x86_64_cc_cflags
1784unused_variables += crypto_config_darwin64_arm64_cc_cflags
1785unused_variables += crypto_config_linux_x86_64_cflags
1786unused_variables += crypto_config_mingw64_cflags
1787unused_variables += crypto_config_linux_loongarch64_cflags
1788unused_variables += libcommon_common_sources
1789unused_variables += libdefault_common_sources
1790unused_variables += libcrypto_build_all_generated_linux_armv4_sources
1791unused_variables += libcrypto_build_all_generated_linux_aarch64_sources
1792unused_variables += libcrypto_build_all_generated_darwin64_x86_64_cc_sources
1793unused_variables += libcrypto_build_all_generated_darwin64_arm64_cc_sources
1794unused_variables += libcrypto_build_all_generated_linux_x86_64_sources
1795unused_variables += libcrypto_build_all_generated_mingw64_sources
1796unused_variables += libcrypto_build_all_generated_linux_loongarch64_sources
1797
1798config("ssl_config_private") {
1799  include_dirs = crypto_config_common_private_include_dirs
1800  cflags = crypto_config_common_cflags + crypto_config_current_platform_cflags +
1801           openssl_internal_cflags
1802}
1803
1804config("ssl_config_public") {
1805  include_dirs = crypto_config_common_public_include_dirs
1806}
1807
1808ohos_source_set("ssl_source") {
1809  if (!compatible_with_legacy_build_system) {
1810    subsystem_name = "thirdparty"
1811    part_name = "openssl"
1812  }
1813
1814  # 升级修改适配检查点27 libssl 源码列表
1815  sources = [
1816    "ssl/bio_ssl.c",
1817    "ssl/d1_lib.c",
1818    "ssl/d1_msg.c",
1819    "ssl/d1_srtp.c",
1820    "ssl/methods.c",
1821    "ssl/pqueue.c",
1822    "ssl/record/dtls1_bitmap.c",
1823    "ssl/record/rec_layer_d1.c",
1824    "ssl/record/rec_layer_s3.c",
1825    "ssl/record/ssl3_buffer.c",
1826    "ssl/record/ssl3_record.c",
1827    "ssl/record/ssl3_record_tls13.c",
1828    "ssl/s3_enc.c",
1829    "ssl/s3_lib.c",
1830    "ssl/s3_msg.c",
1831    "ssl/ssl_asn1.c",
1832    "ssl/ssl_cert.c",
1833    "ssl/ssl_ciph.c",
1834    "ssl/ssl_conf.c",
1835    "ssl/ssl_err.c",
1836    "ssl/ssl_err_legacy.c",
1837    "ssl/ssl_init.c",
1838    "ssl/ssl_lib.c",
1839    "ssl/ssl_mcnf.c",
1840    "ssl/ssl_rsa.c",
1841    "ssl/ssl_rsa_legacy.c",
1842    "ssl/ssl_sess.c",
1843    "ssl/ssl_stat.c",
1844    "ssl/ssl_txt.c",
1845    "ssl/ssl_utst.c",
1846    "ssl/statem/extensions.c",
1847    "ssl/statem/extensions_clnt.c",
1848    "ssl/statem/extensions_cust.c",
1849    "ssl/statem/extensions_srvr.c",
1850    "ssl/statem/statem.c",
1851    "ssl/statem/statem_clnt.c",
1852    "ssl/statem/statem_dtls.c",
1853    "ssl/statem/statem_lib.c",
1854    "ssl/statem/statem_srvr.c",
1855    "ssl/t1_enc.c",
1856    "ssl/t1_lib.c",
1857    "ssl/t1_trce.c",
1858    "ssl/tls13_enc.c",
1859    "ssl/tls_depr.c",
1860    "ssl/tls_srp.c",
1861  ]
1862
1863  configs = [ ":ssl_config_private" ]
1864  public_configs = [ ":ssl_config_public" ]
1865  deps = [ ":openssl_build_all_generated" ]
1866}
1867
1868ohos_static_library("libssl_static") {
1869  if (!compatible_with_legacy_build_system) {
1870    subsystem_name = "thirdparty"
1871    part_name = "openssl"
1872  }
1873  deps = [ ":ssl_source" ]
1874  public_configs = [ ":ssl_config_public" ]
1875  complete_static_lib = true
1876}
1877
1878ohos_shared_library("libssl_shared") {
1879  deps = [
1880    ":libcrypto_shared",
1881    ":openssl.cnf",
1882    ":ssl_source",
1883  ]
1884  if (current_os == "ios") {
1885    ldflags = [
1886      "-Wl",
1887      "-install_name",
1888      "@rpath/libssl_openssl.framework/libssl_openssl",
1889    ]
1890    output_name = "ssl_openssl"
1891  } else {
1892    configs = [ ":openssl_link_config" ]
1893    output_name = "libssl_openssl"
1894  }
1895  if (compatible_with_legacy_build_system) {
1896    subsystem_name = "developtools"
1897    part_name = "profiler"
1898  } else {
1899    subsystem_name = "thirdparty"
1900    part_name = "openssl"
1901  }
1902
1903  if (!compatible_with_legacy_build_system) {
1904    innerapi_tags = [
1905      "platformsdk",
1906      "chipsetsdk",
1907    ]
1908  }
1909  public_configs = [
1910    ":crypto_config_public",
1911    ":ssl_config_public",
1912  ]
1913
1914  install_images = [
1915    "system",
1916
1917    # compile libssl_openssl.z.so to the updater image for wpa to use
1918    "updater",
1919  ]
1920}
1921
1922if (current_os == "ios") {
1923  ohos_combine_darwin_framework("libssl_openssl") {
1924    deps = [ ":libssl_shared" ]
1925    subsystem_name = "thirdparty"
1926    part_name = "openssl"
1927  }
1928}
1929
1930ohos_static_library("libapps") {
1931  # 升级修改适配检查点28 libapps 源码列表
1932  sources = [
1933    "apps/lib/app_libctx.c",
1934    "apps/lib/app_params.c",
1935    "apps/lib/app_provider.c",
1936    "apps/lib/app_rand.c",
1937    "apps/lib/app_x509.c",
1938    "apps/lib/apps.c",
1939    "apps/lib/apps_ui.c",
1940    "apps/lib/columns.c",
1941    "apps/lib/engine.c",
1942    "apps/lib/engine_loader.c",
1943    "apps/lib/fmt.c",
1944    "apps/lib/http_server.c",
1945    "apps/lib/names.c",
1946    "apps/lib/opt.c",
1947    "apps/lib/s_cb.c",
1948    "apps/lib/s_socket.c",
1949    "apps/lib/tlssrp_depr.c",
1950  ]
1951  if (openssl_selected_platform == "mingw64") {
1952    sources += [ "apps/lib/win32_init.c" ]
1953  }
1954  if (!compatible_with_legacy_build_system) {
1955    subsystem_name = "thirdparty"
1956    part_name = "openssl"
1957  }
1958  configs = [ ":crypto_config_private" ]
1959  deps = [ ":openssl_build_all_generated" ]
1960}
1961
1962ohos_executable("openssl") {
1963  # 升级修改适配检查点29 apps/openssl 源码列表
1964  sources = [
1965    "${build_all_generated_path}/apps/progs.c",
1966    "apps/asn1parse.c",
1967    "apps/ca.c",
1968    "apps/ciphers.c",
1969    "apps/cmp.c",
1970    "apps/cms.c",
1971    "apps/crl.c",
1972    "apps/crl2pkcs7.c",
1973    "apps/dgst.c",
1974    "apps/dhparam.c",
1975    "apps/dsa.c",
1976    "apps/dsaparam.c",
1977    "apps/ec.c",
1978    "apps/ecparam.c",
1979    "apps/enc.c",
1980    "apps/engine.c",
1981    "apps/errstr.c",
1982    "apps/fipsinstall.c",
1983    "apps/gendsa.c",
1984    "apps/genpkey.c",
1985    "apps/genrsa.c",
1986    "apps/info.c",
1987    "apps/kdf.c",
1988    "apps/lib/cmp_mock_srv.c",
1989    "apps/list.c",
1990    "apps/mac.c",
1991    "apps/nseq.c",
1992    "apps/ocsp.c",
1993    "apps/openssl.c",
1994    "apps/passwd.c",
1995    "apps/pkcs12.c",
1996    "apps/pkcs7.c",
1997    "apps/pkcs8.c",
1998    "apps/pkey.c",
1999    "apps/pkeyparam.c",
2000    "apps/pkeyutl.c",
2001    "apps/prime.c",
2002    "apps/rand.c",
2003    "apps/rehash.c",
2004    "apps/req.c",
2005    "apps/rsa.c",
2006    "apps/rsautl.c",
2007    "apps/s_client.c",
2008    "apps/s_server.c",
2009    "apps/s_time.c",
2010    "apps/sess_id.c",
2011    "apps/smime.c",
2012    "apps/speed.c",
2013    "apps/spkac.c",
2014    "apps/srp.c",
2015    "apps/storeutl.c",
2016    "apps/ts.c",
2017    "apps/verify.c",
2018    "apps/version.c",
2019    "apps/x509.c",
2020  ]
2021  if (openssl_selected_platform == "mingw64") {
2022    sources += [ "${build_all_generated_path}/apps/openssl.rc" ]
2023  }
2024  deps = [
2025    ":libapps",
2026    ":libcrypto_shared",
2027    ":libssl_shared",
2028    ":openssl.cnf",
2029    ":openssl_build_all_generated",
2030  ]
2031  if (compatible_with_legacy_build_system) {
2032    subsystem_name = "security"
2033    part_name = "huks"
2034  } else {
2035    subsystem_name = "thirdparty"
2036    part_name = "openssl"
2037  }
2038  configs = [ ":crypto_config_private" ]
2039}
2040# 升级修改适配检查点 汇总
2041#
2042# libcommon =
2043#     libcommon 生成的源码列表(7) +
2044#     libcommon 原目录源码列表(17)
2045#
2046# libdefault =
2047#     libdefault 生成的源码列表(8) +
2048#     libdefault 原目录源码列表(18)
2049#
2050# liblegacy =
2051#     liblegacy 源码列表(19)
2052#
2053# libcrypto =
2054#     libcrypto 不同平台汇编代码(1,2,3,4,5,6) +
2055#     libcrypto 不同平台c源码列表(21,22,23,24,25,26) +
2056#     libcrypto 原目录源码列表(20) +
2057#     libcommon +
2058#     libdefault +
2059#     liblegacy
2060#
2061# libssl =
2062#     libssl 源码列表(27)
2063#
2064# libapps =
2065#     libapps 源码列表(28)
2066#
2067# apps/openssl =
2068#     apps/openssl 源码列表(29) +
2069#     libapps
2070#
2071# 编译选项 =
2072#     内部公共头文件目录列表(9) +
2073#     内部公共编译选项宏列表(10) +
2074#     内部不同平台编译选项列表(11,12,13,14,15,16)
2075