#include "net/quic/crypto/crypto_handshake_message.h"
#include "net/quic/crypto/crypto_protocol.h"
#include "net/quic/crypto/crypto_secret_boxer.h"
+#include "net/quic/crypto/source_address_token.h"
#include "net/quic/quic_time.h"
namespace net {
CryptoHandshakeMessage* out,
std::string* error_details) const;
+ // BuildServerConfigUpdateMessage sets |out| to be a SCUP message containing
+ // the current primary config, an up to date source-address token, and cert
+ // chain and proof in the case of secure QUIC. Returns true if successfully
+ // filled |out|.
+ //
+ // |cached_network_params| is optional, and can be NULL.
bool BuildServerConfigUpdateMessage(
const IPEndPoint& client_ip,
const QuicClock* clock,
QuicRandom* rand,
const QuicCryptoNegotiatedParameters& params,
+ const CachedNetworkParameters* cached_network_params,
CryptoHandshakeMessage* out) const;
// SetProofSource installs |proof_source| as the ProofSource for handshakes.
scoped_refptr<Config> ParseConfigProtobuf(QuicServerConfigProtobuf* protobuf);
// NewSourceAddressToken returns a fresh source address token for the given
- // IP address.
- std::string NewSourceAddressToken(const Config& config,
- const IPEndPoint& ip,
- QuicRandom* rand,
- QuicWallTime now) const;
+ // IP address. |cached_network_params| is optional, and can be NULL.
+ std::string NewSourceAddressToken(
+ const Config& config,
+ const IPEndPoint& ip,
+ QuicRandom* rand,
+ QuicWallTime now,
+ const CachedNetworkParameters* cached_network_params) const;
// ValidateSourceAddressToken returns HANDSHAKE_OK if the source address token
// in |token| is a valid and timely token for the IP address |ip| given that