1// 2// Copyright (C) 2018 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 // See: http://go/android-license-faq 19 // A large-scale-change added 'default_applicable_licenses' to import 20 // all of the 'license_kinds' from "external_avb_license" 21 // to get the below license kinds: 22 // SPDX-license-identifier-Apache-2.0 23 // SPDX-license-identifier-MIT 24 default_applicable_licenses: ["external_avb_license"], 25} 26 27python_test_host { 28 name: "at_auth_unlock_unittest", 29 main: "at_auth_unlock_unittest.py", 30 srcs: [ 31 "at_auth_unlock_unittest.py", 32 ], 33 libs: [ 34 "at_auth_unlock", 35 ], 36 data: [ 37 "data/cert_pik_certificate.bin", 38 "data/cert_puk_certificate.bin", 39 "data/cert_unlock_challenge.bin", 40 "data/cert_unlock_credential.bin", 41 "data/testkey_cert_puk.pem", 42 ], 43 test_config: "at_auth_unlock_unittest.xml", 44} 45 46filegroup { 47 name: "avb_testkey_rsa8192", 48 srcs: ["data/testkey_rsa8192.pem"], 49} 50 51filegroup { 52 name: "avb_testkey_rsa4096", 53 srcs: ["data/testkey_rsa4096.pem"], 54} 55 56filegroup { 57 name: "avb_testkey_rsa2048", 58 srcs: ["data/testkey_rsa2048.pem"], 59} 60 61// libavb_cert test public key. 62filegroup { 63 name: "avb_cert_testkey_psk", 64 srcs: ["data/testkey_cert_psk.pem"], 65} 66 67// libavb_cert test public key metadata. PSK and PIK versions are both set to 42. 68filegroup { 69 name: "avb_cert_test_metadata", 70 srcs: ["data/cert_metadata.bin"], 71} 72 73// libavb_cert test permanent attributes for the above public key. 74filegroup { 75 name: "avb_cert_test_permanent_attributes", 76 srcs: ["data/cert_permanent_attributes.bin"], 77} 78 79// libavb_cert test RNG for an unlock challenge. 80// Note: this is only the 16-byte randomization, not a full 81// `AvbCertUnlockChallenge`. 82filegroup { 83 name: "avb_cert_test_unlock_challenge", 84 srcs: ["data/cert_unlock_challenge.bin"], 85} 86 87// libavb_cert test unlock credential signing `avb_cert_test_unlock_challenge`. 88filegroup { 89 name: "avb_cert_test_unlock_credential", 90 srcs: ["data/cert_unlock_credential.bin"], 91} 92 93genrule { 94 name: "avb_testkey_rsa2048_pub_bin", 95 tools: ["avbtool"], 96 srcs: [":avb_testkey_rsa2048"], 97 out: ["data/testkey_rsa2048_pub.bin"], 98 cmd: "$(location avbtool) extract_public_key --key $(in) --output $(out)", 99} 100 101genrule { 102 name: "avb_testkey_rsa4096_pub_bin", 103 tools: ["avbtool"], 104 srcs: [":avb_testkey_rsa4096"], 105 out: ["data/testkey_rsa4096_pub.bin"], 106 cmd: "$(location avbtool) extract_public_key --key $(in) --output $(out)", 107} 108 109genrule { 110 name: "avb_testkey_rsa8192_pub_bin", 111 tools: ["avbtool"], 112 srcs: [":avb_testkey_rsa8192"], 113 out: ["data/testkey_rsa8192_pub.bin"], 114 cmd: "$(location avbtool) extract_public_key --key $(in) --output $(out)", 115} 116