1// 2// Copyright (C) 2015 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 default_applicable_licenses: ["Android-Apache-2.0"], 19} 20 21cc_binary { 22 name: "[email protected]", 23 defaults: ["hidl_defaults"], 24 relative_install_path: "hw", 25 vendor: true, 26 init_rc: ["3.0/[email protected]"], 27 srcs: [ 28 "3.0/service.cpp", 29 "3.0/TrustyKeymaster3Device.cpp", 30 "ipc/trusty_keymaster_ipc.cpp", 31 "TrustyKeymaster.cpp", 32 ], 33 34 local_include_dirs: ["include"], 35 36 shared_libs: [ 37 "liblog", 38 "libcutils", 39 "libdl", 40 "libbase", 41 "libutils", 42 "libhardware", 43 "libhidlbase", 44 "libtrusty", 45 "libkeymaster_messages", 46 "libkeymaster3device", 47 "[email protected]", 48 ], 49} 50 51cc_binary { 52 name: "[email protected]", 53 defaults: ["hidl_defaults"], 54 relative_install_path: "hw", 55 vendor: true, 56 init_rc: ["4.0/[email protected]"], 57 srcs: [ 58 "4.0/service.cpp", 59 "4.0/TrustyKeymaster4Device.cpp", 60 "ipc/trusty_keymaster_ipc.cpp", 61 "TrustyKeymaster.cpp", 62 ], 63 64 local_include_dirs: ["include"], 65 66 shared_libs: [ 67 "liblog", 68 "libcutils", 69 "libdl", 70 "libbase", 71 "libutils", 72 "libhardware", 73 "libhidlbase", 74 "libtrusty", 75 "libkeymaster_messages", 76 "libkeymaster4", 77 "[email protected]", 78 ], 79 80 vintf_fragments: ["4.0/[email protected]"], 81} 82 83cc_binary { 84 name: "android.hardware.security.keymint-service.trusty", 85 relative_install_path: "hw", 86 init_rc: ["keymint/android.hardware.security.keymint-service.trusty.rc"], 87 vintf_fragments: [ 88 "keymint/android.hardware.security.keymint-service.trusty.xml", 89 ], 90 vendor: true, 91 cflags: [ 92 "-Wall", 93 "-Wextra", 94 ], 95 local_include_dirs: [ 96 "include", 97 ], 98 srcs: [ 99 "TrustyKeymaster.cpp", 100 "ipc/trusty_keymaster_ipc.cpp", 101 "keymint/TrustyKeyMintDevice.cpp", 102 "keymint/TrustyKeyMintOperation.cpp", 103 "keymint/TrustyRemotelyProvisionedComponentDevice.cpp", 104 "keymint/TrustySecureClock.cpp", 105 "keymint/TrustySharedSecret.cpp", 106 "keymint/service.cpp", 107 ], 108 shared_libs: [ 109 "android.hardware.security.keymint-V4-ndk", 110 "android.hardware.security.rkp-V3-ndk", 111 "android.hardware.security.secureclock-V1-ndk", 112 "android.hardware.security.sharedsecret-V1-ndk", 113 "lib_android_keymaster_keymint_utils", 114 "libbase", 115 "libbinder_ndk", 116 "libhardware", 117 "libkeymaster_messages", 118 "libkeymasterconfig", 119 "liblog", 120 "libtrusty", 121 "libutils", 122 ], 123 required: select(release_flag("RELEASE_AIDL_USE_UNFROZEN"), { 124 true: ["android.hardware.hardware_keystore.xml"], 125 default: ["android.hardware.hardware_keystore_V3.xml"], 126 }), 127} 128 129prebuilt_etc { 130 name: "keymaster_soft_attestation_keys.xml", 131 vendor: true, 132 src: "set_attestation_key/keymaster_soft_attestation_keys.xml", 133} 134 135cc_library { 136 name: "libtrusty_ipc", 137 vendor: true, 138 srcs: ["ipc/trusty_keymaster_ipc.cpp"], 139 local_include_dirs: ["include"], 140 shared_libs: [ 141 "libc", 142 "libcrypto", 143 "liblog", 144 "libtrusty", 145 "libhardware", 146 "libkeymaster_messages", 147 "libutils", 148 "libxml2", 149 ], 150 export_include_dirs: ["include"], 151 cflags: [ 152 "-Wall", 153 "-Werror", 154 ], 155} 156 157cc_binary { 158 name: "trusty_keymaster_set_attestation_key", 159 vendor: true, 160 161 srcs: [ 162 "set_attestation_key/set_attestation_key.cpp", 163 "ipc/trusty_keymaster_ipc.cpp", 164 ], 165 166 local_include_dirs: ["include"], 167 168 shared_libs: [ 169 "libc", 170 "libcrypto", 171 "liblog", 172 "libtrusty", 173 "libhardware", 174 "libkeymaster_messages", 175 "libutils", 176 "libxml2", 177 ], 178 cflags: [ 179 "-Wall", 180 "-Werror", 181 ], 182} 183 184cc_binary { 185 name: "trusty_keymaster_set_attestation_ids", 186 vendor: true, 187 188 srcs: [ 189 "set_attestation_ids/set_attestation_ids.cpp", 190 "ipc/trusty_keymaster_ipc.cpp", 191 ], 192 193 local_include_dirs: ["include"], 194 195 shared_libs: [ 196 "libbase", 197 "libc", 198 "libcrypto", 199 "liblog", 200 "libtrusty", 201 "libhardware", 202 "libkeymaster_messages", 203 "libutils", 204 ], 205 cflags: [ 206 "-Wall", 207 "-Werror", 208 ], 209} 210 211prebuilt_etc { 212 name: "rkp_uds_cert_test.xml", 213 vendor: true, 214 src: "set_uds_certs/rkp_uds_cert_test.xml", 215} 216 217cc_binary { 218 name: "trusty_rkp_set_uds_cert", 219 vendor: true, 220 221 srcs: [ 222 "set_uds_certs/set_uds_certificates.cpp", 223 "ipc/trusty_keymaster_ipc.cpp", 224 ], 225 226 local_include_dirs: ["include"], 227 228 shared_libs: [ 229 "libc", 230 "libcrypto", 231 "liblog", 232 "libtrusty", 233 "libhardware", 234 "libkeymaster_messages", 235 "libutils", 236 "libxml2", 237 ], 238 cflags: [ 239 "-Wall", 240 "-Werror", 241 ], 242} 243