Index: net/quic/quic_crypto_server_stream.cc |
diff --git a/net/quic/quic_crypto_server_stream.cc b/net/quic/quic_crypto_server_stream.cc |
index d1c21ff99d4de4880415225e2d5d74b4a3773eaa..a0104e4b8838850912d005f48d5a545b22a21bc6 100644 |
--- a/net/quic/quic_crypto_server_stream.cc |
+++ b/net/quic/quic_crypto_server_stream.cc |
@@ -6,37 +6,19 @@ |
#include "net/quic/crypto/crypto_protocol.h" |
#include "net/quic/crypto/crypto_utils.h" |
+#include "net/quic/quic_config.h" |
#include "net/quic/quic_protocol.h" |
#include "net/quic/quic_session.h" |
namespace net { |
-QuicCryptoServerStream::QuicCryptoServerStream(QuicSession* session) |
+QuicCryptoServerStream::QuicCryptoServerStream( |
+ const QuicConfig& config, |
+ const QuicCryptoServerConfig& crypto_config, |
+ QuicSession* session) |
: QuicCryptoStream(session), |
- // TODO(agl): use real secret. |
- crypto_config_("secret") { |
- config_.SetDefaults(); |
- // Use hardcoded crypto parameters for now. |
- CryptoHandshakeMessage extra_tags; |
- config_.ToHandshakeMessage(&extra_tags); |
- |
- // TODO(agl): AddTestingConfig generates a new, random config. In the future |
- // this will be replaced with a real source of configs. |
- scoped_ptr<CryptoHandshakeMessage> scfg( |
- crypto_config_.AddTestingConfig(session->connection()->random_generator(), |
- session->connection()->clock(), |
- extra_tags)); |
- // If we were using the same config in many servers then we would have to |
- // parse a QuicConfig from config_tags here. |
- |
- // Our non-crypto configuration is also expressed in the SCFG because it's |
- // signed. Thus |config_| needs to be consistent with that. |
- if (!config_.SetFromHandshakeMessage(*scfg)) { |
- // TODO(agl): when we aren't generating testing configs then this can be a |
- // CHECK at startup time. |
- LOG(WARNING) << "SCFG could not be parsed by QuicConfig."; |
- DCHECK(false); |
- } |
+ config_(config), |
+ crypto_config_(crypto_config) { |
} |
QuicCryptoServerStream::~QuicCryptoServerStream() { |
@@ -62,7 +44,7 @@ void QuicCryptoServerStream::OnHandshakeMessage( |
session()->connection()->peer_address(), |
session()->connection()->clock()->NowAsDeltaSinceUnixEpoch(), |
session()->connection()->random_generator(), |
- &reply, &crypto_negotiated_params_, &error_details); |
+ &crypto_negotiated_params_, &reply, &error_details); |
if (reply.tag() == kSHLO) { |
// If we are returning a SHLO then we accepted the handshake. |