blob: 416bfd85b745abc642233842cd5d6bc3fc01df88 [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",
Chih-Hung Hsieh9146d992017-09-27 10:26:03 -070054 "-Werror",
Dan Willemsen21986fb2016-07-14 15:23:56 -070055 "-Wno-unused-parameter",
56 ],
57
58 cppflags: [
59 "-Wall",
60 "-Werror",
61 ],
62
63 conlyflags: ["-std=c99"],
David Benjaminfc8a7862018-06-25 19:02:46 -040064
65 // Build BoringSSL and its tests against the same STL.
66 sdk_version: "9",
67 target: {
Benjamin Brittain804732f2022-01-28 11:03:38 -050068 linux: {
69 cflags: ["-D_XOPEN_SOURCE=700"],
70 },
71 windows: {
72 cflags: ["-D_XOPEN_SOURCE=700"],
73 },
David Benjaminfc8a7862018-06-25 19:02:46 -040074 android: {
75 stl: "libc++_static",
76 },
77 },
Dan Willemsen21986fb2016-07-14 15:23:56 -070078}
79
80// Used by libcrypto + libssl
81cc_defaults {
82 name: "boringssl_defaults",
83
84 local_include_dirs: ["src/include"],
85 export_include_dirs: ["src/include"],
David Benjaminfc8a7862018-06-25 19:02:46 -040086 cflags: ["-DBORINGSSL_IMPLEMENTATION"],
Dan Willemsen21986fb2016-07-14 15:23:56 -070087}
88
89//// libcrypto
Dan Willemsen21986fb2016-07-14 15:23:56 -070090cc_defaults {
91 name: "libcrypto_defaults",
92 host_supported: true,
Yifan Hongca6b4e82020-10-21 18:11:12 -070093 ramdisk_available: true,
94 vendor_ramdisk_available: true,
Dan Willemsen21986fb2016-07-14 15:23:56 -070095
96 // Windows and Macs both have problems with assembly files
97 target: {
98 windows: {
99 enabled: true,
100 cflags: ["-DOPENSSL_NO_ASM"],
101 host_ldlibs: ["-lws2_32"],
102 },
103 darwin: {
104 cflags: ["-DOPENSSL_NO_ASM"],
105 },
Kenny Root7b550be2016-09-20 15:25:24 -0700106 host: {
Dan Willemsen21986fb2016-07-14 15:23:56 -0700107 host_ldlibs: ["-lpthread"],
108 },
Pete Bentley1e9e5852020-06-30 16:45:33 +0100109 android: {
110 // On FIPS builds (i.e. Android only) prevent other libraries
111 // from pre-empting symbols in libcrypto which could affect FIPS
112 // compliance and cause integrity checks to fail. See b/160231064.
113 ldflags: ["-Wl,-Bsymbolic"],
114 },
Dan Willemsen21986fb2016-07-14 15:23:56 -0700115 },
116
117 local_include_dirs: ["src/crypto"],
Pete Bentleye6a478a2019-08-19 22:20:24 +0100118}
119
120cc_object {
121 name: "bcm_object",
122 device_supported: true,
123 recovery_available: true,
124 native_bridge_supported: true,
125 defaults: [
126 "libcrypto_bcm_sources",
127 "libcrypto_defaults",
128 "boringssl_defaults",
129 "boringssl_flags",
130 ],
Peter Collingbourne22f5f872019-09-27 15:32:38 -0700131 sanitize: {
132 address: false,
Tobias Thierer6204b542019-10-18 21:55:05 +0100133 hwaddress: false,
Mitch Phillipsf5a60782019-12-10 08:47:30 -0800134 fuzzer: false,
Peter Collingbourne22f5f872019-09-27 15:32:38 -0700135 },
Pete Bentleye6a478a2019-08-19 22:20:24 +0100136 target: {
137 android: {
138 cflags: [
139 "-DBORINGSSL_FIPS",
140 "-fPIC",
Pete Bentley1d07cf82019-10-18 12:49:31 +0100141 // -fno[data|text]-sections required to ensure a
142 // single text and data section for FIPS integrity check
143 "-fno-data-sections",
144 "-fno-function-sections",
Pete Bentleye6a478a2019-08-19 22:20:24 +0100145 ],
146 linker_script: "src/crypto/fipsmodule/fips_shared.lds",
147 },
Peter Collingbourne0560ada2019-11-22 13:50:29 -0800148 // Temporary hack to let BoringSSL build with a new compiler.
149 // This doesn't enable HWASAN unconditionally, it just causes
150 // BoringSSL's asm code to unconditionally use a HWASAN-compatible
151 // global variable reference so that the non-HWASANified (because of
152 // sanitize: { hwaddress: false } above) code in the BCM can
153 // successfully link against the HWASANified code in the rest of
154 // BoringSSL in HWASAN builds.
155 android_arm64: {
156 asflags: [
157 "-fsanitize=hwaddress",
158 ],
159 },
Pete Bentleye6a478a2019-08-19 22:20:24 +0100160 },
Jiyong Park0dcd4e82020-03-09 15:23:05 +0900161 apex_available: [
162 "//apex_available:platform",
163 "com.android.adbd",
Martin Stjernholm98b03622020-10-12 15:10:40 +0100164 "com.android.art",
Jiyong Park0dcd4e82020-03-09 15:23:05 +0900165 "com.android.art.debug",
Jiyong Park0dcd4e82020-03-09 15:23:05 +0900166 "com.android.art.testing",
Etienne Ruffieux49791bd2021-12-15 16:21:34 +0000167 "com.android.bluetooth",
Alan Stokes53cbde72021-07-06 17:46:00 +0100168 "com.android.compos",
Jiyong Park0dcd4e82020-03-09 15:23:05 +0900169 "com.android.conscrypt",
Jiyong Park0dcd4e82020-03-09 15:23:05 +0900170 "com.android.resolv",
Jiyong Park16f7c572021-01-05 14:41:56 +0900171 "com.android.virt",
Jiyong Park0dcd4e82020-03-09 15:23:05 +0900172 ],
Jooyung Han856ad1d2020-04-16 18:48:25 +0900173 min_sdk_version: "29",
Pete Bentleye6a478a2019-08-19 22:20:24 +0100174}
175
176bootstrap_go_package {
177 name: "bssl_ar",
178 pkgPath: "boringssl.googlesource.com/boringssl/util/ar",
179 srcs: [
180 "src/util/ar/ar.go",
181 ],
182 testSrcs: [
183 "src/util/ar/ar_test.go",
184 ],
185}
186
187bootstrap_go_package {
188 name: "bssl_fipscommon",
189 pkgPath: "boringssl.googlesource.com/boringssl/util/fipstools/fipscommon",
190 srcs: [
191 "src/util/fipstools/fipscommon/const.go",
192 ],
193}
194
195blueprint_go_binary {
196 name: "bssl_inject_hash",
197 srcs: [
198 "src/util/fipstools/inject_hash/inject_hash.go",
199 ],
200 deps: [
201 "bssl_ar",
202 "bssl_fipscommon",
203 ],
Dan Willemsen21986fb2016-07-14 15:23:56 -0700204}
205
206// Target and host library
207cc_library {
208 name: "libcrypto",
Paul Duffincb6fdd22019-06-04 13:24:44 +0100209 visibility: ["//visibility:public"],
Vijay Venkatraman3caad952017-05-16 12:00:57 -0700210 vendor_available: true,
Justin Yun56083292020-11-11 15:43:11 +0900211 product_available: true,
dimitry09dd3be2019-05-09 16:42:01 +0200212 native_bridge_supported: true,
Justin Yun47949c52017-07-24 15:19:43 +0900213 vndk: {
214 enabled: true,
215 },
Jooyung Hanb6b07c32019-01-18 15:31:20 +0900216 double_loadable: true,
Jiyong Parkc3463952018-04-27 21:44:32 +0900217 recovery_available: true,
Paul Duffinf6a61fd2019-06-25 12:06:25 +0100218 defaults: [
219 "libcrypto_sources",
220 "libcrypto_defaults",
221 "boringssl_defaults",
222 "boringssl_flags",
223 ],
Dan Willemsen2b2c24b2016-07-21 11:03:36 -0700224 unique_host_soname: true,
Pete Bentleye6a478a2019-08-19 22:20:24 +0100225 srcs: [
226 ":bcm_object",
227 ],
228 target: {
229 android: {
230 cflags: [
231 "-DBORINGSSL_FIPS",
232 ],
Pete Bentleye0c3f632020-05-06 19:52:29 +0100233 sanitize: {
234 // Disable address sanitizing otherwise libcrypto will not report
235 // itself as being in FIPS mode, which causes boringssl_self_test
236 // to fail.
237 address: false,
238 },
Pete Bentleye6a478a2019-08-19 22:20:24 +0100239 inject_bssl_hash: true,
Colin Cross4b979db2019-09-18 11:20:16 -0700240 static: {
241 // Disable the static version of libcrypto, as it causes
242 // problems for FIPS certification. Use libcrypto_static for
243 // modules that need static libcrypto but do not need FIPS self
244 // testing, or use dynamic libcrypto.
245 enabled: false,
246 },
Pete Bentleye6a478a2019-08-19 22:20:24 +0100247 },
248 },
Joshua Duong26b57e22020-02-10 16:04:44 -0800249 apex_available: [
250 "//apex_available:platform",
251 "com.android.adbd",
Martin Stjernholm98b03622020-10-12 15:10:40 +0100252 "com.android.art",
Jiyong Park0dcd4e82020-03-09 15:23:05 +0900253 "com.android.art.debug",
Jiyong Park0dcd4e82020-03-09 15:23:05 +0900254 "com.android.art.testing",
Etienne Ruffieux49791bd2021-12-15 16:21:34 +0000255 "com.android.bluetooth",
Alan Stokes53cbde72021-07-06 17:46:00 +0100256 "com.android.compos",
Jiyong Park0dcd4e82020-03-09 15:23:05 +0900257 "com.android.conscrypt",
Jiyong Park0dcd4e82020-03-09 15:23:05 +0900258 "com.android.resolv",
Jiyong Park16f7c572021-01-05 14:41:56 +0900259 "com.android.virt",
Joshua Duong26b57e22020-02-10 16:04:44 -0800260 ],
Jooyung Han856ad1d2020-04-16 18:48:25 +0900261 min_sdk_version: "29",
Dan Willemsen21986fb2016-07-14 15:23:56 -0700262}
263
264// Static library
Colin Cross4b979db2019-09-18 11:20:16 -0700265// This version of libcrypto will not have FIPS self tests enabled, so its
266// usage is protected through visibility to ensure it doesn't end up used
267// somewhere that needs the FIPS version.
Dan Willemsen21986fb2016-07-14 15:23:56 -0700268cc_library_static {
269 name: "libcrypto_static",
Colin Cross4b979db2019-09-18 11:20:16 -0700270 visibility: [
Paul Duffinebdc4062020-01-22 14:29:01 +0000271 "//art/build/sdk",
Colin Cross4b979db2019-09-18 11:20:16 -0700272 "//bootable/recovery/updater",
273 "//external/conscrypt",
274 "//external/python/cpython2",
Luke Huangf695bbb2021-04-23 15:38:04 +0800275 "//external/rust/crates/quiche",
Elliott Hughes77319d02020-05-14 15:51:34 -0700276 // Strictly, only the *static* toybox for legacy devices should have
277 // access to libcrypto_static, but we can't express that.
278 "//external/toybox",
Colin Cross4b979db2019-09-18 11:20:16 -0700279 "//hardware/interfaces/confirmationui/1.0/vts/functional",
280 "//hardware/interfaces/drm/1.0/vts/functional",
281 "//hardware/interfaces/drm/1.2/vts/functional",
Robert Shih6526b5c2020-01-21 11:03:32 -0800282 "//hardware/interfaces/drm/1.3/vts/functional",
Colin Cross4b979db2019-09-18 11:20:16 -0700283 "//hardware/interfaces/keymaster/3.0/vts/functional",
284 "//hardware/interfaces/keymaster/4.0/vts/functional",
Shawn Willden1ff77d02020-01-16 23:52:56 -0700285 "//hardware/interfaces/keymaster/4.1/vts/functional",
Josh Gaoe49f0ff2021-04-14 15:41:00 -0700286 "//packages/modules/adb",
Luke Huang16a30fc2019-11-22 11:44:50 +0800287 "//packages/modules/DnsResolver/tests:__subpackages__",
Baligh Uddinf58f8702020-11-24 05:58:10 +0000288 "//packages/modules/NeuralNetworks:__subpackages__",
Colin Cross4b979db2019-09-18 11:20:16 -0700289 "//system/core/init",
290 "//system/core/fs_mgr/liblp",
291 "//system/core/fs_mgr/liblp/vts_core",
292 "//system/core/fs_mgr/libsnapshot",
293 "//system/libvintf/test",
294 "//system/security/keystore/tests",
295 "//test/vts-testcase/security/avb",
296 ],
Przemyslaw Szczepaniakdab438a2020-02-05 17:33:41 +0000297 apex_available: [
298 "//apex_available:platform",
299 "com.android.neuralnetworks",
Przemyslaw Szczepaniakdab438a2020-02-05 17:33:41 +0000300 ],
Paul Duffinf6a61fd2019-06-25 12:06:25 +0100301 defaults: [
Pete Bentley47637342019-08-19 12:22:49 +0100302 "libcrypto_bcm_sources",
Paul Duffinf6a61fd2019-06-25 12:06:25 +0100303 "libcrypto_sources",
304 "libcrypto_defaults",
305 "boringssl_defaults",
306 "boringssl_flags",
307 ],
Dan Willemsen21986fb2016-07-14 15:23:56 -0700308}
309
Yifan Honga11a41e2021-09-28 17:18:45 -0700310// Common defaults for lib*_fuzz_unsafe. These are unsafe and deterministic
311// libraries for testing and fuzzing only. See src/FUZZING.md.
312cc_defaults {
313 name: "boringssl_fuzz_unsafe_defaults",
314 host_supported: true,
315 cflags: [
316 "-DBORINGSSL_UNSAFE_DETERMINISTIC_MODE",
317 "-DBORINGSSL_UNSAFE_FUZZER_MODE",
318 ],
319 visibility: [
320 "//frameworks/native/libs/binder/tests:__subpackages__",
321 ],
322}
323
324// Unsafe and deterministic version of libcrypto. For testing and fuzzing only.
325// See src/FUZZING.md.
326cc_test_library {
327 name: "libcrypto_fuzz_unsafe",
328 ramdisk_available: false,
329 vendor_ramdisk_available: false,
330 defaults: [
331 "libcrypto_bcm_sources",
332 "libcrypto_sources",
333 "libcrypto_defaults",
334 "boringssl_defaults",
335 "boringssl_flags",
336 "boringssl_fuzz_unsafe_defaults",
337 ],
338}
339
Dan Willemsen21986fb2016-07-14 15:23:56 -0700340//// libssl
341
342// Target static library
Dan Willemsen21986fb2016-07-14 15:23:56 -0700343
344// Static and Shared library
345cc_library {
346 name: "libssl",
Paul Duffincb6fdd22019-06-04 13:24:44 +0100347 visibility: ["//visibility:public"],
Dan Willemsenea55e182018-10-23 13:41:19 -0700348 recovery_available: true,
Justin Yun47949c52017-07-24 15:19:43 +0900349 vendor_available: true,
Justin Yun56083292020-11-11 15:43:11 +0900350 product_available: true,
dimitry09dd3be2019-05-09 16:42:01 +0200351 native_bridge_supported: true,
Justin Yun47949c52017-07-24 15:19:43 +0900352 vndk: {
353 enabled: true,
354 },
Dan Willemsen21986fb2016-07-14 15:23:56 -0700355 host_supported: true,
Paul Duffinf6a61fd2019-06-25 12:06:25 +0100356 defaults: [
357 "libssl_sources",
358 "boringssl_defaults",
359 "boringssl_flags",
360 ],
Joshua Duong81ce7a52019-10-31 12:44:47 -0700361 target: {
362 windows: {
363 enabled: true,
364 },
365 },
Dan Willemsen2b2c24b2016-07-21 11:03:36 -0700366 unique_host_soname: true,
Dan Willemsen21986fb2016-07-14 15:23:56 -0700367
Dan Willemsen2b2c24b2016-07-21 11:03:36 -0700368 shared_libs: ["libcrypto"],
Joshua Duong26b57e22020-02-10 16:04:44 -0800369
370 apex_available: [
371 "//apex_available:platform",
Roopa Sattiraju517dcb02021-12-22 14:04:18 -0800372 "com.android.bluetooth",
Joshua Duong26b57e22020-02-10 16:04:44 -0800373 "com.android.adbd",
Jiyong Park0dcd4e82020-03-09 15:23:05 +0900374 "com.android.conscrypt",
375 "com.android.resolv",
Joshua Duong26b57e22020-02-10 16:04:44 -0800376 ],
Jooyung Han856ad1d2020-04-16 18:48:25 +0900377 min_sdk_version: "29",
Dan Willemsen21986fb2016-07-14 15:23:56 -0700378}
379
Yifan Honga11a41e2021-09-28 17:18:45 -0700380// Unsafe and deterministic version of libssl. For testing and fuzzing only.
381// See src/FUZZING.md.
382cc_test_library {
383 name: "libssl_fuzz_unsafe",
384 host_supported: true,
385 defaults: [
386 "libssl_sources",
387 "boringssl_defaults",
388 "boringssl_flags",
389 "boringssl_fuzz_unsafe_defaults",
390 ],
391 static_libs: [
392 "libcrypto_fuzz_unsafe",
393 ],
394}
395
Dan Willemsen21986fb2016-07-14 15:23:56 -0700396// Tool
397cc_binary {
398 name: "bssl",
399 host_supported: true,
Paul Duffinf6a61fd2019-06-25 12:06:25 +0100400 defaults: [
401 "bssl_sources",
402 "boringssl_flags",
403 ],
Dan Willemsen21986fb2016-07-14 15:23:56 -0700404
Dan Willemsen2b2c24b2016-07-21 11:03:36 -0700405 shared_libs: [
406 "libcrypto",
407 "libssl",
408 ],
Dan Willemsen21986fb2016-07-14 15:23:56 -0700409 target: {
Dan Willemsen21986fb2016-07-14 15:23:56 -0700410 darwin: {
411 enabled: false,
412 },
Pete Bentleyd7165532020-05-14 12:01:03 +0100413 android: {
414 compile_multilib: "both",
415 },
416 },
417 multilib: {
418 lib32: {
419 suffix: "32",
420 },
Dan Willemsen21986fb2016-07-14 15:23:56 -0700421 },
422}
Dan Willemsen2458a412016-07-15 09:28:31 -0700423
Pete Bentley390f5872020-12-10 11:19:10 +0000424// Used for CAVP testing for FIPS certification.
425// Not installed on devices by default.
Adam Langley7c167932018-02-02 14:44:53 -0800426cc_binary {
427 name: "cavp",
428 host_supported: true,
429 srcs: [
Pete Bentley0c61efe2019-08-13 09:32:23 +0100430 "src/util/fipstools/cavp/cavp_aes_gcm_test.cc",
431 "src/util/fipstools/cavp/cavp_aes_test.cc",
432 "src/util/fipstools/cavp/cavp_ctr_drbg_test.cc",
433 "src/util/fipstools/cavp/cavp_ecdsa2_keypair_test.cc",
434 "src/util/fipstools/cavp/cavp_ecdsa2_pkv_test.cc",
435 "src/util/fipstools/cavp/cavp_ecdsa2_siggen_test.cc",
436 "src/util/fipstools/cavp/cavp_ecdsa2_sigver_test.cc",
437 "src/util/fipstools/cavp/cavp_hmac_test.cc",
438 "src/util/fipstools/cavp/cavp_kas_test.cc",
439 "src/util/fipstools/cavp/cavp_keywrap_test.cc",
440 "src/util/fipstools/cavp/cavp_main.cc",
441 "src/util/fipstools/cavp/cavp_rsa2_keygen_test.cc",
442 "src/util/fipstools/cavp/cavp_rsa2_siggen_test.cc",
443 "src/util/fipstools/cavp/cavp_rsa2_sigver_test.cc",
444 "src/util/fipstools/cavp/cavp_sha_monte_test.cc",
445 "src/util/fipstools/cavp/cavp_sha_test.cc",
446 "src/util/fipstools/cavp/cavp_tdes_test.cc",
447 "src/util/fipstools/cavp/cavp_test_util.cc",
448 "src/util/fipstools/cavp/cavp_tlskdf_test.cc",
Adam Langley7c167932018-02-02 14:44:53 -0800449 ],
Pete Bentleyd7165532020-05-14 12:01:03 +0100450 target: {
451 android: {
452 compile_multilib: "both",
453 },
454 },
455 multilib: {
456 lib32: {
457 suffix: "32",
458 },
459 },
Adam Langley7c167932018-02-02 14:44:53 -0800460
461 shared_libs: [
462 "libcrypto",
463 ],
464
Paul Duffinf6a61fd2019-06-25 12:06:25 +0100465 defaults: [
466 "boringssl_test_support_sources",
467 "boringssl_flags",
468 ],
Adam Langley7c167932018-02-02 14:44:53 -0800469}
470
Pete Bentley390f5872020-12-10 11:19:10 +0000471// Used for ACVP testing for FIPS certification.
472// Not installed on devices by default.
473cc_binary {
474 name: "acvp_modulewrapper",
Pete Bentley390f5872020-12-10 11:19:10 +0000475 srcs: [
Stephen Craned4573992021-02-25 10:52:24 -0800476 "src/util/fipstools/acvp/modulewrapper/main.cc",
Pete Bentley390f5872020-12-10 11:19:10 +0000477 ],
478 target: {
Pete Bentley7f684a42021-07-21 13:52:17 +0100479 android_x86: {
480 enabled: false,
481 },
482 android_x86_64: {
483 enabled: false,
Pete Bentley390f5872020-12-10 11:19:10 +0000484 },
485 },
486 stem: "modulewrapper",
Pete Bentley7f684a42021-07-21 13:52:17 +0100487 compile_multilib: "both",
Pete Bentley390f5872020-12-10 11:19:10 +0000488 multilib: {
489 lib32: {
490 suffix: "32",
491 },
492 },
493
Stephen Craned4573992021-02-25 10:52:24 -0800494 static_libs: [
495 "libacvp_modulewrapper",
496 ],
497 shared_libs: [
498 "libcrypto",
499 ],
500
501 defaults: [
502 "boringssl_flags",
503 ],
504}
505
506// ACVP wrapper implementation shared between Android and Trusty
507cc_library_static {
508 name: "libacvp_modulewrapper",
509 host_supported: true,
510 vendor_available: true,
511 srcs: [
512 "src/util/fipstools/acvp/modulewrapper/modulewrapper.cc",
513 ],
514 target: {
515 android: {
516 compile_multilib: "both",
517 },
518 },
519 export_include_dirs: ["src/util/fipstools/acvp/modulewrapper/"],
Pete Bentley390f5872020-12-10 11:19:10 +0000520 shared_libs: [
521 "libcrypto",
522 ],
523
524 defaults: [
525 "boringssl_flags",
526 ],
Stephen Crane859a48d2021-03-10 18:01:35 -0800527
528 visibility: ["//system/core/trusty/utils/acvp"],
Pete Bentley390f5872020-12-10 11:19:10 +0000529}
530
Dan Willemsen2458a412016-07-15 09:28:31 -0700531// Test support library
532cc_library_static {
533 name: "boringssl_test_support",
534 host_supported: true,
Paul Duffinf6a61fd2019-06-25 12:06:25 +0100535 defaults: [
536 "boringssl_test_support_sources",
537 "boringssl_flags",
538 ],
Dan Willemsen2458a412016-07-15 09:28:31 -0700539
Dan Willemsen2b2c24b2016-07-21 11:03:36 -0700540 shared_libs: [
541 "libcrypto",
542 "libssl",
543 ],
Dan Willemsen2458a412016-07-15 09:28:31 -0700544}
545
546// Tests
547cc_test {
Paul Duffinf6a61fd2019-06-25 12:06:25 +0100548 name: "boringssl_crypto_test",
549 test_suites: ["device-tests"],
550 host_supported: true,
551 defaults: [
552 "boringssl_crypto_test_sources",
553 "boringssl_flags",
554 ],
555 whole_static_libs: ["boringssl_test_support"],
David Benjaminf31229b2017-01-25 14:08:15 -0500556
Paul Duffinf6a61fd2019-06-25 12:06:25 +0100557 shared_libs: ["libcrypto"],
David Benjaminf31229b2017-01-25 14:08:15 -0500558}
559
560cc_test {
Paul Duffinf6a61fd2019-06-25 12:06:25 +0100561 name: "boringssl_ssl_test",
562 test_suites: ["device-tests"],
563 host_supported: true,
564 defaults: [
565 "boringssl_ssl_test_sources",
566 "boringssl_flags",
567 ],
568 whole_static_libs: ["boringssl_test_support"],
David Benjaminf31229b2017-01-25 14:08:15 -0500569
Paul Duffinf6a61fd2019-06-25 12:06:25 +0100570 shared_libs: [
571 "libcrypto",
572 "libssl",
573 ],
David Benjaminf31229b2017-01-25 14:08:15 -0500574}
Adam Langleyb6f75152019-10-18 12:20:11 -0700575
576// Utility binary for CMVP on-site testing.
577cc_binary {
Tobias Thierer6204b542019-10-18 21:55:05 +0100578 name: "test_fips",
579 host_supported: false,
580 defaults: [
581 "boringssl_flags",
582 ],
583 shared_libs: [
584 "libcrypto",
585 ],
586 srcs: [
587 "src/util/fipstools/cavp/test_fips.c",
588 ],
Adam Langleyb6f75152019-10-18 12:20:11 -0700589}