| # Copyright 2021 The ChromiumOS Authors | |
| # Use of this source code is governed by a BSD-style license that can be | |
| # found in the LICENSE file. | |
| import("//common-mk/pkg_config.gni") | |
| import("//common-mk/proto_library.gni") | |
| pkg_config("target_defaults") { | |
| pkg_deps = [ | |
| "libbrillo", | |
| "libchrome", | |
| "openssl", | |
| ] | |
| if (use.fuzzer) { | |
| pkg_deps += [ "protobuf" ] | |
| } else { | |
| pkg_deps += [ "protobuf-lite" ] | |
| } | |
| } | |
| static_library("encryption_module_interface") { | |
| sources = [ "encryption_module_interface.cc" ] | |
| configs += [ ":target_defaults" ] | |
| deps = [ | |
| "//missive/proto:libmissiveprotorecord", | |
| "//missive/util:dynamic_flag", | |
| "//missive/util:status", | |
| ] | |
| } | |
| static_library("primitives") { | |
| sources = [ "primitives.cc" ] | |
| configs += [ ":target_defaults" ] | |
| } | |
| static_library("testing_primitives") { | |
| sources = [ "testing_primitives.cc" ] | |
| configs += [ ":target_defaults" ] | |
| deps = [ ":primitives" ] | |
| } | |
| static_library("encryption_module") { | |
| sources = [ "encryption_module.cc" ] | |
| configs += [ ":target_defaults" ] | |
| deps = [ | |
| ":encryption", | |
| ":encryption_module_interface", | |
| "//missive/proto:libmissiveprotorecord", | |
| "//missive/util:status", | |
| ] | |
| } | |
| static_library("encryption") { | |
| sources = [ "encryption.cc" ] | |
| configs += [ ":target_defaults" ] | |
| deps = [ | |
| ":primitives", | |
| "//missive/proto:libmissiveprotorecord", | |
| "//missive/util:status", | |
| ] | |
| } | |
| static_library("decryption") { | |
| sources = [ "decryption.cc" ] | |
| configs += [ ":target_defaults" ] | |
| deps = [ | |
| ":encryption", | |
| ":primitives", | |
| ":testing_primitives", | |
| "//missive/proto:libmissiveprotorecord", | |
| "//missive/util:status", | |
| ] | |
| } | |
| static_library("verification") { | |
| sources = [ "verification.cc" ] | |
| configs += [ ":target_defaults" ] | |
| deps = [ | |
| ":primitives", | |
| "//missive/util:status", | |
| ] | |
| } | |
| static_library("encryption_test_support") { | |
| sources = [ "test_encryption_module.cc" ] | |
| configs += [ ":target_defaults" ] | |
| deps = [ | |
| ":decryption", | |
| ":encryption", | |
| ":encryption_module", | |
| ":encryption_module_interface", | |
| ":primitives", | |
| ":testing_primitives", | |
| ":verification", | |
| "//missive/proto:libmissiveprotorecord", | |
| "//missive/util:status", | |
| "//missive/util:status_macros", | |
| ] | |
| } | |
| source_set("unit_tests") { | |
| sources = [ | |
| "encryption_module_test.cc", | |
| "encryption_test.cc", | |
| "verification_test.cc", | |
| ] | |
| deps = [ | |
| ":encryption", | |
| ":encryption_module", | |
| ":encryption_module_interface", | |
| ":encryption_test_support", | |
| ":primitives", | |
| ":testing_primitives", | |
| ":verification", | |
| "//missive/proto:libmissiveprotorecord", | |
| "//missive/util:status", | |
| "//missive/util:status_macros", | |
| "//missive/util:test_callbacks_support", | |
| ] | |
| configs += [ ":target_defaults" ] | |
| } |