blob: d03f59bdf543a314ac3783923b77d13f68cd1b58 [file] [log] [blame]
# Copyright 2018 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("//services/service_manager/public/service_manifest.gni")
assert(is_chromeos, "Non-ChromeOS builds cannot depend on //chromeos")
static_library("secure_channel") {
sources = [
"active_connection_manager.cc",
"active_connection_manager.h",
"active_connection_manager_impl.cc",
"active_connection_manager_impl.h",
"authenticated_channel.cc",
"authenticated_channel.h",
"authenticated_channel_impl.cc",
"authenticated_channel_impl.h",
"authenticator.cc",
"authenticator.h",
"background_eid_generator.cc",
"background_eid_generator.h",
"ble_advertisement_generator.cc",
"ble_advertisement_generator.h",
"ble_advertiser.cc",
"ble_advertiser.h",
"ble_advertiser_impl.cc",
"ble_advertiser_impl.h",
"ble_characteristics_finder.cc",
"ble_characteristics_finder.h",
"ble_connection_manager.cc",
"ble_connection_manager.h",
"ble_connection_manager_impl.cc",
"ble_connection_manager_impl.h",
"ble_constants.h",
"ble_initiator_connection_attempt.cc",
"ble_initiator_connection_attempt.h",
"ble_initiator_failure_type.cc",
"ble_initiator_failure_type.h",
"ble_initiator_operation.cc",
"ble_initiator_operation.h",
"ble_listener_connection_attempt.cc",
"ble_listener_connection_attempt.h",
"ble_listener_failure_type.cc",
"ble_listener_failure_type.h",
"ble_listener_operation.cc",
"ble_listener_operation.h",
"ble_scanner.cc",
"ble_scanner.h",
"ble_scanner_impl.cc",
"ble_scanner_impl.h",
"ble_service_data_helper.cc",
"ble_service_data_helper.h",
"ble_service_data_helper_impl.cc",
"ble_service_data_helper_impl.h",
"ble_synchronizer.cc",
"ble_synchronizer.h",
"ble_synchronizer_base.cc",
"ble_synchronizer_base.h",
"ble_weave_client_connection.cc",
"ble_weave_client_connection.h",
"ble_weave_defines.h",
"ble_weave_packet_generator.cc",
"ble_weave_packet_generator.h",
"ble_weave_packet_receiver.cc",
"ble_weave_packet_receiver.h",
"channel_impl.cc",
"channel_impl.h",
"client_connection_parameters.cc",
"client_connection_parameters.h",
"client_connection_parameters_impl.cc",
"client_connection_parameters_impl.h",
"connect_to_device_operation.h",
"connect_to_device_operation_base.h",
"connection.cc",
"connection.h",
"connection_attempt.h",
"connection_attempt_base.h",
"connection_attempt_delegate.h",
"connection_attempt_details.cc",
"connection_attempt_details.h",
"connection_details.cc",
"connection_details.h",
"connection_medium.cc",
"connection_medium.h",
"connection_observer.h",
"connection_role.cc",
"connection_role.h",
"data_with_timestamp.cc",
"data_with_timestamp.h",
"device_id_pair.cc",
"device_id_pair.h",
"device_to_device_authenticator.cc",
"device_to_device_authenticator.h",
"device_to_device_initiator_helper.cc",
"device_to_device_initiator_helper.h",
"device_to_device_secure_context.cc",
"device_to_device_secure_context.h",
"error_tolerant_ble_advertisement.cc",
"error_tolerant_ble_advertisement.h",
"error_tolerant_ble_advertisement_impl.cc",
"error_tolerant_ble_advertisement_impl.h",
"foreground_eid_generator.cc",
"foreground_eid_generator.h",
"latency_metrics_logger.cc",
"latency_metrics_logger.h",
"multiplexed_channel.cc",
"multiplexed_channel.h",
"multiplexed_channel_impl.cc",
"multiplexed_channel_impl.h",
"pending_ble_connection_request_base.h",
"pending_ble_initiator_connection_request.cc",
"pending_ble_initiator_connection_request.h",
"pending_ble_listener_connection_request.cc",
"pending_ble_listener_connection_request.h",
"pending_connection_manager.cc",
"pending_connection_manager.h",
"pending_connection_manager_impl.cc",
"pending_connection_manager_impl.h",
"pending_connection_request.h",
"pending_connection_request_base.h",
"pending_connection_request_delegate.cc",
"pending_connection_request_delegate.h",
"raw_eid_generator.h",
"raw_eid_generator_impl.cc",
"raw_eid_generator_impl.h",
"remote_attribute.h",
"secure_channel.cc",
"secure_channel.h",
"secure_channel_base.cc",
"secure_channel_base.h",
"secure_channel_disconnector.h",
"secure_channel_disconnector_impl.cc",
"secure_channel_disconnector_impl.h",
"secure_channel_impl.cc",
"secure_channel_impl.h",
"secure_channel_initializer.cc",
"secure_channel_initializer.h",
"secure_channel_service.cc",
"secure_channel_service.h",
"secure_context.h",
"session_keys.cc",
"session_keys.h",
"shared_resource_scheduler.cc",
"shared_resource_scheduler.h",
"single_client_message_proxy.cc",
"single_client_message_proxy.h",
"single_client_message_proxy_impl.cc",
"single_client_message_proxy_impl.h",
"timer_factory.h",
"timer_factory_impl.cc",
"timer_factory_impl.h",
"wire_message.cc",
"wire_message.h",
]
deps = [
"//base",
"//chromeos",
"//chromeos/components/multidevice",
"//chromeos/components/proximity_auth/logging",
"//chromeos/services/secure_channel/public/cpp/shared",
"//chromeos/services/secure_channel/public/mojom",
"//components/cryptauth:secure_message",
"//crypto",
"//device/bluetooth",
"//services/service_manager/public/cpp",
"//services/service_manager/public/mojom",
]
}
service_manifest("manifest") {
name = "secure_channel"
source = "manifest.json"
}
static_library("test_support") {
testonly = true
sources = [
"device_to_device_responder_operations.cc",
"device_to_device_responder_operations.h",
"fake_active_connection_manager.cc",
"fake_active_connection_manager.h",
"fake_authenticated_channel.cc",
"fake_authenticated_channel.h",
"fake_authenticator.cc",
"fake_authenticator.h",
"fake_background_eid_generator.cc",
"fake_background_eid_generator.h",
"fake_ble_advertisement_generator.cc",
"fake_ble_advertisement_generator.h",
"fake_ble_advertiser.cc",
"fake_ble_advertiser.h",
"fake_ble_connection_manager.cc",
"fake_ble_connection_manager.h",
"fake_ble_scanner.cc",
"fake_ble_scanner.h",
"fake_ble_service_data_helper.cc",
"fake_ble_service_data_helper.h",
"fake_ble_synchronizer.cc",
"fake_ble_synchronizer.h",
"fake_channel.cc",
"fake_channel.h",
"fake_client_connection_parameters.cc",
"fake_client_connection_parameters.h",
"fake_connect_to_device_operation.h",
"fake_connection.cc",
"fake_connection.h",
"fake_connection_attempt.h",
"fake_connection_attempt_delegate.cc",
"fake_connection_attempt_delegate.h",
"fake_connection_delegate.cc",
"fake_connection_delegate.h",
"fake_error_tolerant_ble_advertisement.cc",
"fake_error_tolerant_ble_advertisement.h",
"fake_message_receiver.cc",
"fake_message_receiver.h",
"fake_multiplexed_channel.cc",
"fake_multiplexed_channel.h",
"fake_one_shot_timer.cc",
"fake_one_shot_timer.h",
"fake_pending_connection_manager.cc",
"fake_pending_connection_manager.h",
"fake_pending_connection_request.h",
"fake_pending_connection_request_delegate.cc",
"fake_pending_connection_request_delegate.h",
"fake_secure_channel.cc",
"fake_secure_channel.h",
"fake_secure_channel_connection.cc",
"fake_secure_channel_connection.h",
"fake_secure_channel_disconnector.cc",
"fake_secure_channel_disconnector.h",
"fake_secure_context.cc",
"fake_secure_context.h",
"fake_single_client_message_proxy.cc",
"fake_single_client_message_proxy.h",
"fake_timer_factory.cc",
"fake_timer_factory.h",
"fake_wire_message.cc",
"fake_wire_message.h",
"mock_foreground_eid_generator.cc",
"mock_foreground_eid_generator.h",
]
deps = [
":secure_channel",
"//base",
"//base/test:test_support",
"//chromeos/components/multidevice",
"//chromeos/components/proximity_auth/logging",
"//chromeos/services/secure_channel/public/cpp/shared",
"//chromeos/services/secure_channel/public/mojom",
"//components/cryptauth:secure_message",
"//device/bluetooth",
"//testing/gmock",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"active_connection_manager_impl_unittest.cc",
"authenticated_channel_impl_unittest.cc",
"background_eid_generator_unittest.cc",
"ble_advertisement_generator_unittest.cc",
"ble_advertiser_impl_unittest.cc",
"ble_characteristics_finder_unittest.cc",
"ble_connection_manager_impl_unittest.cc",
"ble_initiator_operation_unittest.cc",
"ble_listener_operation_unittest.cc",
"ble_scanner_impl_unittest.cc",
"ble_service_data_helper_impl_unittest.cc",
"ble_synchronizer_unittest.cc",
"ble_weave_client_connection_unittest.cc",
"ble_weave_packet_generator_unittest.cc",
"ble_weave_packet_receiver_unittest.cc",
"client_connection_parameters_impl_unittest.cc",
"connect_to_device_operation_base_unittest.cc",
"connection_attempt_base_unittest.cc",
"connection_unittest.cc",
"device_to_device_authenticator_unittest.cc",
"device_to_device_operations_unittest.cc",
"device_to_device_secure_context_unittest.cc",
"error_tolerant_ble_advertisement_impl_unittest.cc",
"foreground_eid_generator_unittest.cc",
"multiplexed_channel_impl_unittest.cc",
"pending_ble_connection_request_base_unittest.cc",
"pending_ble_initiator_connection_request_unittest.cc",
"pending_ble_listener_connection_request_unittest.cc",
"pending_connection_manager_impl_unittest.cc",
"pending_connection_request_base_unittest.cc",
"raw_eid_generator_impl_unittest.cc",
"secure_channel_disconnector_impl_unittest.cc",
"secure_channel_service_unittest.cc",
"secure_channel_unittest.cc",
"session_keys_unittest.cc",
"shared_resource_scheduler_unittest.cc",
"single_client_message_proxy_impl_unittest.cc",
"wire_message_unittest.cc",
]
deps = [
":secure_channel",
":test_support",
"//base/test:test_support",
"//chromeos/components/multidevice",
"//chromeos/components/multidevice:test_support",
"//chromeos/components/proximity_auth/logging",
"//chromeos/services/secure_channel/public/cpp/client:unit_tests",
"//chromeos/services/secure_channel/public/cpp/shared",
"//chromeos/services/secure_channel/public/mojom",
"//chromeos/services/secure_channel/public/mojom:unit_tests",
"//components/cryptauth:secure_message",
"//components/cryptauth:secure_message_test_support",
"//device/bluetooth:mocks",
"//services/service_manager/public/cpp/test:test_support",
"//testing/gmock",
"//testing/gtest",
]
}