blob: 9e0ca33f38d43361d4b72bfe825a1cd8b55fda6f [file] [log] [blame]
# Copyright 2019 The Fuchsia Authors
#
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/MIT
import("//build/cpp/library_headers.gni")
library_headers("headers") {
headers = [
"lib/crypto/global_prng.h",
"lib/crypto/prng.h",
]
public_deps = [
":crypto-entropy-src.headers",
"entropy:headers",
# <lib/crypto/prng.h> has #include <ktl/atomic.h>.
"//zircon/kernel/lib/ktl:headers",
]
}
library_headers("crypto-entropy-src.headers") {
headers = [ "lib/crypto/entropy_pool.h" ]
}
source_set("crypto-entropy-src") {
sources = [ "entropy_pool.cc" ]
public_deps = [ ":crypto-entropy-src.headers" ]
deps = [
"boringssl",
"//zircon/kernel/lib/ktl",
"//zircon/kernel/lib/libc",
"//zircon/system/ulib/explicit-memory",
]
}
source_set("crypto-entropy-test") {
sources = [ "entropy_pool_test.cc" ]
include_dirs = [ "include" ]
deps = [
":crypto-entropy-src",
"//zircon/kernel/lib/ktl",
"//zircon/kernel/lib/libc",
"//zircon/kernel/lib/unittest",
]
}
static_library("crypto") {
public_deps = [ ":headers" ]
sources = [
"global_prng.cc",
"global_prng_unittest.cc",
"prng.cc",
"prng_unittest.cc",
]
deps = [
":crypto-entropy-src",
":crypto-entropy-test",
"boringssl",
"entropy",
"//zircon/kernel/lib/boot-options",
"//zircon/kernel/lib/fbl",
"//zircon/kernel/lib/init",
"//zircon/kernel/lib/ktl",
"//zircon/kernel/lib/unittest",
"//zircon/kernel/phys:handoff",
"//zircon/system/ulib/explicit-memory",
]
}