Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / net / quic / crypto / quic_crypto_server_config.h
index 9ec0612..faec4a1 100644 (file)
@@ -19,6 +19,7 @@
 #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 {
@@ -211,11 +212,18 @@ class NET_EXPORT_PRIVATE QuicCryptoServerConfig {
       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.
@@ -388,11 +396,13 @@ class NET_EXPORT_PRIVATE QuicCryptoServerConfig {
   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