1/* 2 * Copyright (C) 2023 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17package { 18 default_applicable_licenses: ["Android-Apache-2.0"], 19} 20 21rust_defaults { 22 name: "libsecretkeeper_client.defaults", 23 crate_name: "secretkeeper_client", 24 edition: "2021", 25 lints: "android", 26 defaults: [ 27 "authgraph_use_latest_hal_aidl_rust", 28 "secretkeeper_use_latest_hal_aidl_rust", 29 ], 30 rustlibs: [ 31 "libauthgraph_core", 32 "libauthgraph_boringssl", 33 "libauthgraph_wire", 34 "libbinder_rs", 35 "libcoset", 36 "libdiced_open_dice", 37 "libexplicitkeydice", 38 "libhex", 39 // TODO(b/315464358): Use the std version 40 "libsecretkeeper_comm_nostd", 41 // TODO(b/291228655): This is required for 'cipher', refactor to cut this dependency. 42 "libsecretkeeper_core_nostd", 43 ], 44} 45 46rust_library { 47 name: "libsecretkeeper_client", 48 defaults: ["libsecretkeeper_client.defaults"], 49 srcs: ["src/lib.rs"], 50} 51 52rust_library { 53 name: "libexplicitkeydice", 54 crate_name: "explicitkeydice", 55 edition: "2021", 56 lints: "android", 57 srcs: ["src/dice.rs"], 58 rustlibs: [ 59 "libciborium", 60 "libcoset", 61 "libdiced_open_dice", 62 ], 63 vendor_available: true, 64 min_sdk_version: "35", 65} 66 67rust_test { 68 name: "libexplicitkeydice.test", 69 defaults: [ 70 "rdroidtest.defaults", 71 ], 72 srcs: ["src/dice.rs"], 73 rustlibs: [ 74 "libciborium", 75 "libcoset", 76 "libdiced_open_dice", 77 "libhex", 78 ], 79 test_suites: ["general-tests"], 80 data: ["testdata/*"], 81} 82