1// Copyright (C) 2020 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14// 15 16package { 17 default_applicable_licenses: [ 18 "external_libese_ready_se_google_keymint_KM200_HAL_license", 19 ], 20} 21 22// Added automatically by a large-scale-change 23// See: http://go/android-license-faq 24license { 25 name: "external_libese_ready_se_google_keymint_KM200_HAL_license", 26 visibility: [":__subpackages__"], 27 license_kinds: [ 28 "SPDX-license-identifier-Apache-2.0", 29 ], 30 license_text: [ 31 "LICENSE", 32 ], 33} 34 35cc_library { 36 name: "libjc_keymint", 37 defaults: [ 38 "keymaster_defaults", 39 "keymint_use_latest_hal_aidl_ndk_shared", 40 ], 41 srcs: [ 42 "CborConverter.cpp", 43 "JavacardKeyMintDevice.cpp", 44 "JavacardKeyMintOperation.cpp", 45 "JavacardRemotelyProvisionedComponentDevice.cpp", 46 "JavacardSecureElement.cpp", 47 "JavacardSharedSecret.cpp", 48 "keymint_utils.cpp", 49 ], 50 cflags: ["-O0"], 51 shared_libs: [ 52 "android.hardware.security.secureclock-V1-ndk", 53 "android.hardware.security.sharedsecret-V1-ndk", 54 "android.hardware.security.rkp-V3-ndk", 55 "lib_android_keymaster_keymint_utils", 56 "libbase", 57 "libcppbor_external", 58 "libkeymaster_portable", 59 "libkeymaster_messages", 60 "libsoft_attestation_cert", 61 "liblog", 62 "libcrypto", 63 "libcutils", 64 "libjc_keymint_transport", 65 "libbinder_ndk", 66 ], 67 export_include_dirs: [ 68 ".", 69 ], 70 vendor_available: true, 71} 72 73cc_library { 74 name: "libjc_keymint_transport", 75 vendor_available: true, 76 defaults: [ 77 "keymint_use_latest_hal_aidl_ndk_shared", 78 ], 79 srcs: [ 80 "SocketTransport.cpp", 81 "OmapiTransport.cpp", 82 ], 83 export_include_dirs: [ 84 ".", 85 ], 86 shared_libs: [ 87 "libbinder", 88 "libbase", 89 "liblog", 90 "libbinder_ndk", 91 "android.se.omapi-V1-ndk", 92 "libhardware", 93 ], 94} 95 96cc_binary { 97 name: "android.hardware.security.keymint-service.strongbox", 98 relative_install_path: "hw", 99 init_rc: ["android.hardware.security.keymint-service.strongbox.rc"], 100 vintf_fragments: [ 101 "android.hardware.security.keymint-service.strongbox.xml", 102 "android.hardware.security.sharedsecret-service.strongbox.xml", 103 ], 104 vendor: true, 105 cflags: [ 106 "-Wall", 107 "-Wextra", 108 ], 109 defaults: [ 110 "keymint_use_latest_hal_aidl_ndk_shared", 111 ], 112 shared_libs: [ 113 "android.hardware.security.sharedsecret-V1-ndk", 114 "lib_android_keymaster_keymint_utils", 115 "android.hardware.security.rkp-V3-ndk", 116 "libbase", 117 "libbinder_ndk", 118 "libcppbor_external", 119 "libcrypto", 120 "libkeymaster_portable", 121 "libjc_keymint", 122 "libjc_keymint_transport", 123 "liblog", 124 "libutils", 125 "android.se.omapi-V1-ndk", 126 ], 127 srcs: [ 128 "service.cpp", 129 ], 130 required: [ 131 "android.hardware.hardware_keystore.jc-strongbox-keymint.xml", 132 ], 133} 134 135prebuilt_etc { 136 name: "android.hardware.hardware_keystore.jc-strongbox-keymint.xml", 137 sub_dir: "permissions", 138 vendor: true, 139 src: "android.hardware.hardware_keystore.jc-strongbox-keymint.xml", 140} 141