Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1081)

Unified Diff: net/quic/quic_crypto_server_stream.cc

Issue 13976007: Land Recent QUIC Changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated copyright notice Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_crypto_server_stream.h ('k') | net/quic/quic_crypto_server_stream_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « net/quic/quic_crypto_server_stream.h ('k') | net/quic/quic_crypto_server_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698