| Index: net/tools/transport_security_state_generator/BUILD.gn
|
| diff --git a/net/tools/transport_security_state_generator/BUILD.gn b/net/tools/transport_security_state_generator/BUILD.gn
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..386b95299bafe2ff640f54d0c42ff7cc60068fa5
|
| --- /dev/null
|
| +++ b/net/tools/transport_security_state_generator/BUILD.gn
|
| @@ -0,0 +1,93 @@
|
| +# Copyright (c) 2017 The Chromium 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/compiled_action.gni")
|
| +import("//net/features.gni")
|
| +
|
| +if (host_toolchain == current_toolchain) {
|
| + source_set("transport_security_state_generator_sources") {
|
| + sources = [
|
| + "bit_writer.cc",
|
| + "bit_writer.h",
|
| + "cert_util.cc",
|
| + "cert_util.h",
|
| + "huffman/huffman_builder.cc",
|
| + "huffman/huffman_builder.h",
|
| + "input_file_parsers.cc",
|
| + "input_file_parsers.h",
|
| + "pinset.cc",
|
| + "pinset.h",
|
| + "pinsets.cc",
|
| + "pinsets.h",
|
| + "preloaded_state_generator.cc",
|
| + "preloaded_state_generator.h",
|
| + "spki_hash.cc",
|
| + "spki_hash.h",
|
| + "transport_security_state_entry.cc",
|
| + "transport_security_state_entry.h",
|
| + "trie/trie_bit_buffer.cc",
|
| + "trie/trie_bit_buffer.h",
|
| + "trie/trie_writer.cc",
|
| + "trie/trie_writer.h",
|
| + ]
|
| + deps = [
|
| + "//base",
|
| + "//third_party/boringssl",
|
| + ]
|
| + }
|
| +
|
| + source_set("transport_security_state_generator_test_sources") {
|
| + testonly = true
|
| + sources = [
|
| + "bit_writer_unittest.cc",
|
| + "cert_util_unittest.cc",
|
| + "huffman/huffman_builder_unittest.cc",
|
| + "input_file_parsers_unittest.cc",
|
| + "spki_hash_unittest.cc",
|
| + "trie/trie_bit_buffer_unittest.cc",
|
| + "trie/trie_writer_unittest.cc",
|
| + ]
|
| + deps = [
|
| + ":transport_security_state_generator_sources",
|
| + "//base",
|
| + "//base/test:test_support",
|
| + "//testing/gmock",
|
| + "//testing/gtest",
|
| + "//third_party/boringssl",
|
| + ]
|
| + }
|
| +
|
| + executable("transport_security_state_generator") {
|
| + sources = [
|
| + "transport_security_state_generator.cc",
|
| + ]
|
| + deps = [
|
| + ":transport_security_state_generator_sources",
|
| + "//base",
|
| + "//crypto",
|
| + "//third_party/boringssl",
|
| + ]
|
| + }
|
| +}
|
| +
|
| +compiled_action_foreach("generate_test_data") {
|
| + tool = ":transport_security_state_generator"
|
| + sources = [
|
| + "../../http/transport_security_state_static_unittest1.json",
|
| + "../../http/transport_security_state_static_unittest2.json",
|
| + "../../http/transport_security_state_static_unittest3.json",
|
| + ]
|
| +
|
| + # Inputs in order expected by the command line of the tool.
|
| + inputs = [
|
| + "../../http/transport_security_state_static_unittest.pins",
|
| + "resources/transport_security_state_static_unittest.template",
|
| + ]
|
| + outputs = [
|
| + "$target_gen_dir/../../http/{{source_name_part}}.h",
|
| + ]
|
| + args =
|
| + [ rebase_path("../../http/{{source_name_part}}.json", root_build_dir) ] +
|
| + rebase_path(inputs, root_build_dir) + rebase_path(outputs, root_build_dir)
|
| +}
|
|
|