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