blob: 95e3b1ba7e7ebf64ebbfb556a22ee6e6abde87f3 [file] [log] [blame]
# Copyright 2018 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config.gni")
import("//build/rust/rustc_binary.gni")
import("//src/sys/build/components.gni")
group("tests") {
testonly = true
deps = [ ":kms_tests" ]
}
rustc_binary("bin") {
name = "kms"
edition = "2018"
with_unit_tests = true
deps = [
"//sdk/fidl/fuchsia.kms:fuchsia.kms-rustc",
"//sdk/fidl/fuchsia.mem:fuchsia.mem-rustc",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/mundane:mundane",
"//src/lib/syslog/rust:syslog",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/boringssl/rust/boringssl-sys",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:base64",
"//third_party/rust_crates:bincode",
"//third_party/rust_crates:byteorder",
"//third_party/rust_crates:bytes",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:libc",
"//third_party/rust_crates:log",
"//third_party/rust_crates:rand",
"//third_party/rust_crates:rust-crypto",
"//third_party/rust_crates:serde",
"//third_party/rust_crates:serde_json",
"//third_party/rust_crates:tempfile",
"//third_party/rust_crates:thiserror",
]
non_rust_deps = [ "//src/security/tee/tee-client-api" ]
sources = [
"src/common.rs",
"src/crypto_provider/mock_provider.rs",
"src/crypto_provider/mod.rs",
"src/crypto_provider/mundane_provider.rs",
"src/crypto_provider/optee_provider/boringssl_wrapper.rs",
"src/crypto_provider/optee_provider/keysafe.rs",
"src/crypto_provider/optee_provider/mod.rs",
"src/crypto_provider/software_provider.rs",
"src/key_manager.rs",
"src/kms_asymmetric_key.rs",
"src/kms_sealing_key.rs",
"src/main.rs",
"src/tee/mod.rs",
"src/tee/tee_client_api.rs",
]
}
fuchsia_package_with_single_component("kms") {
manifest = "meta/key_manager.cmx"
deps = [ ":bin" ]
}
fuchsia_unittest_package("kms_tests") {
manifest = "meta/kms_bin_test.cmx"
deps = [ ":bin_test" ]
}
config_data("optee_provider_config") {
sources = [ "config/optee_provider_config.json" ]
for_pkg = "kms"
outputs = [ "crypto_provider_config.json" ]
}
config_data("optee_provider_test_config") {
sources = [ "config/optee_provider_config.json" ]
for_pkg = "kms_test_client_pkg"
outputs = [ "crypto_provider_config.json" ]
}