1//
2// Copyright (C) 2020 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
16cc_binary_host {
17    name: "secure_env",
18    srcs: [
19        "composite_serialization.cpp",
20        "encrypted_serializable.cpp",
21        "gatekeeper_responder.cpp",
22        "hmac_serializable.cpp",
23        "in_process_tpm.cpp",
24        "keymaster_responder.cpp",
25        "secure_env.cpp",
26        "tpm_attestation_record.cpp",
27        "tpm_auth.cpp",
28        "tpm_commands.cpp",
29        "tpm_encrypt_decrypt.cpp",
30        "tpm_hmac.cpp",
31        "tpm_key_blob_maker.cpp",
32        "tpm_keymaster_context.cpp",
33        "tpm_random_source.cpp",
34        "tpm_resource_manager.cpp",
35        "tpm_serialize.cpp",
36    ],
37    shared_libs: [
38        "libbase",
39        "libcuttlefish_fs",
40        "libcuttlefish_security",
41        "libcuttlefish_utils",
42        "libgatekeeper",
43        "libkeymaster_portable",
44        "libkeymaster_messages",
45        "libsoft_attestation_cert",
46        "liblog",
47        "libcrypto",
48        "libcutils",
49        "libpuresoftkeymasterdevice_host",
50        "ms-tpm-20-ref-lib",
51        "tpm2-tss2-esys",
52        "tpm2-tss2-mu",
53        "tpm2-tss2-rc",
54    ],
55    static_libs: [
56        "libcuttlefish_host_config",
57        "libgflags",
58        "libjsoncpp",
59        "libscrypt_static",
60    ],
61    defaults: ["cuttlefish_host_only"],
62    cflags: [
63        "-fno-rtti", // Required for libkeymaster_portable
64    ],
65}
66