| # 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") { |
| include_dir = "../include" |
| headers = [ |
| "lib/crypto/entropy/collector.h", |
| "lib/crypto/entropy/hw_rng_collector.h", |
| "lib/crypto/entropy/jitterentropy_collector.h", |
| "lib/crypto/entropy/quality_test.h", |
| ] |
| |
| public_deps = [ |
| # <lib/crypto/entropy/collector.h> has #include <fbl/name.h> |
| "//zircon/kernel/lib/fbl:headers", |
| |
| # <lib/crypto/entropy/jitterentropy_collector.h> has #include #include <lib/lazy_init/lazy_init.h> |
| "//zircon/system/ulib/lazy_init:headers", |
| |
| # <lib/crypto/entropy/jitterentropy_collector.h> has #include <lib/jitterentropy/jitterentropy.h> |
| "//zircon/third_party/lib/jitterentropy:headers", |
| ] |
| } |
| |
| static_library("entropy") { |
| public_deps = [ ":headers" ] |
| sources = [ |
| "collector.cc", |
| "hw_rng_collector.cc", |
| "jitterentropy_collector.cc", |
| "quality_test.cc", |
| ] |
| deps = [ |
| "//zircon/kernel/dev/hw_rng", |
| "//zircon/kernel/lib/boot-options", |
| "//zircon/kernel/lib/crypto:headers", |
| "//zircon/kernel/lib/fbl", |
| "//zircon/kernel/lib/init", |
| "//zircon/kernel/lib/ktl", |
| "//zircon/kernel/lib/unittest", |
| "//zircon/system/ulib/lazy_init", |
| "//zircon/third_party/lib/jitterentropy", |
| ] |
| } |
| |
| source_set("kernel-tests") { |
| # TODO: testonly = true |
| sources = [ "collector_unittest.cc" ] |
| deps = [ |
| ":entropy", |
| "//zircon/kernel/lib/unittest", |
| ] |
| } |