blob: 3417960db5685ba81b178843437c13ba09eb4109 [file] [log] [blame]
Janis Danisevskis212c68b2021-01-14 22:29:28 -08001// 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 Badour4c7858c2021-02-12 15:40:29 -080015package {
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 Danisevskis212c68b2021-01-14 22:29:28 -080024cc_library {
25 name: "libkeystore2_aaid",
26 srcs: [
27 "aaid.cpp",
28 ],
29 shared_libs: [
30 "libkeystore-attestation-application-id"
31 ],
32}
33
34rust_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: [
41 "--size_t-is-usize",
Joel Galenson915d3ea2021-04-19 09:02:41 -070042 "--allowlist-function=aaid_keystore_attestation_id",
43 "--allowlist-var=KEY_ATTESTATION_APPLICATION_ID_MAX_SIZE",
Janis Danisevskis212c68b2021-01-14 22:29:28 -080044 ],
45}
46
47rust_library {
48 name: "libkeystore2_aaid-rust",
49 crate_name: "keystore2_aaid",
50 srcs: [
51 "lib.rs",
52 ],
53 rustlibs: [
54 "libkeystore2_aaid_bindgen",
55 ],
56 shared_libs: [
57 "libkeystore2_aaid",
58 ],
59}
Joel Galenson733d1d02021-08-23 13:47:37 -070060
61rust_test {
62 name: "libkeystore2_aaid_bindgen_test",
63 srcs: [":libkeystore2_aaid_bindgen"],
64 crate_name: "keystore2_aaid_bindgen_test",
65 test_suites: ["general-tests"],
66 auto_gen_config: true,
67 clippy_lints: "none",
68 lints: "none",
69}