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: "android.hardware.keymaster@3.0-service.trusty", 23 defaults: ["hidl_defaults"], 24 relative_install_path: "hw", 25 vendor: true, 26 init_rc: ["3.0/android.hardware.keymaster@3.0-service.trusty.rc"], 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 "android.hardware.keymaster@3.0" 48 ], 49} 50 51cc_binary { 52 name: "android.hardware.keymaster@4.0-service.trusty", 53 defaults: ["hidl_defaults"], 54 relative_install_path: "hw", 55 vendor: true, 56 init_rc: ["4.0/android.hardware.keymaster@4.0-service.trusty.rc"], 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 "android.hardware.keymaster@4.0" 78 ], 79 80 vintf_fragments: ["4.0/android.hardware.keymaster@4.0-service.trusty.xml"], 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-V1-ndk_platform", 110 "android.hardware.security.secureclock-V1-ndk_platform", 111 "android.hardware.security.sharedsecret-V1-ndk_platform", 112 "lib_android_keymaster_keymint_utils", 113 "libbase", 114 "libbinder_ndk", 115 "libhardware", 116 "libkeymaster_messages", 117 "libkeymint", 118 "liblog", 119 "libtrusty", 120 ], 121 required: [ 122 "android.hardware.hardware_keystore.xml", 123 ], 124} 125 126prebuilt_etc { 127 name: "keymaster_soft_attestation_keys.xml", 128 vendor: true, 129 src: "set_attestation_key/keymaster_soft_attestation_keys.xml", 130} 131 132cc_library { 133 name: "libtrusty_ipc", 134 vendor: true, 135 srcs: ["ipc/trusty_keymaster_ipc.cpp"], 136 local_include_dirs: ["include"], 137 shared_libs: [ 138 "libc", 139 "libcrypto", 140 "liblog", 141 "libtrusty", 142 "libhardware", 143 "libkeymaster_messages", 144 "libxml2", 145 ], 146 export_include_dirs: ["include"], 147 cflags: [ 148 "-Wall", 149 "-Werror", 150 ], 151} 152 153cc_binary { 154 name: "trusty_keymaster_set_attestation_key", 155 vendor: true, 156 157 srcs: [ 158 "set_attestation_key/set_attestation_key.cpp", 159 "ipc/trusty_keymaster_ipc.cpp", 160 ], 161 162 local_include_dirs: ["include"], 163 164 shared_libs: [ 165 "libc", 166 "libcrypto", 167 "liblog", 168 "libtrusty", 169 "libhardware", 170 "libkeymaster_messages", 171 "libxml2", 172 ], 173 cflags: [ 174 "-Wall", 175 "-Werror", 176 ], 177} 178