blob: 913a810e2a72bcd149ba51eeb468bfcead4bcea7 [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.
import("//build/fuzzing/fuzzer.gni")
import("//build/test.gni")
import("//src/sys/build/fuchsia_unittest_package.gni")
group("tests") {
testonly = true
deps = [
":fcrypto-fuzzers",
":fcrypto-test-pkg",
]
}
test("fcrypto") {
output_name = "fcrypto-test"
if (is_fuchsia) {
fdio_config = [ "//build/config/fuchsia:fdio_config" ]
if (configs + fdio_config - fdio_config != configs) {
configs -= fdio_config
}
}
sources = [
"aead.cc",
"bytes.cc",
"cipher.cc",
"hkdf.cc",
"hmac.cc",
"secret.cc",
"utils.cc",
]
deps = [
"//sdk/lib/fdio",
"//src/security/fcrypto",
"//zircon/public/lib/fbl",
"//zircon/public/lib/zxtest",
]
}
fuzzer("hmac-fuzzer") {
sources = [ "hmac-fuzzer.cc" ]
deps = [
"//src/security/fcrypto",
"//zircon/public/lib/fbl",
]
}
fuzzers_package("fcrypto-fuzzers") {
cpp_fuzzers = [ ":hmac-fuzzer" ]
}
fuchsia_unittest_package("fcrypto-test-pkg") {
package_name = "fcrypto-test"
deps = [ ":fcrypto" ]
}