chromium/net/quic/mock_crypto_client_stream.cc

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

#include "net/quic/mock_crypto_client_stream.h"

#include "net/base/ip_endpoint.h"
#include "net/quic/address_utils.h"
#include "net/quic/mock_decrypter.h"
#include "net/quic/mock_encrypter.h"
#include "net/quic/quic_chromium_client_session.h"
#include "net/third_party/quiche/src/quiche/quic/core/crypto/quic_decrypter.h"
#include "net/third_party/quiche/src/quiche/quic/core/crypto/quic_encrypter.h"
#include "net/third_party/quiche/src/quiche/quic/core/http/quic_spdy_client_session_base.h"
#include "net/third_party/quiche/src/quiche/quic/core/quic_utils.h"
#include "net/third_party/quiche/src/quiche/quic/test_tools/quic_config_peer.h"
#include "net/third_party/quiche/src/quiche/quic/test_tools/quic_connection_peer.h"
#include "net/third_party/quiche/src/quiche/quic/test_tools/quic_test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/boringssl/src/include/openssl/ssl.h"

CLIENT;
ConnectionCloseBehavior;
CryptoHandshakeMessage;
CryptoMessageParser;
ENCRYPTION_FORWARD_SECURE;
ENCRYPTION_INITIAL;
ENCRYPTION_ZERO_RTT;
kAESG;
kC255;
kDefaultMaxStreamsPerConnection;
kQBIC;
Perspective;
ProofVerifyContext;
QUIC_CRYPTO_MESSAGE_AFTER_HANDSHAKE_COMPLETE;
QUIC_NO_ERROR;
QUIC_PROOF_INVALID;
QuicConfig;
QuicCryptoClientConfig;
QuicCryptoNegotiatedParameters;
QuicErrorCode;
QuicServerId;
QuicSession;
QuicSpdyClientSessionBase;
QuicTagVector;
QuicTime;
TransportParameters;
StrictTaggingDecrypter;
TaggingEncrypter;
string;

namespace net {
namespace {

static constexpr int k8ByteConnectionId =;

}  // namespace

MockCryptoClientStream::MockCryptoClientStream(
    const QuicServerId& server_id,
    QuicSpdyClientSessionBase* session,
    std::unique_ptr<ProofVerifyContext> verify_context,
    const QuicConfig& config,
    QuicCryptoClientConfig* crypto_config,
    HandshakeMode handshake_mode,
    const net::ProofVerifyDetailsChromium* proof_verify_details,
    bool use_mock_crypter)
    :{}

MockCryptoClientStream::~MockCryptoClientStream() = default;

void MockCryptoClientStream::OnHandshakeMessage(
    const CryptoHandshakeMessage& message) {}

bool MockCryptoClientStream::CryptoConnect() {}

bool MockCryptoClientStream::encryption_established() const {}

bool MockCryptoClientStream::one_rtt_keys_available() const {}

quic::HandshakeState MockCryptoClientStream::GetHandshakeState() const {}

void MockCryptoClientStream::setHandshakeConfirmedForce(bool state) {}

bool MockCryptoClientStream::EarlyDataAccepted() const {}

const QuicCryptoNegotiatedParameters&
MockCryptoClientStream::crypto_negotiated_params() const {}

CryptoMessageParser* MockCryptoClientStream::crypto_message_parser() {}

// Tests using MockCryptoClientStream() do not care about the handshaker's
// state.  Intercept and ignore the calls calls to prevent DCHECKs within the
// handshaker from failing.
void MockCryptoClientStream::OnOneRttPacketAcknowledged() {}

std::unique_ptr<quic::QuicDecrypter>
MockCryptoClientStream::AdvanceKeysAndCreateCurrentOneRttDecrypter() {}

void MockCryptoClientStream::NotifySessionZeroRttComplete() {}

void MockCryptoClientStream::NotifySessionOneRttKeyAvailable() {}

// static
CryptoHandshakeMessage MockCryptoClientStream::GetDummyCHLOMessage() {}

void MockCryptoClientStream::SetConfigNegotiated() {}

void MockCryptoClientStream::FillCryptoParams() {}

}  // namespace net