blob: e19a8e010107ad08b42ea46d1214d36c1f015102 [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",
Jiyong Park0dcd4e82020-03-09 15:23:05 +0900165 "com.android.resolv",
Jiyong Park16f7c572021-01-05 14:41:56 +0900166 "com.android.virt",
Jiyong Park0dcd4e82020-03-09 15:23:05 +0900167 ],
Jooyung Han856ad1d2020-04-16 18:48:25 +0900168 min_sdk_version: "29",
Pete Bentleye6a478a2019-08-19 22:20:24 +0100169}
170
171bootstrap_go_package {
172 name: "bssl_ar",
173 pkgPath: "boringssl.googlesource.com/boringssl/util/ar",
174 srcs: [
175 "src/util/ar/ar.go",
176 ],
177 testSrcs: [
178 "src/util/ar/ar_test.go",
179 ],
180}
181
182bootstrap_go_package {
183 name: "bssl_fipscommon",
184 pkgPath: "boringssl.googlesource.com/boringssl/util/fipstools/fipscommon",
185 srcs: [
186 "src/util/fipstools/fipscommon/const.go",
187 ],
188}
189
190blueprint_go_binary {
191 name: "bssl_inject_hash",
192 srcs: [
193 "src/util/fipstools/inject_hash/inject_hash.go",
194 ],
195 deps: [
196 "bssl_ar",
197 "bssl_fipscommon",
198 ],
Dan Willemsen21986fb2016-07-14 15:23:56 -0700199}
200
201// Target and host library
202cc_library {
203 name: "libcrypto",
Paul Duffincb6fdd22019-06-04 13:24:44 +0100204 visibility: ["//visibility:public"],
Vijay Venkatraman3caad952017-05-16 12:00:57 -0700205 vendor_available: true,
Justin Yun56083292020-11-11 15:43:11 +0900206 product_available: true,
dimitry09dd3be2019-05-09 16:42:01 +0200207 native_bridge_supported: true,
Justin Yun47949c52017-07-24 15:19:43 +0900208 vndk: {
209 enabled: true,
210 },
Jooyung Hanb6b07c32019-01-18 15:31:20 +0900211 double_loadable: true,
Jiyong Parkc3463952018-04-27 21:44:32 +0900212 recovery_available: true,
Paul Duffinf6a61fd2019-06-25 12:06:25 +0100213 defaults: [
214 "libcrypto_sources",
215 "libcrypto_defaults",
216 "boringssl_defaults",
217 "boringssl_flags",
218 ],
Dan Willemsen2b2c24b2016-07-21 11:03:36 -0700219 unique_host_soname: true,
Pete Bentleye6a478a2019-08-19 22:20:24 +0100220 srcs: [
221 ":bcm_object",
222 ],
223 target: {
224 android: {
225 cflags: [
226 "-DBORINGSSL_FIPS",
227 ],
Pete Bentleye0c3f632020-05-06 19:52:29 +0100228 sanitize: {
229 // Disable address sanitizing otherwise libcrypto will not report
230 // itself as being in FIPS mode, which causes boringssl_self_test
231 // to fail.
232 address: false,
233 },
Pete Bentleye6a478a2019-08-19 22:20:24 +0100234 inject_bssl_hash: true,
Colin Cross4b979db2019-09-18 11:20:16 -0700235 static: {
236 // Disable the static version of libcrypto, as it causes
237 // problems for FIPS certification. Use libcrypto_static for
238 // modules that need static libcrypto but do not need FIPS self
239 // testing, or use dynamic libcrypto.
240 enabled: false,
241 },
Pete Bentleye6a478a2019-08-19 22:20:24 +0100242 },
243 },
Joshua Duong26b57e22020-02-10 16:04:44 -0800244 apex_available: [
245 "//apex_available:platform",
246 "com.android.adbd",
Martin Stjernholm98b03622020-10-12 15:10:40 +0100247 "com.android.art",
Jiyong Park0dcd4e82020-03-09 15:23:05 +0900248 "com.android.art.debug",
Jiyong Park0dcd4e82020-03-09 15:23:05 +0900249 "com.android.art.testing",
250 "com.android.bluetooth.updatable",
Alan Stokes53cbde72021-07-06 17:46:00 +0100251 "com.android.compos",
Jiyong Park0dcd4e82020-03-09 15:23:05 +0900252 "com.android.conscrypt",
Jiyong Park0dcd4e82020-03-09 15:23:05 +0900253 "com.android.resolv",
Jiyong Park16f7c572021-01-05 14:41:56 +0900254 "com.android.virt",
Joshua Duong26b57e22020-02-10 16:04:44 -0800255 ],
Jooyung Han856ad1d2020-04-16 18:48:25 +0900256 min_sdk_version: "29",
Dan Willemsen21986fb2016-07-14 15:23:56 -0700257}
258
259// Static library
Colin Cross4b979db2019-09-18 11:20:16 -0700260// This version of libcrypto will not have FIPS self tests enabled, so its
261// usage is protected through visibility to ensure it doesn't end up used
262// somewhere that needs the FIPS version.
Dan Willemsen21986fb2016-07-14 15:23:56 -0700263cc_library_static {
264 name: "libcrypto_static",
Colin Cross4b979db2019-09-18 11:20:16 -0700265 visibility: [
Paul Duffinebdc4062020-01-22 14:29:01 +0000266 "//art/build/sdk",
Colin Cross4b979db2019-09-18 11:20:16 -0700267 "//bootable/recovery/updater",
268 "//external/conscrypt",
269 "//external/python/cpython2",
Luke Huangf695bbb2021-04-23 15:38:04 +0800270 "//external/rust/crates/quiche",
Elliott Hughes77319d02020-05-14 15:51:34 -0700271 // Strictly, only the *static* toybox for legacy devices should have
272 // access to libcrypto_static, but we can't express that.
273 "//external/toybox",
Colin Cross4b979db2019-09-18 11:20:16 -0700274 "//hardware/interfaces/confirmationui/1.0/vts/functional",
275 "//hardware/interfaces/drm/1.0/vts/functional",
276 "//hardware/interfaces/drm/1.2/vts/functional",
Robert Shih6526b5c2020-01-21 11:03:32 -0800277 "//hardware/interfaces/drm/1.3/vts/functional",
Colin Cross4b979db2019-09-18 11:20:16 -0700278 "//hardware/interfaces/keymaster/3.0/vts/functional",
279 "//hardware/interfaces/keymaster/4.0/vts/functional",
Shawn Willden1ff77d02020-01-16 23:52:56 -0700280 "//hardware/interfaces/keymaster/4.1/vts/functional",
Josh Gaoe49f0ff2021-04-14 15:41:00 -0700281 "//packages/modules/adb",
Luke Huang16a30fc2019-11-22 11:44:50 +0800282 "//packages/modules/DnsResolver/tests:__subpackages__",
Baligh Uddinf58f8702020-11-24 05:58:10 +0000283 "//packages/modules/NeuralNetworks:__subpackages__",
Colin Cross4b979db2019-09-18 11:20:16 -0700284 "//system/core/init",
285 "//system/core/fs_mgr/liblp",
286 "//system/core/fs_mgr/liblp/vts_core",
287 "//system/core/fs_mgr/libsnapshot",
288 "//system/libvintf/test",
289 "//system/security/keystore/tests",
290 "//test/vts-testcase/security/avb",
291 ],
Przemyslaw Szczepaniakdab438a2020-02-05 17:33:41 +0000292 apex_available: [
293 "//apex_available:platform",
294 "com.android.neuralnetworks",
Przemyslaw Szczepaniakdab438a2020-02-05 17:33:41 +0000295 ],
Paul Duffinf6a61fd2019-06-25 12:06:25 +0100296 defaults: [
Pete Bentley47637342019-08-19 12:22:49 +0100297 "libcrypto_bcm_sources",
Paul Duffinf6a61fd2019-06-25 12:06:25 +0100298 "libcrypto_sources",
299 "libcrypto_defaults",
300 "boringssl_defaults",
301 "boringssl_flags",
302 ],
Dan Willemsen21986fb2016-07-14 15:23:56 -0700303}
304
Yifan Honga11a41e2021-09-28 17:18:45 -0700305// Common defaults for lib*_fuzz_unsafe. These are unsafe and deterministic
306// libraries for testing and fuzzing only. See src/FUZZING.md.
307cc_defaults {
308 name: "boringssl_fuzz_unsafe_defaults",
309 host_supported: true,
310 cflags: [
311 "-DBORINGSSL_UNSAFE_DETERMINISTIC_MODE",
312 "-DBORINGSSL_UNSAFE_FUZZER_MODE",
313 ],
314 visibility: [
315 "//frameworks/native/libs/binder/tests:__subpackages__",
316 ],
317}
318
319// Unsafe and deterministic version of libcrypto. For testing and fuzzing only.
320// See src/FUZZING.md.
321cc_test_library {
322 name: "libcrypto_fuzz_unsafe",
323 ramdisk_available: false,
324 vendor_ramdisk_available: false,
325 defaults: [
326 "libcrypto_bcm_sources",
327 "libcrypto_sources",
328 "libcrypto_defaults",
329 "boringssl_defaults",
330 "boringssl_flags",
331 "boringssl_fuzz_unsafe_defaults",
332 ],
333}
334
Dan Willemsen21986fb2016-07-14 15:23:56 -0700335//// libssl
336
337// Target static library
Dan Willemsen21986fb2016-07-14 15:23:56 -0700338
339// Static and Shared library
340cc_library {
341 name: "libssl",
Paul Duffincb6fdd22019-06-04 13:24:44 +0100342 visibility: ["//visibility:public"],
Dan Willemsenea55e182018-10-23 13:41:19 -0700343 recovery_available: true,
Justin Yun47949c52017-07-24 15:19:43 +0900344 vendor_available: true,
Justin Yun56083292020-11-11 15:43:11 +0900345 product_available: true,
dimitry09dd3be2019-05-09 16:42:01 +0200346 native_bridge_supported: true,
Justin Yun47949c52017-07-24 15:19:43 +0900347 vndk: {
348 enabled: true,
349 },
Dan Willemsen21986fb2016-07-14 15:23:56 -0700350 host_supported: true,
Paul Duffinf6a61fd2019-06-25 12:06:25 +0100351 defaults: [
352 "libssl_sources",
353 "boringssl_defaults",
354 "boringssl_flags",
355 ],
Joshua Duong81ce7a52019-10-31 12:44:47 -0700356 target: {
357 windows: {
358 enabled: true,
359 },
360 },
Dan Willemsen2b2c24b2016-07-21 11:03:36 -0700361 unique_host_soname: true,
Dan Willemsen21986fb2016-07-14 15:23:56 -0700362
Dan Willemsen2b2c24b2016-07-21 11:03:36 -0700363 shared_libs: ["libcrypto"],
Joshua Duong26b57e22020-02-10 16:04:44 -0800364
365 apex_available: [
366 "//apex_available:platform",
367 "com.android.adbd",
Jiyong Park0dcd4e82020-03-09 15:23:05 +0900368 "com.android.conscrypt",
369 "com.android.resolv",
Joshua Duong26b57e22020-02-10 16:04:44 -0800370 ],
Jooyung Han856ad1d2020-04-16 18:48:25 +0900371 min_sdk_version: "29",
Dan Willemsen21986fb2016-07-14 15:23:56 -0700372}
373
Yifan Honga11a41e2021-09-28 17:18:45 -0700374// Unsafe and deterministic version of libssl. For testing and fuzzing only.
375// See src/FUZZING.md.
376cc_test_library {
377 name: "libssl_fuzz_unsafe",
378 host_supported: true,
379 defaults: [
380 "libssl_sources",
381 "boringssl_defaults",
382 "boringssl_flags",
383 "boringssl_fuzz_unsafe_defaults",
384 ],
385 static_libs: [
386 "libcrypto_fuzz_unsafe",
387 ],
388}
389
Dan Willemsen21986fb2016-07-14 15:23:56 -0700390// Tool
391cc_binary {
392 name: "bssl",
393 host_supported: true,
Paul Duffinf6a61fd2019-06-25 12:06:25 +0100394 defaults: [
395 "bssl_sources",
396 "boringssl_flags",
397 ],
Dan Willemsen21986fb2016-07-14 15:23:56 -0700398
Dan Willemsen2b2c24b2016-07-21 11:03:36 -0700399 shared_libs: [
400 "libcrypto",
401 "libssl",
402 ],
Dan Willemsen21986fb2016-07-14 15:23:56 -0700403 target: {
Dan Willemsen21986fb2016-07-14 15:23:56 -0700404 darwin: {
405 enabled: false,
406 },
Pete Bentleyd7165532020-05-14 12:01:03 +0100407 android: {
408 compile_multilib: "both",
409 },
410 },
411 multilib: {
412 lib32: {
413 suffix: "32",
414 },
Dan Willemsen21986fb2016-07-14 15:23:56 -0700415 },
416}
Dan Willemsen2458a412016-07-15 09:28:31 -0700417
Pete Bentley390f5872020-12-10 11:19:10 +0000418// Used for CAVP testing for FIPS certification.
419// Not installed on devices by default.
Adam Langley7c167932018-02-02 14:44:53 -0800420cc_binary {
421 name: "cavp",
422 host_supported: true,
423 srcs: [
Pete Bentley0c61efe2019-08-13 09:32:23 +0100424 "src/util/fipstools/cavp/cavp_aes_gcm_test.cc",
425 "src/util/fipstools/cavp/cavp_aes_test.cc",
426 "src/util/fipstools/cavp/cavp_ctr_drbg_test.cc",
427 "src/util/fipstools/cavp/cavp_ecdsa2_keypair_test.cc",
428 "src/util/fipstools/cavp/cavp_ecdsa2_pkv_test.cc",
429 "src/util/fipstools/cavp/cavp_ecdsa2_siggen_test.cc",
430 "src/util/fipstools/cavp/cavp_ecdsa2_sigver_test.cc",
431 "src/util/fipstools/cavp/cavp_hmac_test.cc",
432 "src/util/fipstools/cavp/cavp_kas_test.cc",
433 "src/util/fipstools/cavp/cavp_keywrap_test.cc",
434 "src/util/fipstools/cavp/cavp_main.cc",
435 "src/util/fipstools/cavp/cavp_rsa2_keygen_test.cc",
436 "src/util/fipstools/cavp/cavp_rsa2_siggen_test.cc",
437 "src/util/fipstools/cavp/cavp_rsa2_sigver_test.cc",
438 "src/util/fipstools/cavp/cavp_sha_monte_test.cc",
439 "src/util/fipstools/cavp/cavp_sha_test.cc",
440 "src/util/fipstools/cavp/cavp_tdes_test.cc",
441 "src/util/fipstools/cavp/cavp_test_util.cc",
442 "src/util/fipstools/cavp/cavp_tlskdf_test.cc",
Adam Langley7c167932018-02-02 14:44:53 -0800443 ],
Pete Bentleyd7165532020-05-14 12:01:03 +0100444 target: {
445 android: {
446 compile_multilib: "both",
447 },
448 },
449 multilib: {
450 lib32: {
451 suffix: "32",
452 },
453 },
Adam Langley7c167932018-02-02 14:44:53 -0800454
455 shared_libs: [
456 "libcrypto",
457 ],
458
Paul Duffinf6a61fd2019-06-25 12:06:25 +0100459 defaults: [
460 "boringssl_test_support_sources",
461 "boringssl_flags",
462 ],
Adam Langley7c167932018-02-02 14:44:53 -0800463}
464
Pete Bentley390f5872020-12-10 11:19:10 +0000465// Used for ACVP testing for FIPS certification.
466// Not installed on devices by default.
467cc_binary {
468 name: "acvp_modulewrapper",
Pete Bentley390f5872020-12-10 11:19:10 +0000469 srcs: [
Stephen Craned4573992021-02-25 10:52:24 -0800470 "src/util/fipstools/acvp/modulewrapper/main.cc",
Pete Bentley390f5872020-12-10 11:19:10 +0000471 ],
472 target: {
Pete Bentley7f684a42021-07-21 13:52:17 +0100473 android_x86: {
474 enabled: false,
475 },
476 android_x86_64: {
477 enabled: false,
Pete Bentley390f5872020-12-10 11:19:10 +0000478 },
479 },
480 stem: "modulewrapper",
Pete Bentley7f684a42021-07-21 13:52:17 +0100481 compile_multilib: "both",
Pete Bentley390f5872020-12-10 11:19:10 +0000482 multilib: {
483 lib32: {
484 suffix: "32",
485 },
486 },
487
Stephen Craned4573992021-02-25 10:52:24 -0800488 static_libs: [
489 "libacvp_modulewrapper",
490 ],
491 shared_libs: [
492 "libcrypto",
493 ],
494
495 defaults: [
496 "boringssl_flags",
497 ],
498}
499
500// ACVP wrapper implementation shared between Android and Trusty
501cc_library_static {
502 name: "libacvp_modulewrapper",
503 host_supported: true,
504 vendor_available: true,
505 srcs: [
506 "src/util/fipstools/acvp/modulewrapper/modulewrapper.cc",
507 ],
508 target: {
509 android: {
510 compile_multilib: "both",
511 },
512 },
513 export_include_dirs: ["src/util/fipstools/acvp/modulewrapper/"],
Pete Bentley390f5872020-12-10 11:19:10 +0000514 shared_libs: [
515 "libcrypto",
516 ],
517
518 defaults: [
519 "boringssl_flags",
520 ],
Stephen Crane859a48d2021-03-10 18:01:35 -0800521
522 visibility: ["//system/core/trusty/utils/acvp"],
Pete Bentley390f5872020-12-10 11:19:10 +0000523}
524
Dan Willemsen2458a412016-07-15 09:28:31 -0700525// Test support library
526cc_library_static {
527 name: "boringssl_test_support",
528 host_supported: true,
Paul Duffinf6a61fd2019-06-25 12:06:25 +0100529 defaults: [
530 "boringssl_test_support_sources",
531 "boringssl_flags",
532 ],
Dan Willemsen2458a412016-07-15 09:28:31 -0700533
Dan Willemsen2b2c24b2016-07-21 11:03:36 -0700534 shared_libs: [
535 "libcrypto",
536 "libssl",
537 ],
Dan Willemsen2458a412016-07-15 09:28:31 -0700538}
539
540// Tests
541cc_test {
Paul Duffinf6a61fd2019-06-25 12:06:25 +0100542 name: "boringssl_crypto_test",
543 test_suites: ["device-tests"],
544 host_supported: true,
545 defaults: [
546 "boringssl_crypto_test_sources",
547 "boringssl_flags",
548 ],
549 whole_static_libs: ["boringssl_test_support"],
David Benjaminf31229b2017-01-25 14:08:15 -0500550
Paul Duffinf6a61fd2019-06-25 12:06:25 +0100551 shared_libs: ["libcrypto"],
David Benjaminf31229b2017-01-25 14:08:15 -0500552}
553
554cc_test {
Paul Duffinf6a61fd2019-06-25 12:06:25 +0100555 name: "boringssl_ssl_test",
556 test_suites: ["device-tests"],
557 host_supported: true,
558 defaults: [
559 "boringssl_ssl_test_sources",
560 "boringssl_flags",
561 ],
562 whole_static_libs: ["boringssl_test_support"],
David Benjaminf31229b2017-01-25 14:08:15 -0500563
Paul Duffinf6a61fd2019-06-25 12:06:25 +0100564 shared_libs: [
565 "libcrypto",
566 "libssl",
567 ],
David Benjaminf31229b2017-01-25 14:08:15 -0500568}
Adam Langleyb6f75152019-10-18 12:20:11 -0700569
570// Utility binary for CMVP on-site testing.
571cc_binary {
Tobias Thierer6204b542019-10-18 21:55:05 +0100572 name: "test_fips",
573 host_supported: false,
574 defaults: [
575 "boringssl_flags",
576 ],
577 shared_libs: [
578 "libcrypto",
579 ],
580 srcs: [
581 "src/util/fipstools/cavp/test_fips.c",
582 ],
Adam Langleyb6f75152019-10-18 12:20:11 -0700583}