blob: 2e51dc1998b1ead49346beb68ace6d2d001df688 [file] [log] [blame]
# Copyright 2019 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.
static_library("zxcrypt-dev") {
public = [
"ddk-volume.h",
"volume.h",
]
sources = [
"ddk-volume.cc",
"volume.cc",
]
public_deps = [
# volume.h references crypto/aead.h (among others).
"//src/security/lib/fcrypto",
# ddk-volume.h has #include <ddk/device.h>.
"//src/lib/ddk",
]
configs += [ "//build/config/fuchsia:integer-paranoia" ]
# To minimize the set of libraries that we depend on that need to be loaded
# from /boot/lib in early boot, we statically link most of our dependencies.
deps = [
"//sdk/banjo/fuchsia.hardware.block.volume:fuchsia.hardware.block.volume_banjo_cpp",
"//sdk/fidl/fuchsia.hardware.block.driver:fuchsia.hardware.block.driver_banjo_cpp",
"//src/lib/ddk",
"//third_party/boringssl",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/sync",
"//zircon/system/ulib/zircon-internal",
"//zircon/system/ulib/zx",
]
configs += [ "//build/config/fuchsia:static_cpp_standard_library" ]
}
shared_library("zxcrypt-fdio") {
public = [
"fdio-volume.h",
"volume.h",
]
sources = [
"fdio-volume.cc",
"volume.cc",
]
public_deps = [
# volume.h includes crypto/aead.h (among others).
"//src/security/lib/fcrypto",
]
configs += [ "//build/config/fuchsia:integer-paranoia" ]
deps = [
"//sdk/fidl/fuchsia.hardware.block:fuchsia.hardware.block_cpp",
"//sdk/fidl/fuchsia.hardware.block.encrypted:fuchsia.hardware.block.encrypted_cpp",
"//sdk/fidl/fuchsia.hardware.block.volume:fuchsia.hardware.block.volume_cpp",
"//sdk/lib/component/incoming/cpp",
"//sdk/lib/fdio",
"//src/storage/lib/block_client/cpp",
"//third_party/boringssl",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/fdio-caller",
"//zircon/system/ulib/fzl",
"//zircon/system/ulib/zircon-internal",
"//zircon/system/ulib/zx",
]
configs += [ "//build/config/fuchsia:static_cpp_standard_library" ]
}
source_set("zxcrypt-client") {
public = [ "client.h" ]
sources = [ "client.cc" ]
public_deps = [
# client.h has #include <lib/fdio/cpp/caller.h>
"//zircon/system/ulib/fdio-caller",
# client.h has #include <fidl/fuchsia.hardware.block.encrypted/cpp/wire.h>
"//sdk/fidl/fuchsia.hardware.block.encrypted:fuchsia.hardware.block.encrypted_cpp",
]
deps = [
"//sdk/fidl/fuchsia.device:fuchsia.device_cpp",
"//sdk/lib/device-watcher/cpp",
"//sdk/lib/fdio",
"//src/security/lib/kms-stateless",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/fdio-caller",
"//zircon/system/ulib/fzl",
"//zircon/system/ulib/zircon-internal",
"//zircon/system/ulib/zx",
]
configs += [ "//build/config/fuchsia:static_cpp_standard_library" ]
}
group("tests") {
testonly = true
deps = [ "tests:zxcrypt-test" ]
}