blob: 9966a70d20d10ab66214f3eb981e034d3fef1df9 [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/zircon/migrated_targets.gni")
source_set("crypto-entropy-src") {
sources = [ "entropy_pool.cc" ]
public = [ "include/lib/crypto/entropy_pool.h" ]
include_dirs = [ "include" ]
public_deps = [ "//zircon/kernel/lib/ktl" ]
deps = [
"//zircon/system/ulib/explicit-memory",
"//zircon/third_party/ulib/boringssl",
]
}
source_set("crypto-entropy-test") {
sources = [ "entropy_pool_test.cc" ]
include_dirs = [ "include" ]
deps = [
":crypto-entropy-src",
"//zircon/kernel/lib/unittest",
]
}
zx_library("crypto-entropy") {
public_deps = [ ":crypto-entropy-src" ]
deps = [ ":crypto-entropy-test" ]
}
zx_library("crypto") {
sources = [
"global_prng.cc",
"global_prng_unittest.cc",
"prng.cc",
"prng_unittest.cc",
]
deps = [
":crypto-entropy",
"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",
"//zircon/system/ulib/zbitl",
"//zircon/third_party/ulib/boringssl",
]
public_deps = [
# <lib/crypto/prng.h> has #include <ktl/atomic.h>.
"//zircon/kernel/lib/ktl:headers",
# lib/crypto/prng.h has #include <openssl/sha.h>.
"//zircon/third_party/ulib/boringssl:headers",
# <lib/crypto/entropy/jitterentropy_collector.h> has #include <lib/jitterentropy/jitterentropy.h>.
"//zircon/third_party/lib/jitterentropy:headers",
]
# TODO(https://fxbug.dev/58162): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
}