chromium/chrome/browser/enterprise/connectors/device_trust/key_management/core/network/key_upload_request.cc

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/enterprise/connectors/device_trust/key_management/core/network/key_upload_request.h"

#include "base/check.h"
#include "chrome/browser/enterprise/connectors/device_trust/key_management/core/signing_key_pair.h"
#include "components/policy/proto/device_management_backend.pb.h"
#include "crypto/unexportable_key.h"

BPKUR;

namespace enterprise_connectors {

namespace {

constexpr int kMaxDMTokenLength =;

BPKUR::KeyType AlgorithmToType(
    crypto::SignatureVerifier::SignatureAlgorithm algorithm) {}

bool AreParametersValid(const GURL& dm_server_url,
                        const std::string& dm_token,
                        const SigningKeyPair& key_pair) {}

}  // namespace

KeyUploadRequest::KeyUploadRequest(const GURL& dm_server_url,
                                   const std::string& dm_token,
                                   const std::string& request_body)
    :{}

// static
std::optional<const enterprise_management::DeviceManagementRequest>
KeyUploadRequest::BuildUploadPublicKeyRequest(
    const SigningKeyPair& new_key_pair,
    const SigningKeyPair* old_key_pair,
    std::optional<std::string> nonce) {}

// static
std::optional<const KeyUploadRequest> KeyUploadRequest::Create(
    const GURL& dm_server_url,
    const std::string& dm_token,
    const SigningKeyPair& key_pair) {}

// static
std::optional<const KeyUploadRequest> KeyUploadRequest::Create(
    const GURL& dm_server_url,
    const std::string& dm_token,
    const SigningKeyPair& new_key_pair,
    const SigningKeyPair& old_key_pair,
    const std::string& nonce) {}

}  // namespace enterprise_connectors