#include "device/fido/fido_device_authenticator.h"
#include <array>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <optional>
#include <string>
#include <utility>
#include <vector>
#include "base/check.h"
#include "base/check_op.h"
#include "base/containers/span.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/scoped_refptr.h"
#include "base/rand_util.h"
#include "base/ranges/algorithm.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "base/test/test_future.h"
#include "device/fido/authenticator_get_assertion_response.h"
#include "device/fido/ctap_get_assertion_request.h"
#include "device/fido/fido_constants.h"
#include "device/fido/fido_test_data.h"
#include "device/fido/fido_types.h"
#include "device/fido/large_blob.h"
#include "device/fido/pin.h"
#include "device/fido/virtual_ctap2_device.h"
#include "device/fido/virtual_fido_device.h"
#include "services/data_decoder/public/cpp/test_support/in_process_data_decoder.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace device {
namespace {
GetAssertionFuture;
PinFuture;
GarbageCollectionFuture;
TouchFuture;
const std::string kRpId = …;
const std::vector<uint8_t> kCredentialId1{ … };
const std::vector<uint8_t> kCredentialId2{ … };
const std::vector<uint8_t> kUserId1{ … };
const std::vector<uint8_t> kUserId2{ … };
const std::vector<uint8_t> kSmallBlob1{ … };
const std::vector<uint8_t> kSmallBlob2{ … };
const std::vector<uint8_t> kSmallBlob3{ … };
constexpr size_t kLargeBlobStorageSize = …;
constexpr char kPin[] = …;
class FidoDeviceAuthenticatorTest : public testing::Test { … };
TEST_F(FidoDeviceAuthenticatorTest, TestReadEmptyLargeBlob) { … }
TEST_F(FidoDeviceAuthenticatorTest, TestReadInvalidLargeBlob) { … }
TEST_F(FidoDeviceAuthenticatorTest, TestWriteSmallBlob) { … }
TEST_F(FidoDeviceAuthenticatorTest, TestWriteInvalidLargeBlob) { … }
TEST_F(FidoDeviceAuthenticatorTest,
TestWriteBlobDoesNotOverwriteNonStructuredData) { … }
TEST_F(FidoDeviceAuthenticatorTest, TestWriteLargeBlob) { … }
TEST_F(FidoDeviceAuthenticatorTest, TestWriteSmallBlobWithToken) { … }
TEST_F(FidoDeviceAuthenticatorTest, TestUpdateLargeBlob) { … }
TEST_F(FidoDeviceAuthenticatorTest, TestWriteLargeBlobTooLarge) { … }
TEST_F(FidoDeviceAuthenticatorTest, TestWriteLargeBlobNoLargeBlobKey) { … }
TEST_F(FidoDeviceAuthenticatorTest, TestWriteLargeBlobCtapError) { … }
TEST_F(FidoDeviceAuthenticatorTest, TestGarbageCollectLargeBlob) { … }
TEST_F(FidoDeviceAuthenticatorTest, TestGarbageCollectLargeBlobNoChanges) { … }
TEST_F(FidoDeviceAuthenticatorTest, TestGarbageCollectLargeBlobInvalid) { … }
TEST_F(FidoDeviceAuthenticatorTest, TestGarbageCollectLargeBlobNoCredentials) { … }
TEST_F(FidoDeviceAuthenticatorTest, TestGetTouch) { … }
}
}