#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "device/fido/ctap_make_credential_request.h"
#include <limits>
#include <utility>
#include "base/numerics/safe_conversions.h"
#include "base/ranges/algorithm.h"
#include "components/cbor/values.h"
#include "device/fido/device_response_converter.h"
#include "device/fido/fido_constants.h"
#include "device/fido/fido_parsing_utils.h"
namespace device {
namespace {
bool IsMakeCredentialOptionMapFormatCorrect(
const cbor::Value::MapValue& option_map) { … }
bool AreMakeCredentialRequestMapKeysCorrect(
const cbor::Value::MapValue& request_map) { … }
}
std::optional<CtapMakeCredentialRequest> CtapMakeCredentialRequest::Parse(
const cbor::Value::MapValue& request_map,
const ParseOpts& opts) { … }
CtapMakeCredentialRequest::CtapMakeCredentialRequest(
std::string in_client_data_json,
PublicKeyCredentialRpEntity in_rp,
PublicKeyCredentialUserEntity in_user,
PublicKeyCredentialParams in_public_key_credential_params)
: … { … }
CtapMakeCredentialRequest::CtapMakeCredentialRequest(
const CtapMakeCredentialRequest& that) = default;
CtapMakeCredentialRequest::CtapMakeCredentialRequest(
CtapMakeCredentialRequest&& that) = default;
CtapMakeCredentialRequest& CtapMakeCredentialRequest::operator=(
const CtapMakeCredentialRequest& that) = default;
CtapMakeCredentialRequest& CtapMakeCredentialRequest::operator=(
CtapMakeCredentialRequest&& that) = default;
CtapMakeCredentialRequest::~CtapMakeCredentialRequest() = default;
std::pair<CtapRequestCommand, std::optional<cbor::Value>>
AsCTAPRequestValuePair(const CtapMakeCredentialRequest& request) { … }
MakeCredentialOptions::MakeCredentialOptions() = default;
MakeCredentialOptions::~MakeCredentialOptions() = default;
MakeCredentialOptions::MakeCredentialOptions(const MakeCredentialOptions&) =
default;
MakeCredentialOptions::MakeCredentialOptions(
const AuthenticatorSelectionCriteria& authenticator_selection_criteria)
: … { … }
MakeCredentialOptions::MakeCredentialOptions(MakeCredentialOptions&&) = default;
MakeCredentialOptions& MakeCredentialOptions::operator=(
const MakeCredentialOptions&) = default;
MakeCredentialOptions& MakeCredentialOptions::operator=(
MakeCredentialOptions&&) = default;
}