blob: bbb70ca3b8c84f3b9bf7ca1906b3b31c68a1a76a [file] [log] [blame]
Dan Willemsen21986fb2016-07-14 15:23:56 -07001// Note that some host libraries have the same module name as the target
2// libraries. This is currently needed to build, for example, adb. But it's
3// probably something that should be changed.
4
Paul Duffincb6fdd22019-06-04 13:24:44 +01005package {
6 default_visibility: ["//visibility:private"],
Bob Badourb313bb52021-02-12 15:33:59 -08007 default_applicable_licenses: ["external_boringssl_license"],
8}
9
10// Added automatically by a large-scale-change that took the approach of
11// 'apply every license found to every target'. While this makes sure we respect
12// every license restriction, it may not be entirely correct.
13//
14// e.g. GPL in an MIT project might only apply to the contrib/ directory.
15//
16// Please consider splitting the single license below into multiple licenses,
17// taking care not to lose any license_kind information, and overriding the
18// default license using the 'licenses: [...]' property on targets as needed.
19//
20// For unused files, consider creating a 'fileGroup' with "//visibility:private"
21// to attach the license to, and including a comment whether the files may be
22// used in the current project.
23// See: http://go/android-license-faq
24license {
25 name: "external_boringssl_license",
26 visibility: [":__subpackages__"],
27 license_kinds: [
28 "SPDX-license-identifier-Apache-2.0",
29 "SPDX-license-identifier-BSD",
30 "SPDX-license-identifier-ISC",
31 "SPDX-license-identifier-MIT",
32 "SPDX-license-identifier-OpenSSL",
33 "legacy_unencumbered",
34 ],
35 license_text: [
36 "NOTICE",
37 ],
Paul Duffincb6fdd22019-06-04 13:24:44 +010038}
39
Dan Willemsen21986fb2016-07-14 15:23:56 -070040// Pull in the autogenerated sources modules
41build = ["sources.bp"]
42
43// Used by libcrypto, libssl, bssl tool, and native tests
44cc_defaults {
45 name: "boringssl_flags",
Steven Morelandf593be82017-04-14 04:51:23 -070046 vendor_available: true,
Justin Yun56083292020-11-11 15:43:11 +090047 product_available: true,
Dan Willemsen21986fb2016-07-14 15:23:56 -070048
49 cflags: [
50 "-fvisibility=hidden",
51 "-DBORINGSSL_SHARED_LIBRARY",
David Benjaminfc8a7862018-06-25 19:02:46 -040052 "-DBORINGSSL_ANDROID_SYSTEM",
Dan Willemsen21986fb2016-07-14 15:23:56 -070053 "-DOPENSSL_SMALL",
54 "-D_XOPEN_SOURCE=700",
Chih-Hung Hsieh9146d992017-09-27 10:26:03 -070055 "-Werror",
Dan Willemsen21986fb2016-07-14 15:23:56 -070056 "-Wno-unused-parameter",
57 ],
58
59 cppflags: [
60 "-Wall",
61 "-Werror",
62 ],
63
64 conlyflags: ["-std=c99"],
David Benjaminfc8a7862018-06-25 19:02:46 -040065
66 // Build BoringSSL and its tests against the same STL.
67 sdk_version: "9",
68 target: {
69 android: {
70 stl: "libc++_static",
71 },
72 },
Dan Willemsen21986fb2016-07-14 15:23:56 -070073}
74
75// Used by libcrypto + libssl
76cc_defaults {
77 name: "boringssl_defaults",
78
79 local_include_dirs: ["src/include"],
80 export_include_dirs: ["src/include"],
David Benjaminfc8a7862018-06-25 19:02:46 -040081 cflags: ["-DBORINGSSL_IMPLEMENTATION"],
Dan Willemsen21986fb2016-07-14 15:23:56 -070082}
83
84//// libcrypto
Dan Willemsen21986fb2016-07-14 15:23:56 -070085cc_defaults {
86 name: "libcrypto_defaults",
87 host_supported: true,
Yifan Hongca6b4e82020-10-21 18:11:12 -070088 ramdisk_available: true,
89 vendor_ramdisk_available: true,
Dan Willemsen21986fb2016-07-14 15:23:56 -070090
91 // Windows and Macs both have problems with assembly files
92 target: {
93 windows: {
94 enabled: true,
95 cflags: ["-DOPENSSL_NO_ASM"],
96 host_ldlibs: ["-lws2_32"],
97 },
98 darwin: {
99 cflags: ["-DOPENSSL_NO_ASM"],
100 },
Kenny Root7b550be2016-09-20 15:25:24 -0700101 host: {
Dan Willemsen21986fb2016-07-14 15:23:56 -0700102 host_ldlibs: ["-lpthread"],
103 },
Pete Bentley1e9e5852020-06-30 16:45:33 +0100104 android: {
105 // On FIPS builds (i.e. Android only) prevent other libraries
106 // from pre-empting symbols in libcrypto which could affect FIPS
107 // compliance and cause integrity checks to fail. See b/160231064.
108 ldflags: ["-Wl,-Bsymbolic"],
109 },
Dan Willemsen21986fb2016-07-14 15:23:56 -0700110 },
111
112 local_include_dirs: ["src/crypto"],
Pete Bentleye6a478a2019-08-19 22:20:24 +0100113}
114
115cc_object {
116 name: "bcm_object",
117 device_supported: true,
118 recovery_available: true,
119 native_bridge_supported: true,
120 defaults: [
121 "libcrypto_bcm_sources",
122 "libcrypto_defaults",
123 "boringssl_defaults",
124 "boringssl_flags",
125 ],
Peter Collingbourne22f5f872019-09-27 15:32:38 -0700126 sanitize: {
127 address: false,
Tobias Thierer6204b542019-10-18 21:55:05 +0100128 hwaddress: false,
Mitch Phillipsf5a60782019-12-10 08:47:30 -0800129 fuzzer: false,
Peter Collingbourne22f5f872019-09-27 15:32:38 -0700130 },
Pete Bentleye6a478a2019-08-19 22:20:24 +0100131 target: {
132 android: {
133 cflags: [
134 "-DBORINGSSL_FIPS",
135 "-fPIC",
Pete Bentley1d07cf82019-10-18 12:49:31 +0100136 // -fno[data|text]-sections required to ensure a
137 // single text and data section for FIPS integrity check
138 "-fno-data-sections",
139 "-fno-function-sections",
Pete Bentleye6a478a2019-08-19 22:20:24 +0100140 ],
141 linker_script: "src/crypto/fipsmodule/fips_shared.lds",
142 },
Peter Collingbourne0560ada2019-11-22 13:50:29 -0800143 // Temporary hack to let BoringSSL build with a new compiler.
144 // This doesn't enable HWASAN unconditionally, it just causes
145 // BoringSSL's asm code to unconditionally use a HWASAN-compatible
146 // global variable reference so that the non-HWASANified (because of
147 // sanitize: { hwaddress: false } above) code in the BCM can
148 // successfully link against the HWASANified code in the rest of
149 // BoringSSL in HWASAN builds.
150 android_arm64: {
151 asflags: [
152 "-fsanitize=hwaddress",
153 ],
154 },
Pete Bentleye6a478a2019-08-19 22:20:24 +0100155 },
Jiyong Park0dcd4e82020-03-09 15:23:05 +0900156 apex_available: [
157 "//apex_available:platform",
158 "com.android.adbd",
Martin Stjernholm98b03622020-10-12 15:10:40 +0100159 "com.android.art",
Jiyong Park0dcd4e82020-03-09 15:23:05 +0900160 "com.android.art.debug",
Jiyong Park0dcd4e82020-03-09 15:23:05 +0900161 "com.android.art.testing",
162 "com.android.bluetooth.updatable",
Alan Stokes53cbde72021-07-06 17:46:00 +0100163 "com.android.compos",
Jiyong Park0dcd4e82020-03-09 15:23:05 +0900164 "com.android.conscrypt",
165 "com.android.media",
166 "com.android.resolv",
Jiyong Park16f7c572021-01-05 14:41:56 +0900167 "com.android.virt",
Jiyong Park0dcd4e82020-03-09 15:23:05 +0900168 ],
Jooyung Han856ad1d2020-04-16 18:48:25 +0900169 min_sdk_version: "29",
Pete Bentleye6a478a2019-08-19 22:20:24 +0100170}
171
172bootstrap_go_package {
173 name: "bssl_ar",
174 pkgPath: "boringssl.googlesource.com/boringssl/util/ar",
175 srcs: [
176 "src/util/ar/ar.go",
177 ],
178 testSrcs: [
179 "src/util/ar/ar_test.go",
180 ],
181}
182
183bootstrap_go_package {
184 name: "bssl_fipscommon",
185 pkgPath: "boringssl.googlesource.com/boringssl/util/fipstools/fipscommon",
186 srcs: [
187 "src/util/fipstools/fipscommon/const.go",
188 ],
189}
190
191blueprint_go_binary {
192 name: "bssl_inject_hash",
193 srcs: [
194 "src/util/fipstools/inject_hash/inject_hash.go",
195 ],
196 deps: [
197 "bssl_ar",
198 "bssl_fipscommon",
199 ],
Dan Willemsen21986fb2016-07-14 15:23:56 -0700200}
201
202// Target and host library
203cc_library {
204 name: "libcrypto",
Paul Duffincb6fdd22019-06-04 13:24:44 +0100205 visibility: ["//visibility:public"],
Vijay Venkatraman3caad952017-05-16 12:00:57 -0700206 vendor_available: true,
Justin Yun56083292020-11-11 15:43:11 +0900207 product_available: true,
dimitry09dd3be2019-05-09 16:42:01 +0200208 native_bridge_supported: true,
Justin Yun47949c52017-07-24 15:19:43 +0900209 vndk: {
210 enabled: true,
211 },
Jooyung Hanb6b07c32019-01-18 15:31:20 +0900212 double_loadable: true,
Jiyong Parkc3463952018-04-27 21:44:32 +0900213 recovery_available: true,
Paul Duffinf6a61fd2019-06-25 12:06:25 +0100214 defaults: [
215 "libcrypto_sources",
216 "libcrypto_defaults",
217 "boringssl_defaults",
218 "boringssl_flags",
219 ],
Dan Willemsen2b2c24b2016-07-21 11:03:36 -0700220 unique_host_soname: true,
Pete Bentleye6a478a2019-08-19 22:20:24 +0100221 srcs: [
222 ":bcm_object",
223 ],
224 target: {
225 android: {
226 cflags: [
227 "-DBORINGSSL_FIPS",
228 ],
Pete Bentleye0c3f632020-05-06 19:52:29 +0100229 sanitize: {
230 // Disable address sanitizing otherwise libcrypto will not report
231 // itself as being in FIPS mode, which causes boringssl_self_test
232 // to fail.
233 address: false,
234 },
Pete Bentleye6a478a2019-08-19 22:20:24 +0100235 inject_bssl_hash: true,
Colin Cross4b979db2019-09-18 11:20:16 -0700236 static: {
237 // Disable the static version of libcrypto, as it causes
238 // problems for FIPS certification. Use libcrypto_static for
239 // modules that need static libcrypto but do not need FIPS self
240 // testing, or use dynamic libcrypto.
241 enabled: false,
242 },
Pete Bentleye6a478a2019-08-19 22:20:24 +0100243 },
244 },
Joshua Duong26b57e22020-02-10 16:04:44 -0800245 apex_available: [
246 "//apex_available:platform",
247 "com.android.adbd",
Martin Stjernholm98b03622020-10-12 15:10:40 +0100248 "com.android.art",
Jiyong Park0dcd4e82020-03-09 15:23:05 +0900249 "com.android.art.debug",
Jiyong Park0dcd4e82020-03-09 15:23:05 +0900250 "com.android.art.testing",
251 "com.android.bluetooth.updatable",
Alan Stokes53cbde72021-07-06 17:46:00 +0100252 "com.android.compos",
Jiyong Park0dcd4e82020-03-09 15:23:05 +0900253 "com.android.conscrypt",
254 "com.android.media",
255 "com.android.resolv",
Jiyong Park16f7c572021-01-05 14:41:56 +0900256 "com.android.virt",
Joshua Duong26b57e22020-02-10 16:04:44 -0800257 ],
Jooyung Han856ad1d2020-04-16 18:48:25 +0900258 min_sdk_version: "29",
Dan Willemsen21986fb2016-07-14 15:23:56 -0700259}
260
261// Static library
Colin Cross4b979db2019-09-18 11:20:16 -0700262// This version of libcrypto will not have FIPS self tests enabled, so its
263// usage is protected through visibility to ensure it doesn't end up used
264// somewhere that needs the FIPS version.
Dan Willemsen21986fb2016-07-14 15:23:56 -0700265cc_library_static {
266 name: "libcrypto_static",
Colin Cross4b979db2019-09-18 11:20:16 -0700267 visibility: [
Paul Duffinebdc4062020-01-22 14:29:01 +0000268 "//art/build/sdk",
Colin Cross4b979db2019-09-18 11:20:16 -0700269 "//bootable/recovery/updater",
270 "//external/conscrypt",
271 "//external/python/cpython2",
Luke Huangf695bbb2021-04-23 15:38:04 +0800272 "//external/rust/crates/quiche",
Elliott Hughes77319d02020-05-14 15:51:34 -0700273 // Strictly, only the *static* toybox for legacy devices should have
274 // access to libcrypto_static, but we can't express that.
275 "//external/toybox",
Colin Cross4b979db2019-09-18 11:20:16 -0700276 "//hardware/interfaces/confirmationui/1.0/vts/functional",
277 "//hardware/interfaces/drm/1.0/vts/functional",
278 "//hardware/interfaces/drm/1.2/vts/functional",
Robert Shih6526b5c2020-01-21 11:03:32 -0800279 "//hardware/interfaces/drm/1.3/vts/functional",
Colin Cross4b979db2019-09-18 11:20:16 -0700280 "//hardware/interfaces/keymaster/3.0/vts/functional",
281 "//hardware/interfaces/keymaster/4.0/vts/functional",
Shawn Willden1ff77d02020-01-16 23:52:56 -0700282 "//hardware/interfaces/keymaster/4.1/vts/functional",
Josh Gaoe49f0ff2021-04-14 15:41:00 -0700283 "//packages/modules/adb",
Luke Huang16a30fc2019-11-22 11:44:50 +0800284 "//packages/modules/DnsResolver/tests:__subpackages__",
Baligh Uddinf58f8702020-11-24 05:58:10 +0000285 "//packages/modules/NeuralNetworks:__subpackages__",
Colin Cross4b979db2019-09-18 11:20:16 -0700286 "//system/core/init",
287 "//system/core/fs_mgr/liblp",
288 "//system/core/fs_mgr/liblp/vts_core",
289 "//system/core/fs_mgr/libsnapshot",
290 "//system/libvintf/test",
291 "//system/security/keystore/tests",
292 "//test/vts-testcase/security/avb",
293 ],
Przemyslaw Szczepaniakdab438a2020-02-05 17:33:41 +0000294 apex_available: [
295 "//apex_available:platform",
296 "com.android.neuralnetworks",
Przemyslaw Szczepaniakdab438a2020-02-05 17:33:41 +0000297 ],
Paul Duffinf6a61fd2019-06-25 12:06:25 +0100298 defaults: [
Pete Bentley47637342019-08-19 12:22:49 +0100299 "libcrypto_bcm_sources",
Paul Duffinf6a61fd2019-06-25 12:06:25 +0100300 "libcrypto_sources",
301 "libcrypto_defaults",
302 "boringssl_defaults",
303 "boringssl_flags",
304 ],
Dan Willemsen21986fb2016-07-14 15:23:56 -0700305}
306
Yifan Honga11a41e2021-09-28 17:18:45 -0700307// Common defaults for lib*_fuzz_unsafe. These are unsafe and deterministic
308// libraries for testing and fuzzing only. See src/FUZZING.md.
309cc_defaults {
310 name: "boringssl_fuzz_unsafe_defaults",
311 host_supported: true,
312 cflags: [
313 "-DBORINGSSL_UNSAFE_DETERMINISTIC_MODE",
314 "-DBORINGSSL_UNSAFE_FUZZER_MODE",
315 ],
316 visibility: [
317 "//frameworks/native/libs/binder/tests:__subpackages__",
318 ],
319}
320
321// Unsafe and deterministic version of libcrypto. For testing and fuzzing only.
322// See src/FUZZING.md.
323cc_test_library {
324 name: "libcrypto_fuzz_unsafe",
325 ramdisk_available: false,
326 vendor_ramdisk_available: false,
327 defaults: [
328 "libcrypto_bcm_sources",
329 "libcrypto_sources",
330 "libcrypto_defaults",
331 "boringssl_defaults",
332 "boringssl_flags",
333 "boringssl_fuzz_unsafe_defaults",
334 ],
335}
336
Dan Willemsen21986fb2016-07-14 15:23:56 -0700337//// libssl
338
339// Target static library
Dan Willemsen21986fb2016-07-14 15:23:56 -0700340
341// Static and Shared library
342cc_library {
343 name: "libssl",
Paul Duffincb6fdd22019-06-04 13:24:44 +0100344 visibility: ["//visibility:public"],
Dan Willemsenea55e182018-10-23 13:41:19 -0700345 recovery_available: true,
Justin Yun47949c52017-07-24 15:19:43 +0900346 vendor_available: true,
Justin Yun56083292020-11-11 15:43:11 +0900347 product_available: true,
dimitry09dd3be2019-05-09 16:42:01 +0200348 native_bridge_supported: true,
Justin Yun47949c52017-07-24 15:19:43 +0900349 vndk: {
350 enabled: true,
351 },
Dan Willemsen21986fb2016-07-14 15:23:56 -0700352 host_supported: true,
Paul Duffinf6a61fd2019-06-25 12:06:25 +0100353 defaults: [
354 "libssl_sources",
355 "boringssl_defaults",
356 "boringssl_flags",
357 ],
Joshua Duong81ce7a52019-10-31 12:44:47 -0700358 target: {
359 windows: {
360 enabled: true,
361 },
362 },
Dan Willemsen2b2c24b2016-07-21 11:03:36 -0700363 unique_host_soname: true,
Dan Willemsen21986fb2016-07-14 15:23:56 -0700364
Dan Willemsen2b2c24b2016-07-21 11:03:36 -0700365 shared_libs: ["libcrypto"],
Joshua Duong26b57e22020-02-10 16:04:44 -0800366
367 apex_available: [
368 "//apex_available:platform",
369 "com.android.adbd",
Jiyong Park0dcd4e82020-03-09 15:23:05 +0900370 "com.android.conscrypt",
371 "com.android.resolv",
Joshua Duong26b57e22020-02-10 16:04:44 -0800372 ],
Jooyung Han856ad1d2020-04-16 18:48:25 +0900373 min_sdk_version: "29",
Dan Willemsen21986fb2016-07-14 15:23:56 -0700374}
375
Yifan Honga11a41e2021-09-28 17:18:45 -0700376// Unsafe and deterministic version of libssl. For testing and fuzzing only.
377// See src/FUZZING.md.
378cc_test_library {
379 name: "libssl_fuzz_unsafe",
380 host_supported: true,
381 defaults: [
382 "libssl_sources",
383 "boringssl_defaults",
384 "boringssl_flags",
385 "boringssl_fuzz_unsafe_defaults",
386 ],
387 static_libs: [
388 "libcrypto_fuzz_unsafe",
389 ],
390}
391
Dan Willemsen21986fb2016-07-14 15:23:56 -0700392// Tool
393cc_binary {
394 name: "bssl",
395 host_supported: true,
Paul Duffinf6a61fd2019-06-25 12:06:25 +0100396 defaults: [
397 "bssl_sources",
398 "boringssl_flags",
399 ],
Dan Willemsen21986fb2016-07-14 15:23:56 -0700400
Dan Willemsen2b2c24b2016-07-21 11:03:36 -0700401 shared_libs: [
402 "libcrypto",
403 "libssl",
404 ],
Dan Willemsen21986fb2016-07-14 15:23:56 -0700405 target: {
Dan Willemsen21986fb2016-07-14 15:23:56 -0700406 darwin: {
407 enabled: false,
408 },
Pete Bentleyd7165532020-05-14 12:01:03 +0100409 android: {
410 compile_multilib: "both",
411 },
412 },
413 multilib: {
414 lib32: {
415 suffix: "32",
416 },
Dan Willemsen21986fb2016-07-14 15:23:56 -0700417 },
418}
Dan Willemsen2458a412016-07-15 09:28:31 -0700419
Pete Bentley390f5872020-12-10 11:19:10 +0000420// Used for CAVP testing for FIPS certification.
421// Not installed on devices by default.
Adam Langley7c167932018-02-02 14:44:53 -0800422cc_binary {
423 name: "cavp",
424 host_supported: true,
425 srcs: [
Pete Bentley0c61efe2019-08-13 09:32:23 +0100426 "src/util/fipstools/cavp/cavp_aes_gcm_test.cc",
427 "src/util/fipstools/cavp/cavp_aes_test.cc",
428 "src/util/fipstools/cavp/cavp_ctr_drbg_test.cc",
429 "src/util/fipstools/cavp/cavp_ecdsa2_keypair_test.cc",
430 "src/util/fipstools/cavp/cavp_ecdsa2_pkv_test.cc",
431 "src/util/fipstools/cavp/cavp_ecdsa2_siggen_test.cc",
432 "src/util/fipstools/cavp/cavp_ecdsa2_sigver_test.cc",
433 "src/util/fipstools/cavp/cavp_hmac_test.cc",
434 "src/util/fipstools/cavp/cavp_kas_test.cc",
435 "src/util/fipstools/cavp/cavp_keywrap_test.cc",
436 "src/util/fipstools/cavp/cavp_main.cc",
437 "src/util/fipstools/cavp/cavp_rsa2_keygen_test.cc",
438 "src/util/fipstools/cavp/cavp_rsa2_siggen_test.cc",
439 "src/util/fipstools/cavp/cavp_rsa2_sigver_test.cc",
440 "src/util/fipstools/cavp/cavp_sha_monte_test.cc",
441 "src/util/fipstools/cavp/cavp_sha_test.cc",
442 "src/util/fipstools/cavp/cavp_tdes_test.cc",
443 "src/util/fipstools/cavp/cavp_test_util.cc",
444 "src/util/fipstools/cavp/cavp_tlskdf_test.cc",
Adam Langley7c167932018-02-02 14:44:53 -0800445 ],
Pete Bentleyd7165532020-05-14 12:01:03 +0100446 target: {
447 android: {
448 compile_multilib: "both",
449 },
450 },
451 multilib: {
452 lib32: {
453 suffix: "32",
454 },
455 },
Adam Langley7c167932018-02-02 14:44:53 -0800456
457 shared_libs: [
458 "libcrypto",
459 ],
460
Paul Duffinf6a61fd2019-06-25 12:06:25 +0100461 defaults: [
462 "boringssl_test_support_sources",
463 "boringssl_flags",
464 ],
Adam Langley7c167932018-02-02 14:44:53 -0800465}
466
Pete Bentley390f5872020-12-10 11:19:10 +0000467// Used for ACVP testing for FIPS certification.
468// Not installed on devices by default.
469cc_binary {
470 name: "acvp_modulewrapper",
Pete Bentley390f5872020-12-10 11:19:10 +0000471 srcs: [
Stephen Craned4573992021-02-25 10:52:24 -0800472 "src/util/fipstools/acvp/modulewrapper/main.cc",
Pete Bentley390f5872020-12-10 11:19:10 +0000473 ],
474 target: {
Pete Bentley7f684a42021-07-21 13:52:17 +0100475 android_x86: {
476 enabled: false,
477 },
478 android_x86_64: {
479 enabled: false,
Pete Bentley390f5872020-12-10 11:19:10 +0000480 },
481 },
482 stem: "modulewrapper",
Pete Bentley7f684a42021-07-21 13:52:17 +0100483 compile_multilib: "both",
Pete Bentley390f5872020-12-10 11:19:10 +0000484 multilib: {
485 lib32: {
486 suffix: "32",
487 },
488 },
489
Stephen Craned4573992021-02-25 10:52:24 -0800490 static_libs: [
491 "libacvp_modulewrapper",
492 ],
493 shared_libs: [
494 "libcrypto",
495 ],
496
497 defaults: [
498 "boringssl_flags",
499 ],
500}
501
502// ACVP wrapper implementation shared between Android and Trusty
503cc_library_static {
504 name: "libacvp_modulewrapper",
505 host_supported: true,
506 vendor_available: true,
507 srcs: [
508 "src/util/fipstools/acvp/modulewrapper/modulewrapper.cc",
509 ],
510 target: {
511 android: {
512 compile_multilib: "both",
513 },
514 },
515 export_include_dirs: ["src/util/fipstools/acvp/modulewrapper/"],
Pete Bentley390f5872020-12-10 11:19:10 +0000516 shared_libs: [
517 "libcrypto",
518 ],
519
520 defaults: [
521 "boringssl_flags",
522 ],
Stephen Crane859a48d2021-03-10 18:01:35 -0800523
524 visibility: ["//system/core/trusty/utils/acvp"],
Pete Bentley390f5872020-12-10 11:19:10 +0000525}
526
Dan Willemsen2458a412016-07-15 09:28:31 -0700527// Test support library
528cc_library_static {
529 name: "boringssl_test_support",
530 host_supported: true,
Paul Duffinf6a61fd2019-06-25 12:06:25 +0100531 defaults: [
532 "boringssl_test_support_sources",
533 "boringssl_flags",
534 ],
Dan Willemsen2458a412016-07-15 09:28:31 -0700535
Dan Willemsen2b2c24b2016-07-21 11:03:36 -0700536 shared_libs: [
537 "libcrypto",
538 "libssl",
539 ],
Dan Willemsen2458a412016-07-15 09:28:31 -0700540}
541
542// Tests
543cc_test {
Paul Duffinf6a61fd2019-06-25 12:06:25 +0100544 name: "boringssl_crypto_test",
545 test_suites: ["device-tests"],
546 host_supported: true,
547 defaults: [
548 "boringssl_crypto_test_sources",
549 "boringssl_flags",
550 ],
551 whole_static_libs: ["boringssl_test_support"],
David Benjaminf31229b2017-01-25 14:08:15 -0500552
Paul Duffinf6a61fd2019-06-25 12:06:25 +0100553 shared_libs: ["libcrypto"],
David Benjaminf31229b2017-01-25 14:08:15 -0500554}
555
556cc_test {
Paul Duffinf6a61fd2019-06-25 12:06:25 +0100557 name: "boringssl_ssl_test",
558 test_suites: ["device-tests"],
559 host_supported: true,
560 defaults: [
561 "boringssl_ssl_test_sources",
562 "boringssl_flags",
563 ],
564 whole_static_libs: ["boringssl_test_support"],
David Benjaminf31229b2017-01-25 14:08:15 -0500565
Paul Duffinf6a61fd2019-06-25 12:06:25 +0100566 shared_libs: [
567 "libcrypto",
568 "libssl",
569 ],
David Benjaminf31229b2017-01-25 14:08:15 -0500570}
Adam Langleyb6f75152019-10-18 12:20:11 -0700571
572// Utility binary for CMVP on-site testing.
573cc_binary {
Tobias Thierer6204b542019-10-18 21:55:05 +0100574 name: "test_fips",
575 host_supported: false,
576 defaults: [
577 "boringssl_flags",
578 ],
579 shared_libs: [
580 "libcrypto",
581 ],
582 srcs: [
583 "src/util/fipstools/cavp/test_fips.c",
584 ],
Adam Langleyb6f75152019-10-18 12:20:11 -0700585}