Support parsing attestations in tests
Test: libkeystore_attestation_test
Change-Id: I7c2191e076923323d5e0d857bc7274cc56c6d967
diff --git a/keystore2/test_utils/attestation/Android.bp b/keystore2/test_utils/attestation/Android.bp
new file mode 100644
index 0000000..dbf02d0
--- /dev/null
+++ b/keystore2/test_utils/attestation/Android.bp
@@ -0,0 +1,54 @@
+// Copyright 2024, The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "system_security_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["system_security_license"],
+}
+
+rust_defaults {
+ name: "libkeystore_attestation_defaults",
+ crate_name: "keystore_attestation",
+ srcs: ["lib.rs"],
+ defaults: [
+ "keymint_use_latest_hal_aidl_rust",
+ ],
+ rustlibs: [
+ "libbinder_rs",
+ "libder",
+ "liblog_rust",
+ "libspki",
+ "libx509_cert",
+ ],
+}
+
+rust_library {
+ name: "libkeystore_attestation",
+ defaults: ["libkeystore_attestation_defaults"],
+}
+
+rust_test {
+ name: "libkeystore_attestation_test",
+ defaults: ["libkeystore_attestation_defaults"],
+ rustlibs: [
+ "libhex",
+ ],
+ test_suites: ["general-tests"],
+ auto_gen_config: true,
+ compile_multilib: "first",
+}