Joel Galenson | de386b4 | 2020-09-30 10:53:05 -0700 | [diff] [blame^] | 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 | |
| 15 | rust_library { |
| 16 | name: "libkeystore2_km_compat", |
| 17 | crate_name: "keystore2_km_compat", |
| 18 | srcs: ["lib.rs"], |
| 19 | |
| 20 | rustlibs: [ |
| 21 | "android.hardware.security.keymint-rust", |
| 22 | "android.security.compat-rust", |
| 23 | ], |
| 24 | shared_libs: [ |
| 25 | "libkm_compat_service", |
| 26 | ] |
| 27 | } |
| 28 | |
| 29 | rust_test { |
| 30 | name: "keystore2_km_compat_test", |
| 31 | crate_name: "keystore2", |
| 32 | srcs: ["lib.rs"], |
| 33 | test_suites: ["general-tests"], |
| 34 | auto_gen_config: true, |
| 35 | rustlibs: [ |
| 36 | "android.hardware.security.keymint-rust", |
| 37 | "android.security.compat-rust", |
| 38 | ], |
| 39 | shared_libs: [ |
| 40 | "libkm_compat_service", |
| 41 | ], |
| 42 | } |
| 43 | |
| 44 | cc_library { |
| 45 | name: "libkm_compat", |
| 46 | srcs: ["km_compat.cpp"], |
| 47 | shared_libs: [ |
| 48 | "android.hardware.keymaster@3.0", |
| 49 | "android.hardware.keymaster@4.0", |
| 50 | "android.hardware.keymaster@4.1", |
| 51 | "android.hardware.security.keymint-unstable-ndk_platform", |
| 52 | "android.security.compat-ndk_platform", |
| 53 | "android.system.keystore2-ndk_platform", |
| 54 | "libbase", |
| 55 | "libbinder_ndk", |
| 56 | "libcrypto", |
| 57 | "libhidlbase", |
| 58 | "libkeymaster4_1support", |
| 59 | "libkeystore2_crypto", |
| 60 | "libutils", |
| 61 | ], |
| 62 | } |
| 63 | |
| 64 | cc_library { |
| 65 | name: "libkm_compat_service", |
| 66 | srcs: ["km_compat_service.cpp"], |
| 67 | shared_libs: [ |
| 68 | "android.security.compat-ndk_platform", |
| 69 | "libbinder_ndk", |
| 70 | "libcrypto", |
| 71 | "libkm_compat", |
| 72 | "libkeymaster4_1support", |
| 73 | "libkeystore2_crypto", |
| 74 | ], |
| 75 | } |
| 76 | |
| 77 | cc_test { |
| 78 | cflags: [ |
| 79 | "-Wall", |
| 80 | "-Werror", |
| 81 | "-Wextra", |
| 82 | ], |
| 83 | srcs: [ |
| 84 | "certificate_test.cpp", |
| 85 | "gtest_main.cpp", |
| 86 | "slot_test.cpp", |
| 87 | ], |
| 88 | shared_libs: [ |
| 89 | "android.hardware.keymaster@3.0", |
| 90 | "android.hardware.keymaster@4.0", |
| 91 | "android.hardware.keymaster@4.1", |
| 92 | "android.hardware.security.keymint-unstable-ndk_platform", |
| 93 | "android.security.compat-ndk_platform", |
| 94 | "android.system.keystore2-ndk_platform", |
| 95 | "libbase", |
| 96 | "libbinder_ndk", |
| 97 | "libcrypto", |
| 98 | "libhidlbase", |
| 99 | "libkeymaster4_1support", |
| 100 | "libkeystore2_crypto", |
| 101 | "libkm_compat", |
| 102 | "libutils", |
| 103 | ], |
| 104 | name: "keystore2_certificate_test", |
| 105 | } |