#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "device/fido/ctap_get_assertion_request.h"
#include <limits>
#include <utility>
#include "base/feature_list.h"
#include "base/ranges/algorithm.h"
#include "device/fido/device_response_converter.h"
#include "device/fido/features.h"
#include "device/fido/fido_constants.h"
#include "device/fido/fido_parsing_utils.h"
#include "device/fido/pin.h"
namespace device {
namespace {
bool IsGetAssertionOptionMapFormatCorrect(
const cbor::Value::MapValue& option_map) { … }
bool AreGetAssertionRequestMapKeysCorrect(
const cbor::Value::MapValue& request_map) { … }
}
CtapGetAssertionOptions::CtapGetAssertionOptions() = default;
CtapGetAssertionOptions::CtapGetAssertionOptions(
const CtapGetAssertionOptions&) = default;
CtapGetAssertionOptions::CtapGetAssertionOptions(CtapGetAssertionOptions&&) =
default;
CtapGetAssertionOptions::~CtapGetAssertionOptions() = default;
bool operator<(const PRFInput& a, const PRFInput& b) { … }
CtapGetAssertionRequest::HMACSecret::HMACSecret(
base::span<const uint8_t, kP256X962Length> in_public_key_x962,
base::span<const uint8_t> in_encrypted_salts,
base::span<const uint8_t> in_salts_auth,
std::optional<PINUVAuthProtocol> in_pin_protocol)
: … { … }
CtapGetAssertionRequest::HMACSecret::HMACSecret(const HMACSecret&) = default;
CtapGetAssertionRequest::HMACSecret::~HMACSecret() = default;
CtapGetAssertionRequest::HMACSecret&
CtapGetAssertionRequest::HMACSecret::operator=(const HMACSecret&) = default;
std::optional<CtapGetAssertionRequest> CtapGetAssertionRequest::Parse(
const cbor::Value::MapValue& request_map,
const ParseOpts& opts) { … }
CtapGetAssertionRequest::CtapGetAssertionRequest(
std::string in_rp_id,
std::string in_client_data_json)
: … { … }
CtapGetAssertionRequest::CtapGetAssertionRequest(
const CtapGetAssertionRequest& that) = default;
CtapGetAssertionRequest::CtapGetAssertionRequest(
CtapGetAssertionRequest&& that) = default;
CtapGetAssertionRequest& CtapGetAssertionRequest::operator=(
const CtapGetAssertionRequest& other) = default;
CtapGetAssertionRequest& CtapGetAssertionRequest::operator=(
CtapGetAssertionRequest&& other) = default;
CtapGetAssertionRequest::~CtapGetAssertionRequest() = default;
std::pair<CtapRequestCommand, std::optional<cbor::Value>>
AsCTAPRequestValuePair(const CtapGetAssertionRequest& request) { … }
std::pair<CtapRequestCommand, std::optional<cbor::Value>>
AsCTAPRequestValuePair(const CtapGetNextAssertionRequest&) { … }
}