• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//
2// Copyright (C) 2018 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8//      http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17package {
18    // See: http://go/android-license-faq
19    // A large-scale-change added 'default_applicable_licenses' to import
20    // all of the 'license_kinds' from "frameworks_av_license"
21    // to get the below license kinds:
22    //   SPDX-license-identifier-Apache-2.0
23    default_applicable_licenses: ["frameworks_av_license"],
24}
25
26cc_library_static {
27    name: "libclearkeycommon",
28    vendor: true,
29
30    srcs: [
31        "ClearKeyUUID.cpp",
32        "Utils.cpp",
33    ],
34
35    cflags: ["-Wall", "-Werror"],
36
37    include_dirs: ["frameworks/av/include"],
38
39    shared_libs: ["libutils"],
40
41    export_include_dirs: ["include"],
42
43    sanitize: {
44        integer_overflow: true,
45    },
46}
47
48cc_library_static {
49    name: "libclearkeydevicefiles-protos.common",
50    vendor: true,
51
52    proto: {
53        export_proto_headers: true,
54        type: "lite",
55    },
56    srcs: ["protos/DeviceFiles.proto"],
57}
58
59cc_library_static {
60    name: "libclearkeybase",
61    vendor: true,
62
63    srcs: [
64        "AesCtrDecryptor.cpp",
65        "Base64.cpp",
66        "Buffer.cpp",
67        "ClearKeyUUID.cpp",
68        "DeviceFiles.cpp",
69        "InitDataParser.cpp",
70        "JsonWebKey.cpp",
71        "MemoryFileSystem.cpp",
72        "Session.cpp",
73        "SessionLibrary.cpp",
74        "Utils.cpp",
75    ],
76
77    cflags: ["-Wall", "-Werror"],
78
79    include_dirs: ["frameworks/av/include"],
80
81    shared_libs: [
82        "libutils",
83        "libcrypto",
84    ],
85
86    whole_static_libs: [
87        "libjsmn",
88        "libclearkeydevicefiles-protos.common",
89    ],
90
91    export_include_dirs: [
92        "include",
93        "include/clearkeydrm",
94    ],
95
96    sanitize: {
97        integer_overflow: true,
98    },
99}
100
101cc_library_static {
102    name: "libclearkeydevicefiles-protos.common_fuzz",
103
104    proto: {
105        export_proto_headers: true,
106        type: "lite",
107    },
108    srcs: ["protos/DeviceFiles.proto"],
109}
110
111cc_library_static {
112    name: "libclearkeybase_fuzz",
113
114    srcs: [
115        "AesCtrDecryptor.cpp",
116        "Base64.cpp",
117        "Buffer.cpp",
118        "ClearKeyUUID.cpp",
119        "DeviceFiles.cpp",
120        "InitDataParser.cpp",
121        "JsonWebKey.cpp",
122        "MemoryFileSystem.cpp",
123        "Session.cpp",
124        "SessionLibrary.cpp",
125        "Utils.cpp",
126    ],
127
128    cflags: ["-Wall", "-Werror"],
129
130    include_dirs: ["frameworks/av/include"],
131
132    shared_libs: [
133        "libutils",
134        "libcrypto",
135    ],
136
137    whole_static_libs: [
138        "libjsmn",
139        "libclearkeydevicefiles-protos.common_fuzz",
140    ],
141
142    export_include_dirs: [
143        "include",
144        "include/clearkeydrm",
145    ],
146
147    sanitize: {
148        integer_overflow: true,
149    },
150}
151