blob: b3bc32cc3ea10f3df425d44a8d854896ca3972dc [file] [log] [blame]
Bob Badourf39d4192021-02-12 16:36:26 -08001package {
2 default_applicable_licenses: ["external_libsrtp2_license"],
3}
4
5// Added automatically by a large-scale-change that took the approach of
6// 'apply every license found to every target'. While this makes sure we respect
7// every license restriction, it may not be entirely correct.
8//
9// e.g. GPL in an MIT project might only apply to the contrib/ directory.
10//
11// Please consider splitting the single license below into multiple licenses,
12// taking care not to lose any license_kind information, and overriding the
13// default license using the 'licenses: [...]' property on targets as needed.
14//
15// For unused files, consider creating a 'fileGroup' with "//visibility:private"
16// to attach the license to, and including a comment whether the files may be
17// used in the current project.
18// See: http://go/android-license-faq
19license {
20 name: "external_libsrtp2_license",
21 visibility: [":__subpackages__"],
22 license_kinds: [
23 "SPDX-license-identifier-BSD",
24 "SPDX-license-identifier-MIT",
25 "legacy_unencumbered",
26 ],
27 license_text: [
28 "LICENSE",
29 ],
30}
31
Andreas Huberc5a5f742019-09-16 14:22:23 -070032cc_library_static {
33 host_supported: true,
Harish Mahendrakar1915e682020-09-23 18:05:41 -070034 // vendor needed for libpreprocessing effects.
35 vendor: true,
Andreas Hubera9778f72019-08-20 09:26:33 -070036 name: "libsrtp2",
37 srcs: [
38 "crypto/cipher/aes.c",
39 "crypto/cipher/aes_icm.c",
40 "crypto/cipher/cipher.c",
41 "crypto/cipher/null_cipher.c",
42 "crypto/hash/auth.c",
43 "crypto/hash/hmac.c",
44 "crypto/hash/null_auth.c",
45 "crypto/hash/sha1.c",
46 "crypto/kernel/alloc.c",
47 "crypto/kernel/crypto_kernel.c",
48 "crypto/kernel/err.c",
49 "crypto/kernel/key.c",
50 "crypto/math/datatypes.c",
51 "crypto/math/stat.c",
52 "crypto/replay/rdb.c",
53 "crypto/replay/rdbx.c",
54 "crypto/replay/ut_sim.c",
55 "srtp/ekt.c",
56 "srtp/srtp.c",
57 ],
58 local_include_dirs: [
59 "crypto/include",
60 "include",
61 ],
62 cflags: [
63 "-Wno-unused-parameter",
64 "-Wno-implicit-function-declaration",
65 "-DHAVE_CONFIG_H",
66 ],
67 export_include_dirs: [
Jorge E. Moreirad8f04c52020-07-14 15:45:18 -070068 "crypto/include",
69 "include",
Andreas Hubera9778f72019-08-20 09:26:33 -070070 "exported_include",
71 ],
Harish Mahendrakar1915e682020-09-23 18:05:41 -070072 visibility: [
73 "//external/webrtc:__subpackages__",
74 "//device/google/cuttlefish/host/frontend/webrtc:__subpackages__",
75 ],
Andreas Hubera9778f72019-08-20 09:26:33 -070076}
Branden Archere4705ff2020-10-15 16:05:09 -070077
78cc_fuzz {
79 name: "libsrtp2-fuzzer",
80 host_supported: true,
81 vendor: true,
82 static_libs: ["libsrtp2"],
83 cflags: [
84 "-Wno-unused-parameter",
85 ],
86 srcs: [
87 "fuzzer/fuzzer.c",
88 "fuzzer/mt19937.cpp",
89 "fuzzer/testmem.c",
90 ],
91 // There are so many corpus files that when all are used it
92 // exceeds the posix_spawn limit. So, only some of the files
93 // are used.
94 corpus: ["fuzzer/corpus/0*"],
95 fuzz_config: {
96 componentid: 87896
97 }
98}