| # 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") |
| |
| config("includes") { |
| include_dirs = [ "include" ] |
| } |
| |
| source_set("crypto-entropy-src") { |
| sources = [ "entropy_pool.cc" ] |
| public = [ "include/lib/crypto/entropy_pool.h" ] |
| public_deps = [ "//zircon/kernel/lib/ktl" ] |
| deps = [ |
| "boringssl", |
| "//zircon/kernel/lib/libc", |
| "//zircon/system/ulib/explicit-memory", |
| ] |
| public_configs = [ ":includes" ] |
| } |
| |
| source_set("crypto-entropy-test") { |
| sources = [ "entropy_pool_test.cc" ] |
| include_dirs = [ "include" ] |
| deps = [ |
| ":crypto-entropy-src", |
| "//zircon/kernel/lib/libc", |
| "//zircon/kernel/lib/unittest", |
| ] |
| } |
| |
| zx_library("crypto") { |
| 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", |
| ] |
| public_deps = [ |
| # <lib/crypto/prng.h> has #include <ktl/atomic.h>. |
| "//zircon/kernel/lib/ktl:headers", |
| |
| # <lib/crypto/entropy/jitterentropy_collector.h> has #include <lib/jitterentropy/jitterentropy.h>. |
| "//zircon/third_party/lib/jitterentropy:headers", |
| ] |
| } |