1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
|
# Copyright 2021 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//testing/libfuzzer/fuzzer_test.gni")
assert(is_chromeos, "Quick Pair protocols (e.g. Fast Pair) are ash-chrome only")
source_set("fast_pair_handshake") {
sources = [
"async_fast_pair_handshake_lookup_impl.cc",
"async_fast_pair_handshake_lookup_impl.h",
"fake_fast_pair_handshake.cc",
"fake_fast_pair_handshake.h",
"fake_fast_pair_handshake_lookup.cc",
"fake_fast_pair_handshake_lookup.h",
"fast_pair_data_encryptor.h",
"fast_pair_data_encryptor_impl.cc",
"fast_pair_data_encryptor_impl.h",
"fast_pair_encryption.cc",
"fast_pair_encryption.h",
"fast_pair_gatt_service_client.h",
"fast_pair_gatt_service_client_impl.cc",
"fast_pair_gatt_service_client_impl.h",
"fast_pair_gatt_service_client_lookup.cc",
"fast_pair_gatt_service_client_lookup.h",
"fast_pair_gatt_service_client_lookup_impl.cc",
"fast_pair_gatt_service_client_lookup_impl.h",
"fast_pair_handshake.cc",
"fast_pair_handshake.h",
"fast_pair_handshake_impl.cc",
"fast_pair_handshake_impl.h",
"fast_pair_handshake_impl_new.cc",
"fast_pair_handshake_impl_new.h",
"fast_pair_handshake_lookup.cc",
"fast_pair_handshake_lookup.h",
"fast_pair_handshake_lookup_impl.cc",
"fast_pair_handshake_lookup_impl.h",
"fast_pair_key_pair.cc",
"fast_pair_key_pair.h",
]
deps = [
"//ash/public/cpp",
"//ash/quick_pair/common",
"//ash/quick_pair/proto:fastpair_proto",
"//ash/quick_pair/repository",
"//base",
"//chromeos/ash/services/quick_pair",
"//chromeos/ash/services/quick_pair/public/cpp",
"//components/cross_device/logging:logging",
"//crypto:crypto",
"//device/bluetooth",
"//third_party/protobuf:protobuf_lite",
]
}
static_library("test_support") {
testonly = true
sources = [
"fake_fast_pair_data_encryptor.cc",
"fake_fast_pair_data_encryptor.h",
"fake_fast_pair_gatt_service_client.cc",
"fake_fast_pair_gatt_service_client.h",
"fake_fast_pair_handshake.cc",
"fake_fast_pair_handshake.h",
"fast_pair_data_encryptor.h",
"fast_pair_gatt_service_client.h",
"fast_pair_handshake.h",
"fast_pair_handshake_lookup.h",
]
deps = [
"//ash/quick_pair/common",
"//base",
"//base/test:test_support",
"//chromeos/ash/services/quick_pair/public/cpp",
"//device/bluetooth",
"//testing/gtest",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"async_fast_pair_handshake_lookup_impl_unittest.cc",
"fast_pair_data_encryptor_impl_unittest.cc",
"fast_pair_encryption_unittest.cc",
"fast_pair_gatt_service_client_impl_unittest.cc",
"fast_pair_handshake_impl_new_unittest.cc",
"fast_pair_handshake_impl_unittest.cc",
]
deps = [
":fast_pair_handshake",
":test_support",
"//ash/constants:constants",
"//ash/quick_pair/common",
"//ash/quick_pair/common:test_support",
"//ash/quick_pair/repository:test_support",
"//base",
"//base/test:test_support",
"//chromeos/ash/services/quick_pair",
"//chromeos/ash/services/quick_pair:test_support",
"//chromeos/ash/services/quick_pair/public/cpp",
"//device/bluetooth",
"//device/bluetooth:mocks",
"//testing/gtest",
]
}
fuzzer_test("fast_pair_encryption_fuzzer") {
sources = [ "fast_pair_encryption_fuzzer.cc" ]
deps = [
":fast_pair_handshake",
"//ash:test_support",
"//ash/quick_pair/common",
"//base",
"//chromeos/ash/services/quick_pair",
]
}
|