Janis Danisevskis | 212c68b | 2021-01-14 22:29:28 -0800 | [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 | |
Bob Badour | 4c7858c | 2021-02-12 15:40:29 -0800 | [diff] [blame] | 15 | package { |
| 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 | |
Janis Danisevskis | 212c68b | 2021-01-14 22:29:28 -0800 | [diff] [blame] | 24 | cc_library { |
| 25 | name: "libkeystore2_aaid", |
| 26 | srcs: [ |
| 27 | "aaid.cpp", |
| 28 | ], |
| 29 | shared_libs: [ |
Luca Stefani | 481b5d6 | 2024-01-17 11:42:06 +0100 | [diff] [blame] | 30 | "libkeystore-attestation-application-id", |
Janis Danisevskis | 212c68b | 2021-01-14 22:29:28 -0800 | [diff] [blame] | 31 | ], |
| 32 | } |
| 33 | |
| 34 | rust_bindgen { |
| 35 | name: "libkeystore2_aaid_bindgen", |
| 36 | wrapper_src: "aaid.hpp", |
| 37 | crate_name: "keystore2_aaid_bindgen", |
| 38 | source_stem: "bindings", |
| 39 | |
| 40 | bindgen_flags: [ |
Joel Galenson | 915d3ea | 2021-04-19 09:02:41 -0700 | [diff] [blame] | 41 | "--allowlist-function=aaid_keystore_attestation_id", |
| 42 | "--allowlist-var=KEY_ATTESTATION_APPLICATION_ID_MAX_SIZE", |
Janis Danisevskis | 212c68b | 2021-01-14 22:29:28 -0800 | [diff] [blame] | 43 | ], |
| 44 | } |
| 45 | |
| 46 | rust_library { |
| 47 | name: "libkeystore2_aaid-rust", |
| 48 | crate_name: "keystore2_aaid", |
| 49 | srcs: [ |
| 50 | "lib.rs", |
| 51 | ], |
| 52 | rustlibs: [ |
| 53 | "libkeystore2_aaid_bindgen", |
| 54 | ], |
| 55 | shared_libs: [ |
| 56 | "libkeystore2_aaid", |
| 57 | ], |
| 58 | } |
Joel Galenson | 733d1d0 | 2021-08-23 13:47:37 -0700 | [diff] [blame] | 59 | |
| 60 | rust_test { |
| 61 | name: "libkeystore2_aaid_bindgen_test", |
| 62 | srcs: [":libkeystore2_aaid_bindgen"], |
| 63 | crate_name: "keystore2_aaid_bindgen_test", |
| 64 | test_suites: ["general-tests"], |
| 65 | auto_gen_config: true, |
| 66 | clippy_lints: "none", |
| 67 | lints: "none", |
| 68 | } |