mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-12-01 01:36:09 +03:00
264 lines
6.5 KiB
Plaintext
264 lines
6.5 KiB
Plaintext
|
# Copyright 2016 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/config/features.gni")
|
||
|
import("//testing/libfuzzer/fuzzer_test.gni")
|
||
|
|
||
|
component("fido") {
|
||
|
sources = [
|
||
|
"attestation_object.cc",
|
||
|
"attestation_object.h",
|
||
|
"attestation_statement.cc",
|
||
|
"attestation_statement.h",
|
||
|
"attested_credential_data.cc",
|
||
|
"attested_credential_data.h",
|
||
|
"authenticator_data.cc",
|
||
|
"authenticator_data.h",
|
||
|
"authenticator_get_assertion_response.cc",
|
||
|
"authenticator_get_assertion_response.h",
|
||
|
"authenticator_get_info_response.cc",
|
||
|
"authenticator_get_info_response.h",
|
||
|
"authenticator_make_credential_response.cc",
|
||
|
"authenticator_make_credential_response.h",
|
||
|
"authenticator_selection_criteria.cc",
|
||
|
"authenticator_selection_criteria.h",
|
||
|
"authenticator_supported_options.cc",
|
||
|
"authenticator_supported_options.h",
|
||
|
"ctap_empty_authenticator_request.cc",
|
||
|
"ctap_empty_authenticator_request.h",
|
||
|
"ctap_get_assertion_request.cc",
|
||
|
"ctap_get_assertion_request.h",
|
||
|
"ctap_make_credential_request.cc",
|
||
|
"ctap_make_credential_request.h",
|
||
|
"ctap_register_operation.cc",
|
||
|
"ctap_register_operation.h",
|
||
|
"device_operation.h",
|
||
|
"device_response_converter.cc",
|
||
|
"device_response_converter.h",
|
||
|
"ec_public_key.cc",
|
||
|
"ec_public_key.h",
|
||
|
"fido_attestation_statement.cc",
|
||
|
"fido_attestation_statement.h",
|
||
|
"fido_authenticator.h",
|
||
|
"fido_ble_connection.cc",
|
||
|
"fido_ble_connection.h",
|
||
|
"fido_ble_device.cc",
|
||
|
"fido_ble_device.h",
|
||
|
"fido_ble_discovery.cc",
|
||
|
"fido_ble_discovery.h",
|
||
|
"fido_ble_discovery_base.cc",
|
||
|
"fido_ble_discovery_base.h",
|
||
|
"fido_ble_frames.cc",
|
||
|
"fido_ble_frames.h",
|
||
|
"fido_ble_transaction.cc",
|
||
|
"fido_ble_transaction.h",
|
||
|
"fido_ble_uuids.cc",
|
||
|
"fido_ble_uuids.h",
|
||
|
"fido_cable_device.cc",
|
||
|
"fido_cable_device.h",
|
||
|
"fido_cable_discovery.cc",
|
||
|
"fido_cable_discovery.h",
|
||
|
"fido_constants.cc",
|
||
|
"fido_constants.h",
|
||
|
"fido_device.cc",
|
||
|
"fido_device.h",
|
||
|
"fido_device_authenticator.cc",
|
||
|
"fido_device_authenticator.h",
|
||
|
"fido_discovery.cc",
|
||
|
"fido_discovery.h",
|
||
|
"fido_hid_message.cc",
|
||
|
"fido_hid_message.h",
|
||
|
"fido_hid_packet.cc",
|
||
|
"fido_hid_packet.h",
|
||
|
"fido_parsing_utils.cc",
|
||
|
"fido_parsing_utils.h",
|
||
|
"fido_request_handler.h",
|
||
|
"fido_request_handler_base.cc",
|
||
|
"fido_request_handler_base.h",
|
||
|
"fido_task.cc",
|
||
|
"fido_task.h",
|
||
|
"fido_transport_protocol.h",
|
||
|
"get_assertion_request_handler.cc",
|
||
|
"get_assertion_request_handler.h",
|
||
|
"get_assertion_task.cc",
|
||
|
"get_assertion_task.h",
|
||
|
"make_credential_request_handler.cc",
|
||
|
"make_credential_request_handler.h",
|
||
|
"make_credential_task.cc",
|
||
|
"make_credential_task.h",
|
||
|
"opaque_attestation_statement.cc",
|
||
|
"opaque_attestation_statement.h",
|
||
|
"opaque_public_key.cc",
|
||
|
"opaque_public_key.h",
|
||
|
"public_key.cc",
|
||
|
"public_key.h",
|
||
|
"public_key_credential_descriptor.cc",
|
||
|
"public_key_credential_descriptor.h",
|
||
|
"public_key_credential_params.cc",
|
||
|
"public_key_credential_params.h",
|
||
|
"public_key_credential_rp_entity.cc",
|
||
|
"public_key_credential_rp_entity.h",
|
||
|
"public_key_credential_user_entity.cc",
|
||
|
"public_key_credential_user_entity.h",
|
||
|
"response_data.cc",
|
||
|
"response_data.h",
|
||
|
"u2f_command_constructor.cc",
|
||
|
"u2f_command_constructor.h",
|
||
|
"u2f_register.cc",
|
||
|
"u2f_register.h",
|
||
|
"u2f_request.cc",
|
||
|
"u2f_request.h",
|
||
|
"u2f_sign.cc",
|
||
|
"u2f_sign.h",
|
||
|
"virtual_fido_device.cc",
|
||
|
"virtual_fido_device.h",
|
||
|
"virtual_u2f_device.cc",
|
||
|
"virtual_u2f_device.h",
|
||
|
]
|
||
|
|
||
|
defines = [ "IS_DEVICE_FIDO_IMPL" ]
|
||
|
|
||
|
deps = [
|
||
|
"//components/apdu",
|
||
|
"//components/cbor",
|
||
|
"//crypto",
|
||
|
"//device/base",
|
||
|
"//services/service_manager/public/cpp",
|
||
|
"//services/service_manager/public/mojom",
|
||
|
"//third_party/boringssl",
|
||
|
]
|
||
|
|
||
|
public_deps = [
|
||
|
"//base",
|
||
|
"//device/bluetooth",
|
||
|
"//services/device/public/mojom",
|
||
|
]
|
||
|
|
||
|
libs = [] # Extended for mac.
|
||
|
|
||
|
# HID is not supported on Android.
|
||
|
if (!is_android) {
|
||
|
sources += [
|
||
|
"fido_hid_device.cc",
|
||
|
"fido_hid_device.h",
|
||
|
"fido_hid_discovery.cc",
|
||
|
"fido_hid_discovery.h",
|
||
|
]
|
||
|
|
||
|
deps += [
|
||
|
"//services/device/public/cpp/hid",
|
||
|
"//services/device/public/mojom",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
if (is_mac) {
|
||
|
sources += [
|
||
|
"mac/authenticator.h",
|
||
|
"mac/authenticator.mm",
|
||
|
"mac/get_assertion_operation.h",
|
||
|
"mac/get_assertion_operation.mm",
|
||
|
"mac/keychain.h",
|
||
|
"mac/keychain.mm",
|
||
|
"mac/make_credential_operation.h",
|
||
|
"mac/make_credential_operation.mm",
|
||
|
"mac/operation.h",
|
||
|
"mac/operation_base.h",
|
||
|
"mac/touch_id_context.h",
|
||
|
"mac/touch_id_context.mm",
|
||
|
"mac/util.h",
|
||
|
"mac/util.mm",
|
||
|
]
|
||
|
|
||
|
libs += [
|
||
|
"Foundation.framework",
|
||
|
"LocalAuthentication.framework",
|
||
|
"Security.framework",
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
source_set("mocks") {
|
||
|
testonly = true
|
||
|
|
||
|
sources = [
|
||
|
"mock_fido_ble_connection.cc",
|
||
|
"mock_fido_ble_connection.h",
|
||
|
"mock_fido_device.cc",
|
||
|
"mock_fido_device.h",
|
||
|
"mock_fido_discovery_observer.cc",
|
||
|
"mock_fido_discovery_observer.h",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":fido",
|
||
|
"//base",
|
||
|
"//components/apdu",
|
||
|
"//testing/gmock",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
fuzzer_test("fido_hid_message_fuzzer") {
|
||
|
sources = [
|
||
|
"fido_hid_message_fuzzer.cc",
|
||
|
]
|
||
|
deps = [
|
||
|
":fido",
|
||
|
"//base",
|
||
|
]
|
||
|
libfuzzer_options = [ "max_len=2048" ]
|
||
|
}
|
||
|
|
||
|
fuzzer_test("fido_ble_frames_fuzzer") {
|
||
|
sources = [
|
||
|
"fido_ble_frames_fuzzer.cc",
|
||
|
]
|
||
|
deps = [
|
||
|
":fido",
|
||
|
]
|
||
|
libfuzzer_options = [ "max_len=65535" ]
|
||
|
}
|
||
|
|
||
|
fuzzer_test("ctap_response_fuzzer") {
|
||
|
sources = [
|
||
|
"ctap_response_fuzzer.cc",
|
||
|
]
|
||
|
deps = [
|
||
|
":fido",
|
||
|
"//base",
|
||
|
"//base:i18n",
|
||
|
]
|
||
|
seed_corpus = "response_data_fuzzer_corpus/"
|
||
|
libfuzzer_options = [ "max_len=65537" ]
|
||
|
}
|
||
|
|
||
|
is_linux_without_udev = is_linux && !use_udev
|
||
|
|
||
|
source_set("test_support") {
|
||
|
testonly = true
|
||
|
sources = [
|
||
|
"fake_fido_discovery.cc",
|
||
|
"fake_fido_discovery.h",
|
||
|
"scoped_virtual_fido_device.cc",
|
||
|
"scoped_virtual_fido_device.h",
|
||
|
"test_callback_receiver.h",
|
||
|
]
|
||
|
deps = [
|
||
|
"//base",
|
||
|
"//components/apdu",
|
||
|
"//device/fido",
|
||
|
"//mojo/public/cpp/bindings",
|
||
|
"//services/device/public/mojom",
|
||
|
"//testing/gmock",
|
||
|
"//testing/gtest",
|
||
|
]
|
||
|
|
||
|
# Android doesn't compile. Linux requires udev.
|
||
|
if (!is_linux_without_udev && !is_android) {
|
||
|
sources += [
|
||
|
"fake_hid_impl_for_testing.cc",
|
||
|
"fake_hid_impl_for_testing.h",
|
||
|
]
|
||
|
}
|
||
|
}
|