Dan Willemsen | 21986fb | 2016-07-14 15:23:56 -0700 | [diff] [blame] | 1 | // 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 Duffin | cb6fdd2 | 2019-06-04 13:24:44 +0100 | [diff] [blame] | 5 | package { |
| 6 | default_visibility: ["//visibility:private"], |
| 7 | } |
| 8 | |
Dan Willemsen | 21986fb | 2016-07-14 15:23:56 -0700 | [diff] [blame] | 9 | // Pull in the autogenerated sources modules |
| 10 | build = ["sources.bp"] |
| 11 | |
| 12 | // Used by libcrypto, libssl, bssl tool, and native tests |
| 13 | cc_defaults { |
| 14 | name: "boringssl_flags", |
Steven Moreland | f593be8 | 2017-04-14 04:51:23 -0700 | [diff] [blame] | 15 | vendor_available: true, |
Dan Willemsen | 21986fb | 2016-07-14 15:23:56 -0700 | [diff] [blame] | 16 | |
| 17 | cflags: [ |
| 18 | "-fvisibility=hidden", |
| 19 | "-DBORINGSSL_SHARED_LIBRARY", |
David Benjamin | fc8a786 | 2018-06-25 19:02:46 -0400 | [diff] [blame] | 20 | "-DBORINGSSL_ANDROID_SYSTEM", |
Dan Willemsen | 21986fb | 2016-07-14 15:23:56 -0700 | [diff] [blame] | 21 | "-DOPENSSL_SMALL", |
| 22 | "-D_XOPEN_SOURCE=700", |
Chih-Hung Hsieh | 9146d99 | 2017-09-27 10:26:03 -0700 | [diff] [blame] | 23 | "-Werror", |
Dan Willemsen | 21986fb | 2016-07-14 15:23:56 -0700 | [diff] [blame] | 24 | "-Wno-unused-parameter", |
| 25 | ], |
| 26 | |
| 27 | cppflags: [ |
| 28 | "-Wall", |
| 29 | "-Werror", |
| 30 | ], |
| 31 | |
| 32 | conlyflags: ["-std=c99"], |
David Benjamin | fc8a786 | 2018-06-25 19:02:46 -0400 | [diff] [blame] | 33 | |
| 34 | // Build BoringSSL and its tests against the same STL. |
| 35 | sdk_version: "9", |
| 36 | target: { |
| 37 | android: { |
| 38 | stl: "libc++_static", |
| 39 | }, |
| 40 | }, |
Dan Willemsen | 21986fb | 2016-07-14 15:23:56 -0700 | [diff] [blame] | 41 | } |
| 42 | |
| 43 | // Used by libcrypto + libssl |
| 44 | cc_defaults { |
| 45 | name: "boringssl_defaults", |
| 46 | |
| 47 | local_include_dirs: ["src/include"], |
| 48 | export_include_dirs: ["src/include"], |
David Benjamin | fc8a786 | 2018-06-25 19:02:46 -0400 | [diff] [blame] | 49 | cflags: ["-DBORINGSSL_IMPLEMENTATION"], |
Dan Willemsen | 21986fb | 2016-07-14 15:23:56 -0700 | [diff] [blame] | 50 | } |
| 51 | |
| 52 | //// libcrypto |
Dan Willemsen | 21986fb | 2016-07-14 15:23:56 -0700 | [diff] [blame] | 53 | cc_defaults { |
| 54 | name: "libcrypto_defaults", |
| 55 | host_supported: true, |
| 56 | |
| 57 | // Windows and Macs both have problems with assembly files |
| 58 | target: { |
| 59 | windows: { |
| 60 | enabled: true, |
| 61 | cflags: ["-DOPENSSL_NO_ASM"], |
| 62 | host_ldlibs: ["-lws2_32"], |
| 63 | }, |
| 64 | darwin: { |
| 65 | cflags: ["-DOPENSSL_NO_ASM"], |
| 66 | }, |
Kenny Root | 7b550be | 2016-09-20 15:25:24 -0700 | [diff] [blame] | 67 | host: { |
Dan Willemsen | 21986fb | 2016-07-14 15:23:56 -0700 | [diff] [blame] | 68 | host_ldlibs: ["-lpthread"], |
| 69 | }, |
Pete Bentley | 1e9e585 | 2020-06-30 16:45:33 +0100 | [diff] [blame] | 70 | android: { |
| 71 | // On FIPS builds (i.e. Android only) prevent other libraries |
| 72 | // from pre-empting symbols in libcrypto which could affect FIPS |
| 73 | // compliance and cause integrity checks to fail. See b/160231064. |
| 74 | ldflags: ["-Wl,-Bsymbolic"], |
| 75 | }, |
Dan Willemsen | 21986fb | 2016-07-14 15:23:56 -0700 | [diff] [blame] | 76 | }, |
| 77 | |
| 78 | local_include_dirs: ["src/crypto"], |
Pete Bentley | e6a478a | 2019-08-19 22:20:24 +0100 | [diff] [blame] | 79 | } |
| 80 | |
| 81 | cc_object { |
| 82 | name: "bcm_object", |
| 83 | device_supported: true, |
| 84 | recovery_available: true, |
| 85 | native_bridge_supported: true, |
| 86 | defaults: [ |
| 87 | "libcrypto_bcm_sources", |
| 88 | "libcrypto_defaults", |
| 89 | "boringssl_defaults", |
| 90 | "boringssl_flags", |
| 91 | ], |
Peter Collingbourne | 22f5f87 | 2019-09-27 15:32:38 -0700 | [diff] [blame] | 92 | sanitize: { |
| 93 | address: false, |
Tobias Thierer | 6204b54 | 2019-10-18 21:55:05 +0100 | [diff] [blame] | 94 | hwaddress: false, |
Mitch Phillips | f5a6078 | 2019-12-10 08:47:30 -0800 | [diff] [blame] | 95 | fuzzer: false, |
Peter Collingbourne | 22f5f87 | 2019-09-27 15:32:38 -0700 | [diff] [blame] | 96 | }, |
Pete Bentley | e6a478a | 2019-08-19 22:20:24 +0100 | [diff] [blame] | 97 | target: { |
Martin Stjernholm | ba9db87 | 2020-07-16 03:52:16 +0100 | [diff] [blame] | 98 | linux_bionic: { |
Martin Stjernholm | d688890 | 2020-04-08 01:02:41 +0100 | [diff] [blame] | 99 | header_libs: ["libc_headers"], // TODO(b/153662223): Clean this up. |
| 100 | }, |
Pete Bentley | e6a478a | 2019-08-19 22:20:24 +0100 | [diff] [blame] | 101 | android: { |
Martin Stjernholm | d688890 | 2020-04-08 01:02:41 +0100 | [diff] [blame] | 102 | header_libs: ["libc_headers"], // TODO(b/153662223): Clean this up. |
Pete Bentley | e6a478a | 2019-08-19 22:20:24 +0100 | [diff] [blame] | 103 | cflags: [ |
| 104 | "-DBORINGSSL_FIPS", |
| 105 | "-fPIC", |
Pete Bentley | 1d07cf8 | 2019-10-18 12:49:31 +0100 | [diff] [blame] | 106 | // -fno[data|text]-sections required to ensure a |
| 107 | // single text and data section for FIPS integrity check |
| 108 | "-fno-data-sections", |
| 109 | "-fno-function-sections", |
Pete Bentley | e6a478a | 2019-08-19 22:20:24 +0100 | [diff] [blame] | 110 | ], |
| 111 | linker_script: "src/crypto/fipsmodule/fips_shared.lds", |
| 112 | }, |
Peter Collingbourne | 0560ada | 2019-11-22 13:50:29 -0800 | [diff] [blame] | 113 | // Temporary hack to let BoringSSL build with a new compiler. |
| 114 | // This doesn't enable HWASAN unconditionally, it just causes |
| 115 | // BoringSSL's asm code to unconditionally use a HWASAN-compatible |
| 116 | // global variable reference so that the non-HWASANified (because of |
| 117 | // sanitize: { hwaddress: false } above) code in the BCM can |
| 118 | // successfully link against the HWASANified code in the rest of |
| 119 | // BoringSSL in HWASAN builds. |
| 120 | android_arm64: { |
| 121 | asflags: [ |
| 122 | "-fsanitize=hwaddress", |
| 123 | ], |
| 124 | }, |
Pete Bentley | e6a478a | 2019-08-19 22:20:24 +0100 | [diff] [blame] | 125 | }, |
Jiyong Park | 0dcd4e8 | 2020-03-09 15:23:05 +0900 | [diff] [blame] | 126 | apex_available: [ |
| 127 | "//apex_available:platform", |
| 128 | "com.android.adbd", |
| 129 | "com.android.art.debug", |
| 130 | "com.android.art.release", |
| 131 | "com.android.art.testing", |
| 132 | "com.android.bluetooth.updatable", |
| 133 | "com.android.conscrypt", |
| 134 | "com.android.media", |
| 135 | "com.android.resolv", |
| 136 | ], |
Jooyung Han | 856ad1d | 2020-04-16 18:48:25 +0900 | [diff] [blame] | 137 | min_sdk_version: "29", |
Pete Bentley | e6a478a | 2019-08-19 22:20:24 +0100 | [diff] [blame] | 138 | } |
| 139 | |
| 140 | bootstrap_go_package { |
| 141 | name: "bssl_ar", |
| 142 | pkgPath: "boringssl.googlesource.com/boringssl/util/ar", |
| 143 | srcs: [ |
| 144 | "src/util/ar/ar.go", |
| 145 | ], |
| 146 | testSrcs: [ |
| 147 | "src/util/ar/ar_test.go", |
| 148 | ], |
| 149 | } |
| 150 | |
| 151 | bootstrap_go_package { |
| 152 | name: "bssl_fipscommon", |
| 153 | pkgPath: "boringssl.googlesource.com/boringssl/util/fipstools/fipscommon", |
| 154 | srcs: [ |
| 155 | "src/util/fipstools/fipscommon/const.go", |
| 156 | ], |
| 157 | } |
| 158 | |
| 159 | blueprint_go_binary { |
| 160 | name: "bssl_inject_hash", |
| 161 | srcs: [ |
| 162 | "src/util/fipstools/inject_hash/inject_hash.go", |
| 163 | ], |
| 164 | deps: [ |
| 165 | "bssl_ar", |
| 166 | "bssl_fipscommon", |
| 167 | ], |
Dan Willemsen | 21986fb | 2016-07-14 15:23:56 -0700 | [diff] [blame] | 168 | } |
| 169 | |
| 170 | // Target and host library |
| 171 | cc_library { |
| 172 | name: "libcrypto", |
Paul Duffin | cb6fdd2 | 2019-06-04 13:24:44 +0100 | [diff] [blame] | 173 | visibility: ["//visibility:public"], |
Vijay Venkatraman | 3caad95 | 2017-05-16 12:00:57 -0700 | [diff] [blame] | 174 | vendor_available: true, |
dimitry | 09dd3be | 2019-05-09 16:42:01 +0200 | [diff] [blame] | 175 | native_bridge_supported: true, |
Justin Yun | 47949c5 | 2017-07-24 15:19:43 +0900 | [diff] [blame] | 176 | vndk: { |
| 177 | enabled: true, |
| 178 | }, |
Jooyung Han | b6b07c3 | 2019-01-18 15:31:20 +0900 | [diff] [blame] | 179 | double_loadable: true, |
Jiyong Park | c346395 | 2018-04-27 21:44:32 +0900 | [diff] [blame] | 180 | recovery_available: true, |
Paul Duffin | f6a61fd | 2019-06-25 12:06:25 +0100 | [diff] [blame] | 181 | defaults: [ |
| 182 | "libcrypto_sources", |
| 183 | "libcrypto_defaults", |
| 184 | "boringssl_defaults", |
| 185 | "boringssl_flags", |
| 186 | ], |
Dan Willemsen | 2b2c24b | 2016-07-21 11:03:36 -0700 | [diff] [blame] | 187 | unique_host_soname: true, |
Pete Bentley | e6a478a | 2019-08-19 22:20:24 +0100 | [diff] [blame] | 188 | srcs: [ |
| 189 | ":bcm_object", |
| 190 | ], |
| 191 | target: { |
| 192 | android: { |
| 193 | cflags: [ |
| 194 | "-DBORINGSSL_FIPS", |
| 195 | ], |
Pete Bentley | e0c3f63 | 2020-05-06 19:52:29 +0100 | [diff] [blame] | 196 | sanitize: { |
| 197 | // Disable address sanitizing otherwise libcrypto will not report |
| 198 | // itself as being in FIPS mode, which causes boringssl_self_test |
| 199 | // to fail. |
| 200 | address: false, |
| 201 | }, |
Pete Bentley | e6a478a | 2019-08-19 22:20:24 +0100 | [diff] [blame] | 202 | inject_bssl_hash: true, |
Colin Cross | 4b979db | 2019-09-18 11:20:16 -0700 | [diff] [blame] | 203 | static: { |
| 204 | // Disable the static version of libcrypto, as it causes |
| 205 | // problems for FIPS certification. Use libcrypto_static for |
| 206 | // modules that need static libcrypto but do not need FIPS self |
| 207 | // testing, or use dynamic libcrypto. |
| 208 | enabled: false, |
| 209 | }, |
Pete Bentley | e6a478a | 2019-08-19 22:20:24 +0100 | [diff] [blame] | 210 | }, |
| 211 | }, |
Joshua Duong | 26b57e2 | 2020-02-10 16:04:44 -0800 | [diff] [blame] | 212 | apex_available: [ |
| 213 | "//apex_available:platform", |
| 214 | "com.android.adbd", |
Jiyong Park | 0dcd4e8 | 2020-03-09 15:23:05 +0900 | [diff] [blame] | 215 | "com.android.art.debug", |
| 216 | "com.android.art.release", |
| 217 | "com.android.art.testing", |
| 218 | "com.android.bluetooth.updatable", |
| 219 | "com.android.conscrypt", |
| 220 | "com.android.media", |
| 221 | "com.android.resolv", |
Joshua Duong | 26b57e2 | 2020-02-10 16:04:44 -0800 | [diff] [blame] | 222 | ], |
Jooyung Han | 856ad1d | 2020-04-16 18:48:25 +0900 | [diff] [blame] | 223 | min_sdk_version: "29", |
Dan Willemsen | 21986fb | 2016-07-14 15:23:56 -0700 | [diff] [blame] | 224 | } |
| 225 | |
| 226 | // Static library |
Colin Cross | 4b979db | 2019-09-18 11:20:16 -0700 | [diff] [blame] | 227 | // This version of libcrypto will not have FIPS self tests enabled, so its |
| 228 | // usage is protected through visibility to ensure it doesn't end up used |
| 229 | // somewhere that needs the FIPS version. |
Dan Willemsen | 21986fb | 2016-07-14 15:23:56 -0700 | [diff] [blame] | 230 | cc_library_static { |
| 231 | name: "libcrypto_static", |
Colin Cross | 4b979db | 2019-09-18 11:20:16 -0700 | [diff] [blame] | 232 | visibility: [ |
Paul Duffin | ebdc406 | 2020-01-22 14:29:01 +0000 | [diff] [blame] | 233 | "//art/build/sdk", |
Colin Cross | 4b979db | 2019-09-18 11:20:16 -0700 | [diff] [blame] | 234 | "//bootable/recovery/updater", |
| 235 | "//external/conscrypt", |
| 236 | "//external/python/cpython2", |
Elliott Hughes | 77319d0 | 2020-05-14 15:51:34 -0700 | [diff] [blame] | 237 | // Strictly, only the *static* toybox for legacy devices should have |
| 238 | // access to libcrypto_static, but we can't express that. |
| 239 | "//external/toybox", |
Przemyslaw Szczepaniak | 243d9d5 | 2020-02-03 13:38:45 +0000 | [diff] [blame] | 240 | "//frameworks/ml/nn:__subpackages__", |
Colin Cross | 4b979db | 2019-09-18 11:20:16 -0700 | [diff] [blame] | 241 | "//hardware/interfaces/confirmationui/1.0/vts/functional", |
| 242 | "//hardware/interfaces/drm/1.0/vts/functional", |
| 243 | "//hardware/interfaces/drm/1.2/vts/functional", |
Robert Shih | 6526b5c | 2020-01-21 11:03:32 -0800 | [diff] [blame] | 244 | "//hardware/interfaces/drm/1.3/vts/functional", |
Colin Cross | 4b979db | 2019-09-18 11:20:16 -0700 | [diff] [blame] | 245 | "//hardware/interfaces/keymaster/3.0/vts/functional", |
| 246 | "//hardware/interfaces/keymaster/4.0/vts/functional", |
Shawn Willden | 1ff77d0 | 2020-01-16 23:52:56 -0700 | [diff] [blame] | 247 | "//hardware/interfaces/keymaster/4.1/vts/functional", |
Luke Huang | 16a30fc | 2019-11-22 11:44:50 +0800 | [diff] [blame] | 248 | "//packages/modules/DnsResolver/tests:__subpackages__", |
Colin Cross | 4b979db | 2019-09-18 11:20:16 -0700 | [diff] [blame] | 249 | "//system/core/adb", |
| 250 | "//system/core/init", |
| 251 | "//system/core/fs_mgr/liblp", |
| 252 | "//system/core/fs_mgr/liblp/vts_core", |
| 253 | "//system/core/fs_mgr/libsnapshot", |
| 254 | "//system/libvintf/test", |
| 255 | "//system/security/keystore/tests", |
| 256 | "//test/vts-testcase/security/avb", |
| 257 | ], |
Przemyslaw Szczepaniak | dab438a | 2020-02-05 17:33:41 +0000 | [diff] [blame] | 258 | apex_available: [ |
| 259 | "//apex_available:platform", |
| 260 | "com.android.neuralnetworks", |
Przemyslaw Szczepaniak | dab438a | 2020-02-05 17:33:41 +0000 | [diff] [blame] | 261 | ], |
Paul Duffin | f6a61fd | 2019-06-25 12:06:25 +0100 | [diff] [blame] | 262 | defaults: [ |
Pete Bentley | 4763734 | 2019-08-19 12:22:49 +0100 | [diff] [blame] | 263 | "libcrypto_bcm_sources", |
Paul Duffin | f6a61fd | 2019-06-25 12:06:25 +0100 | [diff] [blame] | 264 | "libcrypto_sources", |
| 265 | "libcrypto_defaults", |
| 266 | "boringssl_defaults", |
| 267 | "boringssl_flags", |
| 268 | ], |
Dan Willemsen | 21986fb | 2016-07-14 15:23:56 -0700 | [diff] [blame] | 269 | } |
| 270 | |
Dan Willemsen | 21986fb | 2016-07-14 15:23:56 -0700 | [diff] [blame] | 271 | //// libssl |
| 272 | |
| 273 | // Target static library |
Dan Willemsen | 21986fb | 2016-07-14 15:23:56 -0700 | [diff] [blame] | 274 | |
| 275 | // Static and Shared library |
| 276 | cc_library { |
| 277 | name: "libssl", |
Paul Duffin | cb6fdd2 | 2019-06-04 13:24:44 +0100 | [diff] [blame] | 278 | visibility: ["//visibility:public"], |
Dan Willemsen | ea55e18 | 2018-10-23 13:41:19 -0700 | [diff] [blame] | 279 | recovery_available: true, |
Justin Yun | 47949c5 | 2017-07-24 15:19:43 +0900 | [diff] [blame] | 280 | vendor_available: true, |
dimitry | 09dd3be | 2019-05-09 16:42:01 +0200 | [diff] [blame] | 281 | native_bridge_supported: true, |
Justin Yun | 47949c5 | 2017-07-24 15:19:43 +0900 | [diff] [blame] | 282 | vndk: { |
| 283 | enabled: true, |
| 284 | }, |
Dan Willemsen | 21986fb | 2016-07-14 15:23:56 -0700 | [diff] [blame] | 285 | host_supported: true, |
Paul Duffin | f6a61fd | 2019-06-25 12:06:25 +0100 | [diff] [blame] | 286 | defaults: [ |
| 287 | "libssl_sources", |
| 288 | "boringssl_defaults", |
| 289 | "boringssl_flags", |
| 290 | ], |
Joshua Duong | 81ce7a5 | 2019-10-31 12:44:47 -0700 | [diff] [blame] | 291 | target: { |
| 292 | windows: { |
| 293 | enabled: true, |
| 294 | }, |
| 295 | }, |
Dan Willemsen | 2b2c24b | 2016-07-21 11:03:36 -0700 | [diff] [blame] | 296 | unique_host_soname: true, |
Dan Willemsen | 21986fb | 2016-07-14 15:23:56 -0700 | [diff] [blame] | 297 | |
Dan Willemsen | 2b2c24b | 2016-07-21 11:03:36 -0700 | [diff] [blame] | 298 | shared_libs: ["libcrypto"], |
Joshua Duong | 26b57e2 | 2020-02-10 16:04:44 -0800 | [diff] [blame] | 299 | |
| 300 | apex_available: [ |
| 301 | "//apex_available:platform", |
| 302 | "com.android.adbd", |
Jiyong Park | 0dcd4e8 | 2020-03-09 15:23:05 +0900 | [diff] [blame] | 303 | "com.android.conscrypt", |
| 304 | "com.android.resolv", |
Joshua Duong | 26b57e2 | 2020-02-10 16:04:44 -0800 | [diff] [blame] | 305 | ], |
Jooyung Han | 856ad1d | 2020-04-16 18:48:25 +0900 | [diff] [blame] | 306 | min_sdk_version: "29", |
Dan Willemsen | 21986fb | 2016-07-14 15:23:56 -0700 | [diff] [blame] | 307 | } |
| 308 | |
Dan Willemsen | 21986fb | 2016-07-14 15:23:56 -0700 | [diff] [blame] | 309 | // Tool |
| 310 | cc_binary { |
| 311 | name: "bssl", |
| 312 | host_supported: true, |
Paul Duffin | f6a61fd | 2019-06-25 12:06:25 +0100 | [diff] [blame] | 313 | defaults: [ |
| 314 | "bssl_sources", |
| 315 | "boringssl_flags", |
| 316 | ], |
Dan Willemsen | 21986fb | 2016-07-14 15:23:56 -0700 | [diff] [blame] | 317 | |
Dan Willemsen | 2b2c24b | 2016-07-21 11:03:36 -0700 | [diff] [blame] | 318 | shared_libs: [ |
| 319 | "libcrypto", |
| 320 | "libssl", |
| 321 | ], |
Dan Willemsen | 21986fb | 2016-07-14 15:23:56 -0700 | [diff] [blame] | 322 | target: { |
Dan Willemsen | 21986fb | 2016-07-14 15:23:56 -0700 | [diff] [blame] | 323 | darwin: { |
| 324 | enabled: false, |
| 325 | }, |
Pete Bentley | d716553 | 2020-05-14 12:01:03 +0100 | [diff] [blame] | 326 | android: { |
| 327 | compile_multilib: "both", |
| 328 | }, |
| 329 | }, |
| 330 | multilib: { |
| 331 | lib32: { |
| 332 | suffix: "32", |
| 333 | }, |
Dan Willemsen | 21986fb | 2016-07-14 15:23:56 -0700 | [diff] [blame] | 334 | }, |
| 335 | } |
Dan Willemsen | 2458a41 | 2016-07-15 09:28:31 -0700 | [diff] [blame] | 336 | |
Adam Langley | 7c16793 | 2018-02-02 14:44:53 -0800 | [diff] [blame] | 337 | cc_binary { |
| 338 | name: "cavp", |
| 339 | host_supported: true, |
| 340 | srcs: [ |
Pete Bentley | 0c61efe | 2019-08-13 09:32:23 +0100 | [diff] [blame] | 341 | "src/util/fipstools/cavp/cavp_aes_gcm_test.cc", |
| 342 | "src/util/fipstools/cavp/cavp_aes_test.cc", |
| 343 | "src/util/fipstools/cavp/cavp_ctr_drbg_test.cc", |
| 344 | "src/util/fipstools/cavp/cavp_ecdsa2_keypair_test.cc", |
| 345 | "src/util/fipstools/cavp/cavp_ecdsa2_pkv_test.cc", |
| 346 | "src/util/fipstools/cavp/cavp_ecdsa2_siggen_test.cc", |
| 347 | "src/util/fipstools/cavp/cavp_ecdsa2_sigver_test.cc", |
| 348 | "src/util/fipstools/cavp/cavp_hmac_test.cc", |
| 349 | "src/util/fipstools/cavp/cavp_kas_test.cc", |
| 350 | "src/util/fipstools/cavp/cavp_keywrap_test.cc", |
| 351 | "src/util/fipstools/cavp/cavp_main.cc", |
| 352 | "src/util/fipstools/cavp/cavp_rsa2_keygen_test.cc", |
| 353 | "src/util/fipstools/cavp/cavp_rsa2_siggen_test.cc", |
| 354 | "src/util/fipstools/cavp/cavp_rsa2_sigver_test.cc", |
| 355 | "src/util/fipstools/cavp/cavp_sha_monte_test.cc", |
| 356 | "src/util/fipstools/cavp/cavp_sha_test.cc", |
| 357 | "src/util/fipstools/cavp/cavp_tdes_test.cc", |
| 358 | "src/util/fipstools/cavp/cavp_test_util.cc", |
| 359 | "src/util/fipstools/cavp/cavp_tlskdf_test.cc", |
Adam Langley | 7c16793 | 2018-02-02 14:44:53 -0800 | [diff] [blame] | 360 | ], |
Pete Bentley | d716553 | 2020-05-14 12:01:03 +0100 | [diff] [blame] | 361 | target: { |
| 362 | android: { |
| 363 | compile_multilib: "both", |
| 364 | }, |
| 365 | }, |
| 366 | multilib: { |
| 367 | lib32: { |
| 368 | suffix: "32", |
| 369 | }, |
| 370 | }, |
Adam Langley | 7c16793 | 2018-02-02 14:44:53 -0800 | [diff] [blame] | 371 | |
| 372 | shared_libs: [ |
| 373 | "libcrypto", |
| 374 | ], |
| 375 | |
Paul Duffin | f6a61fd | 2019-06-25 12:06:25 +0100 | [diff] [blame] | 376 | defaults: [ |
| 377 | "boringssl_test_support_sources", |
| 378 | "boringssl_flags", |
| 379 | ], |
Adam Langley | 7c16793 | 2018-02-02 14:44:53 -0800 | [diff] [blame] | 380 | } |
| 381 | |
Dan Willemsen | 2458a41 | 2016-07-15 09:28:31 -0700 | [diff] [blame] | 382 | // Test support library |
| 383 | cc_library_static { |
| 384 | name: "boringssl_test_support", |
| 385 | host_supported: true, |
Paul Duffin | f6a61fd | 2019-06-25 12:06:25 +0100 | [diff] [blame] | 386 | defaults: [ |
| 387 | "boringssl_test_support_sources", |
| 388 | "boringssl_flags", |
| 389 | ], |
Dan Willemsen | 2458a41 | 2016-07-15 09:28:31 -0700 | [diff] [blame] | 390 | |
Dan Willemsen | 2b2c24b | 2016-07-21 11:03:36 -0700 | [diff] [blame] | 391 | shared_libs: [ |
| 392 | "libcrypto", |
| 393 | "libssl", |
| 394 | ], |
Dan Willemsen | 2458a41 | 2016-07-15 09:28:31 -0700 | [diff] [blame] | 395 | } |
| 396 | |
| 397 | // Tests |
| 398 | cc_test { |
Paul Duffin | f6a61fd | 2019-06-25 12:06:25 +0100 | [diff] [blame] | 399 | name: "boringssl_crypto_test", |
| 400 | test_suites: ["device-tests"], |
| 401 | host_supported: true, |
| 402 | defaults: [ |
| 403 | "boringssl_crypto_test_sources", |
| 404 | "boringssl_flags", |
| 405 | ], |
| 406 | whole_static_libs: ["boringssl_test_support"], |
David Benjamin | f31229b | 2017-01-25 14:08:15 -0500 | [diff] [blame] | 407 | |
Paul Duffin | f6a61fd | 2019-06-25 12:06:25 +0100 | [diff] [blame] | 408 | shared_libs: ["libcrypto"], |
David Benjamin | f31229b | 2017-01-25 14:08:15 -0500 | [diff] [blame] | 409 | } |
| 410 | |
| 411 | cc_test { |
Paul Duffin | f6a61fd | 2019-06-25 12:06:25 +0100 | [diff] [blame] | 412 | name: "boringssl_ssl_test", |
| 413 | test_suites: ["device-tests"], |
| 414 | host_supported: true, |
| 415 | defaults: [ |
| 416 | "boringssl_ssl_test_sources", |
| 417 | "boringssl_flags", |
| 418 | ], |
| 419 | whole_static_libs: ["boringssl_test_support"], |
David Benjamin | f31229b | 2017-01-25 14:08:15 -0500 | [diff] [blame] | 420 | |
Paul Duffin | f6a61fd | 2019-06-25 12:06:25 +0100 | [diff] [blame] | 421 | shared_libs: [ |
| 422 | "libcrypto", |
| 423 | "libssl", |
| 424 | ], |
David Benjamin | f31229b | 2017-01-25 14:08:15 -0500 | [diff] [blame] | 425 | } |
Adam Langley | b6f7515 | 2019-10-18 12:20:11 -0700 | [diff] [blame] | 426 | |
| 427 | // Utility binary for CMVP on-site testing. |
| 428 | cc_binary { |
Tobias Thierer | 6204b54 | 2019-10-18 21:55:05 +0100 | [diff] [blame] | 429 | name: "test_fips", |
| 430 | host_supported: false, |
| 431 | defaults: [ |
| 432 | "boringssl_flags", |
| 433 | ], |
| 434 | shared_libs: [ |
| 435 | "libcrypto", |
| 436 | ], |
| 437 | srcs: [ |
| 438 | "src/util/fipstools/cavp/test_fips.c", |
| 439 | ], |
Adam Langley | b6f7515 | 2019-10-18 12:20:11 -0700 | [diff] [blame] | 440 | } |