1//
2// Copyright (C) 2020 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 "hardware_interfaces_license"
21    // to get the below license kinds:
22    //   SPDX-license-identifier-Apache-2.0
23    default_applicable_licenses: ["hardware_interfaces_license"],
24}
25
26cc_library {
27    name: "libkeymint_support",
28    vendor_available: true,
29    cflags: [
30        "-Wall",
31        "-Wextra",
32        "-Werror",
33    ],
34    srcs: [
35        "attestation_record.cpp",
36        "authorization_set.cpp",
37        "keymint_utils.cpp",
38        "key_param_output.cpp",
39    ],
40    export_include_dirs: [
41        "include",
42    ],
43    defaults: [
44        "keymint_use_latest_hal_aidl_ndk_shared",
45    ],
46    shared_libs: [
47        "libbase",
48        "libcrypto",
49        "libutils",
50        "libhardware",
51    ],
52}
53
54cc_library {
55    name: "libkeymint_remote_prov_support",
56    vendor_available: true,
57    srcs: [
58        "remote_prov_utils.cpp",
59    ],
60    export_include_dirs: [
61        "include",
62    ],
63    defaults: [
64        "keymint_use_latest_hal_aidl_ndk_shared",
65    ],
66    static_libs: [
67        "android.hardware.security.rkp-V3-ndk",
68    ],
69    whole_static_libs: [
70        "libhwtrust_cxx",
71    ],
72    shared_libs: [
73        "libbase",
74        "libbinder_ndk",
75        "libcppbor",
76        "libcppcose_rkp",
77        "libcrypto",
78        "libkeymaster_portable",
79        "libjsoncpp",
80    ],
81}
82
83cc_test {
84    name: "libkeymint_remote_prov_support_test",
85    srcs: ["remote_prov_utils_test.cpp"],
86    static_libs: [
87        "android.hardware.security.rkp-V3-ndk",
88        "libgmock",
89        "libgtest_main",
90        "libkeymint_remote_prov_support",
91    ],
92    defaults: [
93        "keymint_use_latest_hal_aidl_ndk_shared",
94    ],
95    shared_libs: [
96        "libbase",
97        "libcppbor",
98        "libcppcose_rkp",
99        "libcrypto",
100        "libjsoncpp",
101        "libkeymaster_portable",
102    ],
103}
104