1// Copyright 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 15package { 16 // See: http://go/android-license-faq 17 // A large-scale-change added 'default_applicable_licenses' to import 18 // all of the 'license_kinds' from "system_security_license" 19 // to get the below license kinds: 20 // SPDX-license-identifier-Apache-2.0 21 default_applicable_licenses: ["system_security_license"], 22} 23 24rust_library { 25 name: "libkeystore2_km_compat", 26 crate_name: "keystore2_km_compat", 27 srcs: ["lib.rs"], 28 29 rustlibs: [ 30 "android.hardware.security.keymint-V1-rust", 31 "android.security.compat-rust", 32 ], 33 shared_libs: [ 34 "libkm_compat_service", 35 ] 36} 37 38rust_test { 39 name: "keystore2_km_compat_test", 40 crate_name: "keystore2", 41 srcs: ["lib.rs"], 42 test_suites: ["general-tests"], 43 auto_gen_config: true, 44 rustlibs: [ 45 "android.hardware.security.keymint-V1-rust", 46 "android.security.compat-rust", 47 ], 48 shared_libs: [ 49 "libkm_compat_service", 50 ], 51} 52 53cc_library { 54 name: "libkm_compat", 55 srcs: ["km_compat.cpp"], 56 shared_libs: [ 57 "android.hardware.keymaster@3.0", 58 "android.hardware.keymaster@4.0", 59 "android.hardware.keymaster@4.1", 60 "android.hardware.security.keymint-V1-ndk_platform", 61 "android.hardware.security.secureclock-V1-ndk_platform", 62 "android.hardware.security.sharedsecret-V1-ndk_platform", 63 "android.security.compat-ndk_platform", 64 "android.system.keystore2-V1-ndk_platform", 65 "libbase", 66 "libbinder_ndk", 67 "libcrypto", 68 "libhidlbase", 69 "libkeymaster4_1support", 70 "libkeymint", 71 "libkeymint_support", 72 "libkeystore2_crypto", 73 "libutils", 74 ], 75} 76 77cc_library { 78 name: "libkm_compat_service", 79 srcs: ["km_compat_service.cpp"], 80 shared_libs: [ 81 "android.hardware.security.keymint-V1-ndk_platform", 82 "android.hardware.security.secureclock-V1-ndk_platform", 83 "android.hardware.security.sharedsecret-V1-ndk_platform", 84 "android.security.compat-ndk_platform", 85 "libbinder_ndk", 86 "libcrypto", 87 "libkm_compat", 88 "libkeymaster4_1support", 89 "libkeystore2_crypto", 90 ], 91} 92 93cc_test { 94 name: "keystore2_km_compat_test_cpp", 95 cflags: [ 96 "-Wall", 97 "-Werror", 98 "-Wextra", 99 ], 100 srcs: [ 101 "certificate_test.cpp", 102 "gtest_main.cpp", 103 "parameter_conversion_test.cpp", 104 "slot_test.cpp", 105 ], 106 shared_libs: [ 107 "android.hardware.keymaster@3.0", 108 "android.hardware.keymaster@4.0", 109 "android.hardware.keymaster@4.1", 110 "android.hardware.security.keymint-V1-ndk_platform", 111 "android.hardware.security.secureclock-V1-ndk_platform", 112 "android.hardware.security.sharedsecret-V1-ndk_platform", 113 "android.security.compat-ndk_platform", 114 "android.system.keystore2-V1-ndk_platform", 115 "libbase", 116 "libbinder_ndk", 117 "libcrypto", 118 "libhidlbase", 119 "libkeymaster4_1support", 120 "libkeymint_support", 121 "libkeystore2_crypto", 122 "libkm_compat", 123 "libkm_compat_service", 124 "libutils", 125 ], 126} 127