1// Copyright 2022, 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 default_applicable_licenses: ["system_keymint_license"], 17} 18 19rust_library { 20 name: "libkmr_ta", 21 crate_name: "kmr_ta", 22 srcs: ["src/lib.rs"], 23 edition: "2021", 24 lints: "android", 25 vendor_available: true, 26 host_supported: true, 27 rustlibs: [ 28 "libciborium", 29 "libciborium_io", 30 "libcoset", 31 "libder", 32 "libflagset", 33 "libkmr_common", 34 "libkmr_wire", 35 "liblog_rust", 36 "libspki", 37 "libx509_cert", 38 ], 39 proc_macros: [ 40 "libkmr_derive", 41 ], 42} 43 44rust_library_rlib { 45 name: "libkmr_ta_nostd", 46 crate_name: "kmr_ta", 47 srcs: ["src/lib.rs"], 48 edition: "2021", 49 lints: "android", 50 vendor_available: true, 51 rustlibs: [ 52 "libciborium_nostd", 53 "libciborium_io_nostd", 54 "libcoset_nostd", 55 "libder_nostd", 56 "libflagset_nostd", 57 "libkmr_common_nostd", 58 "libkmr_wire_nostd", 59 "liblog_rust_nostd", 60 "libspki_nostd", 61 "libx509_cert_nostd", 62 ], 63 proc_macros: [ 64 "libkmr_derive", 65 ], 66 prefer_rlib: true, 67 no_stdlibs: true, 68 stdlibs: [ 69 "libcompiler_builtins.rust_sysroot", 70 "libcore.rust_sysroot", 71 ], 72} 73 74rust_test { 75 name: "libkmr_ta_test", 76 crate_name: "kmr_ta_test", 77 srcs: ["src/lib.rs"], 78 edition: "2021", 79 rustlibs: [ 80 "libciborium", 81 "libciborium_io", 82 "libder", 83 "libflagset", 84 "libhex", 85 "libkmr_common", 86 "libkmr_wire", 87 "liblog_rust", 88 "libspki", 89 "libx509_cert", 90 ], 91 proc_macros: [ 92 "libkmr_derive", 93 ], 94 test_suites: ["general-tests"], 95} 96 97rust_fuzz { 98 name: "libkmr_ta_fuzz_keydescription", 99 srcs: ["fuzz/fuzz_targets/keydescription.rs"], 100 rustlibs: [ 101 "libder", 102 "libkmr_ta", 103 ], 104 host_supported: true, 105 fuzz_config: { 106 cc: [ 107 "[email protected]", 108 "[email protected]", 109 ], 110 componentid: 1084733, 111 hotlists: ["4271696"], 112 fuzz_on_haiku_device: true, 113 fuzz_on_haiku_host: true, 114 }, 115} 116