blob: c4dcb08daeeab236cafbe19d234169dafafd66f2 [file] [log] [blame]
QUICHE teama6ef0a62019-03-07 20:34:33 -05001// Copyright (c) 2012 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef QUICHE_QUIC_TOOLS_QUIC_SIMPLE_CRYPTO_SERVER_STREAM_HELPER_H_
6#define QUICHE_QUIC_TOOLS_QUIC_SIMPLE_CRYPTO_SERVER_STREAM_HELPER_H_
7
8#include "net/third_party/quiche/src/quic/core/crypto/quic_random.h"
9#include "net/third_party/quiche/src/quic/core/quic_crypto_server_stream.h"
10
11namespace quic {
12
13// Simple helper for server crypto streams which generates a new random
wub4ca3d672019-06-12 08:27:17 -070014// connection ID for rejects.
QUICHE teama6ef0a62019-03-07 20:34:33 -050015class QuicSimpleCryptoServerStreamHelper
16 : public QuicCryptoServerStream::Helper {
17 public:
wub662a3d62019-08-16 14:10:50 -070018 QuicSimpleCryptoServerStreamHelper();
QUICHE teama6ef0a62019-03-07 20:34:33 -050019
20 ~QuicSimpleCryptoServerStreamHelper() override;
21
QUICHE teama6ef0a62019-03-07 20:34:33 -050022 bool CanAcceptClientHello(const CryptoHandshakeMessage& message,
23 const QuicSocketAddress& client_address,
24 const QuicSocketAddress& peer_address,
25 const QuicSocketAddress& self_address,
vasilvvc48c8712019-03-11 13:38:16 -070026 std::string* error_details) const override;
QUICHE teama6ef0a62019-03-07 20:34:33 -050027};
28
29} // namespace quic
30
31#endif // QUICHE_QUIC_TOOLS_QUIC_SIMPLE_CRYPTO_SERVER_STREAM_HELPER_H_