| # 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/package.gni") |
| import("//build/rust/rustc_binary.gni") |
| import("//build/test/test_package.gni") |
| import("//build/testing/environments.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", |
| "//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", |
| "//zircon/system/fidl/fuchsia-mem:fuchsia-mem-rustc", |
| ] |
| |
| non_rust_deps = [ "//zircon/system/ulib/tee-client-api" ] |
| } |
| |
| package("kms") { |
| deps = [ ":bin" ] |
| |
| binary = "kms" |
| |
| meta = [ |
| { |
| path = rebase_path("meta/key_manager.cmx") |
| dest = "key_manager.cmx" |
| }, |
| ] |
| } |
| |
| test_package("kms_tests") { |
| deps = [ ":bin_test" ] |
| tests = [ |
| { |
| name = "kms_bin_test" |
| dest = "kms_bin_test" |
| environments = basic_envs |
| }, |
| ] |
| } |
| |
| 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" ] |
| } |